Closed Bug 1378295 Opened 7 years ago Closed 7 years ago

Remove the dependency on AbstractMediaDecoder from MediaFormatReader

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: jwwang, Assigned: jwwang)

References

Details

Attachments

(6 files)

It will improve the reusability of MediaDecoderReader so it is easier to be reused outside the context of MediaDecoder (e.g. WebAudio and WebRTC).
Depends on: 1378304
Depends on: 1378316
Depends on: 1378631
Depends on: 1378666
Depends on: 1378689
Depends on: 1380234
Depends on: 1380532
Depends on: 1380568
Depends on: 1380569
Depends on: 1380574
Depends on: 1380545
(In reply to JW Wang [:jwwang] [:jw_wang] from comment #0) > It will improve the reusability of MediaDecoderReader so it is easier to be > reused outside the context of MediaDecoder (e.g. WebAudio and WebRTC). http://searchfox.org/mozilla-central/rev/cef8389c687203085dc6b52de2fbd0260d7495bf/dom/media/webaudio/MediaBufferDecoder.cpp#191 BufferDecoder is an anti-pattern which exists so you can pass an AbstractMediaDecoder to the MediaDecoderReader constructor. However, most of its implementation are empty functions. So MediaDecoderReader will be more reusable by removing its dependency on AbstractMediaDecoder.
Once bug 1379190 lands, the only class other than MediaFormatReader that inherits from MediaDecoderReader will be removed. Once the MediaFormatReader is the only class that inherits from MediaDecoderReader, we should look to remove MediaDecodeReader, pushing anything in there that's still needed into MediaFormatReader, and removing the rest.
http://searchfox.org/mozilla-central/rev/cbd628b085ac809bf5a536109e6288aa91cbdff0/dom/media/AbstractMediaDecoder.h#39 I prefer short names as long as they don't cause confusion. It would be nice to also change to name to MediaReader after the merge.
Thanks to bug 1316211, MediaDecoderReader is no more.
Depends on: 1316211
Summary: Remove the dependency on AbstractMediaDecoder from MediaDecoderReader → Remove the dependency on AbstractMediaDecoder from MediaFormatReader
Attachment #8888612 - Flags: review?(jyavenard)
Attachment #8888613 - Flags: review?(jyavenard)
Attachment #8888614 - Flags: review?(jyavenard)
Attachment #8888615 - Flags: review?(jyavenard)
Attachment #8888616 - Flags: review?(jyavenard)
Attachment #8888617 - Flags: review?(jyavenard)
Blocks: 1373160
Assignee: nobody → jwwang
Attachment #8888612 - Flags: review?(jyavenard) → review+
Comment on attachment 8888613 [details] Bug 1378295. P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. https://reviewboard.mozilla.org/r/159616/#review165040 ::: dom/media/AbstractMediaDecoder.h (Diff revision 1) > - // parsed and decoded frames. Use inside video demux & decode functions > - // to ensure all parsed and decoded frames are reported on all return paths. > - class AutoNotifyDecoded > - { > - public: > - explicit AutoNotifyDecoded(FrameStatistics* aFrameStats) I missed the commit that change the AutoNotifyDecoded constructors...
Attachment #8888613 - Flags: review?(jyavenard) → review+
Attachment #8888614 - Flags: review?(jyavenard) → review+
Comment on attachment 8888615 [details] Bug 1378295. P4 - remove reference to AbstractMediaDecoder from TrackBuffersManager.cpp. https://reviewboard.mozilla.org/r/159620/#review165044
Attachment #8888615 - Flags: review?(jyavenard) → review+
Comment on attachment 8888616 [details] Bug 1378295. P5 - remove AbstractMediaDecoder from MediaDecoder's base class. https://reviewboard.mozilla.org/r/159622/#review165046
Attachment #8888616 - Flags: review?(jyavenard) → review+
Comment on attachment 8888617 [details] Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. https://reviewboard.mozilla.org/r/159624/#review165048 ::: dom/media/MediaFormatReader.h:16 (Diff revision 1) > #include "mozilla/Maybe.h" > +#include "mozilla/StateMirroring.h" > #include "mozilla/TaskQueue.h" > #include "mozilla/Mutex.h" > > +#include "FrameStatistics.h" forward declaration for FrameStatistics would be better no?
Attachment #8888617 - Flags: review?(jyavenard) → review+
Comment on attachment 8888613 [details] Bug 1378295. P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. https://reviewboard.mozilla.org/r/159616/#review165040 > I missed the commit that change the AutoNotifyDecoded constructors... The change is in Bug 1380568-P1.
Comment on attachment 8888617 [details] Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. https://reviewboard.mozilla.org/r/159624/#review165048 > forward declaration for FrameStatistics would be better no? We have FrameStatistics::AutoNotifyDecoded at #279.
Pushed by jwwang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ff60bfdd40d P1 - remove unused MFR::mDecoder. r=jya https://hg.mozilla.org/integration/autoland/rev/ca52231d4002 P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. r=jya https://hg.mozilla.org/integration/autoland/rev/5550726d24fb P3 - remove BufferDecoder. r=jya https://hg.mozilla.org/integration/autoland/rev/28d20f28bacb P4 - remove reference to AbstractMediaDecoder from TrackBuffersManager.cpp. r=jya https://hg.mozilla.org/integration/autoland/rev/adc9e2e9bebe P5 - remove AbstractMediaDecoder from MediaDecoder's base class. r=jya https://hg.mozilla.org/integration/autoland/rev/92ca759469c9 P6 - remove AbstractMediaDecoder and fix includes. r=jya
Thanks for the review!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: