We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.
--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
The data being encrypted, is nonsensical. So we always rely on the container information
MozReview-Commit-ID: 4uQ9l3Q1Ebl
--HG--
extra : rebase_source : 675f9d23d73765387735212f8894235d5ba668e5
Most ChannelMediaDecoder::CloneImpl() functions just check to see whether
their "is enabled" pref is still true, and then clone their true type.
If we had a function to check whether the decoder for an arbitrary type
was still enabled, we'd not need the "is enabled" checks in the CloneImpl()
implementations. We'd then have removed the last custom behaviour in the
ChannelMediaDecoder subclasses.
MozReview-Commit-ID: D7kW6kb6ztW
--HG--
extra : rebase_source : 88f259ea0245a4405897959d5c115b0b79dc45e2
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
Most ChannelMediaDecoder::CloneImpl() functions just check to see whether
their "is enabled" pref is still true, and then clone their true type.
If we had a function to check whether the decoder for an arbitrary type
was still enabled, we'd not need the "is enabled" checks in the CloneImpl()
implementations. We'd then have removed the last custom behaviour in the
ChannelMediaDecoder subclasses.
MozReview-Commit-ID: D7kW6kb6ztW
--HG--
extra : rebase_source : 88f259ea0245a4405897959d5c115b0b79dc45e2
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 83d0facbe26f8385c7163dc85d5512e7a43e80f4
Most ChannelMediaDecoder::CloneImpl() functions just check to see whether
their "is enabled" pref is still true, and then clone their true type.
If we had a function to check whether the decoder for an arbitrary type
was still enabled, we'd not need the "is enabled" checks in the CloneImpl()
implementations. We'd then have removed the last custom behaviour in the
ChannelMediaDecoder subclasses.
MozReview-Commit-ID: D7kW6kb6ztW
--HG--
extra : rebase_source : f463785d2975adceffd62037315d169736effbc0
We have three implementations, in the MP4, WebM and MediaSource decoders. The
WebM and MP4 are the same. Ogg and other decoders don't have an implementation,
but if we create a default implementation in MediaDecoder, they'll get it for
free. MediaSourceDecoder needs a custom override still.
MozReview-Commit-ID: AXxn2Xhn0Jn
--HG--
extra : rebase_source : 63513ce3b01546142357182f21fce56932b32f7f
Now we have a non-virtual Clone() and a virtual CloneImpl().
We will call Load() inside Clone().
MozReview-Commit-ID: Hd6p206Brhq
--HG--
extra : rebase_source : fe30611f6524234d98494cd55453140e3b78c7d6
extra : source : 517cd32514e65cf5f6cd7fe46acecd7f9aea6310
The implementation will be shared by most of the sub-classes except OggDecoder
which needs to call demuxer->SetChainingEvents().
http://searchfox.org/mozilla-central/rev/f0e4ae5f8c40ba742214e89aba3f554da0b89a33/dom/media/ogg/OggDecoder.cpp#25
This helps reducing code changes whenever we add a field to MediaFormatReaderInit.
MozReview-Commit-ID: 5K8NY1oxol4
--HG--
extra : rebase_source : 7bc2a71ad9bd982ada51fd28d6a5b7c6f1d7395a
extra : source : cccd49795938ce53cd8eee597ec0ea4859543c37
We are able to remove some dead code for BlockingReadIntoCache,
LastReadFailed, ClearFailedRead, Pin and Unpin have no callers at all.
MozReview-Commit-ID: KkywoKznejB
--HG--
extra : rebase_source : c6124bce6eca0b974767073fe1daf51aa50635f2
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().
MozReview-Commit-ID: Ch7Saha6zdi
--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
We will remove MediaDecoderReader in the future.
MozReview-Commit-ID: BaCRXleKK5a
--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
So we can reduce dependency on AbstractMediaDecoder.
See bug 1378295 comment 1 for the detail.
Note it is not ideal to repeat |init.mCrashHelper = ...| several times in
this patch. We will re-visit it to reduce code duplication after bug 1378295
is done.
MozReview-Commit-ID: AEC56ukqtYr
--HG--
extra : rebase_source : 07554566af74b65f391811e55847e58365ac81fe
extra : source : 7f613117f815369f65256408b221131683c0dd82
It would be handy we want to pass more data to the constructor.
MozReview-Commit-ID: 3AUUsTbv534
--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
MP4TrackDemuxer::GetNextSamples set mExtraData and it should be valid. This sample will later be rejected by the H264Converter.
The case would also fail if the video codec was VP9.
MozReview-Commit-ID: 5nXoRFJ6ntx
--HG--
extra : rebase_source : 76bfac15373fdccb3f2286bd3cd0999236509e1e
So we are able to dispatch NotifyDataArrived() to MediaDecoderReader in P2.
MozReview-Commit-ID: 3RM66uTvYSc
--HG--
extra : rebase_source : 40311cf27fefbd2046016fb246a3a4ccfce845a8
extra : source : 515d9b3b3cd4b0b30d2fd8196b48c55e14466263
The code couldn't have worked, mNeedSPSForTelemetry can only be set if we didn't get an H264 extradata in the MP4 metadata.
So any calls to HasSPS(sample->mExtraData) would have always returned false.
MozReview-Commit-ID: 3PcRXJHBJyC
--HG--
extra : rebase_source : 5b70a1e40b38b61982264784c489f11ddf9d4682
It was only used in one spot, and incorrectly at that.
MozReview-Commit-ID: EWkkrAlYT7W
--HG--
extra : rebase_source : a19afe8f49e1e0fd430ddbff81978eb3511c5fb5
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.
It will also prevent in the following change to have cycling references between two headers.
MozReview-Commit-ID: FCs5aU4GcTU
--HG--
extra : rebase_source : a96fe0c70416d38690b0c2f1dee567b0b025e947
The code couldn't have worked, mNeedSPSForTelemetry can only be set if we didn't get an H264 extradata in the MP4 metadata.
So any calls to HasSPS(sample->mExtraData) would have always returned false.
MozReview-Commit-ID: 3PcRXJHBJyC
--HG--
extra : rebase_source : 4137b9c985ffe7ee3958fad509149bf911229eed
It was only used in one spot, and incorrectly at that.
MozReview-Commit-ID: EWkkrAlYT7W
--HG--
extra : rebase_source : 9c719bbf668eafaac0415580ffdfa0cea0942673
HasSPS, ExtractExtraData and CompareExtraData have nothing to do with the handling of annex B format. They are raw H264 related methods.
It will also prevent in the following change to have cycling references between two headers.
MozReview-Commit-ID: FCs5aU4GcTU
--HG--
extra : rebase_source : b204723cdbb599d4f0a227871ed28f5da39e9cff
We will add more fields to MediaDecoderInit and be able to remove some setters.
MozReview-Commit-ID: BVx935IHQHf
--HG--
extra : rebase_source : 6d167265e478ce39881ceada1303e9ca18189bbf
extra : source : 0c26f909568f673591ad6720458dfc912c01daad
When seeking, we go to the first IDR prior the seek target. However, if the MP4 sample table is invalid the frame returned may not be an IDR.
It is an error for that frame to not be a keyframe, so we do want to have way to detect them through logging. Change assertion to a soft assertion for that purpose.
MozReview-Commit-ID: EMgwRo1mYMp
--HG--
extra : rebase_source : 363a7e148db166b2130a7862a49f03d419d3fe22