audio/opus is a codec type, not a MP4 container one. aType can never be audio/opus
MozReview-Commit-ID: E8tONlF4COA
--HG--
extra : rebase_source : d26a4dce2adcf1f82e56a2b5c2dd5ee1500fcd84
We have this for H.264, so we may as well have it for AAC too.
MozReview-Commit-ID: 2k64ANJGUNN
--HG--
extra : rebase_source : 6fe2543788afd26682d31c0ec45b9ac80e501ab1
MP4Decoder can translate the new MediaContentType into the relevant TrackInfo
to interrogate PDMs about codec support, with extra information if present.
MozReview-Commit-ID: K0jcYm8pJrp
--HG--
extra : rebase_source : e809824285a85035b81ad7f91406bce6393384f6
Just passing the new MediaContentType struct, with no processing changes (yet).
MozReview-Commit-ID: KZ4xkCihPb1
--HG--
extra : rebase_source : e40eb72cc63e0a814306c25ea9b609178517729e
There are too many cases where the MP4 is improperly muxed and frames are incorrectly reported as keyframe.
Instead we now look inside the H264 stream and check for IDR frames.
We also ensure that the first frame returned after a seek is always a true keyframe.
For plain MP4, seeking in those broken files will lead to broken A/V sync. The only way to fix this would be to check for the frame type when reading the samples table. However, this would require to read the entire stream which isn't viable.
MozReview-Commit-ID: Cpv5y7HVD0N
--HG--
extra : rebase_source : 2f92032fe39ed6ad6c2b82438f405040b5e7d30c
H264 decoders always use those anyway, so may as well use them in the demuxer if SPS NAL is available.
This guarantees that we have correct dimensions when reading the MP4 metadata, and will have the side benefit that when loadedmetadata is fired, the dimensions provided at the time will be final; not having to wait to decode the first frame.
MozReview-Commit-ID: 3j70Xqw8jJY
--HG--
extra : rebase_source : 6bc0f1fa1c2db35bcaa683cc1a68042d122e2892
Remove string comparisons to determine from mime types if content is VPX or
H264. Replace with calls to VPXDecoder::IsVPX or MP4Decoder::IsH264 to
centralise such logic.
This patch introduces MP4Decoder:IsH264, and moves the similar functionality out
of H264Convertor for the sake of consistently having these functions in
decoders.
MozReview-Commit-ID: 5nfYusYHrUR
--HG--
extra : rebase_source : c013c4ebe28d5afedbb91ddfffadb40d23fd0ee3
This removes the unnecessary setting of c-basic-offset from all
python-mode files.
This was automatically generated using
perl -pi -e 's/; *c-basic-offset: *[0-9]+//'
... on the affected files.
The bulk of these files are moz.build files but there a few others as
well.
MozReview-Commit-ID: 2pPf3DEiZqx
--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
Update C++ caller code for for mp4parse 0.4.0. Now feeds data through
a read callback in mp4parse_io.
Hook up the GetTrackInfo method to the rust demuxer results.
Prefer rust demuxer only if there's an Opus track.
Fill in audio and video track metadata. Pass audio codec_specific_config
to the decoder.
With this change sample.mp4 plays.
MozReview-Commit-ID: F8xwWPZZBfZ
Update C++ caller code for for mp4parse 0.4.0. Now feeds data through
a read callback in mp4parse_io.
Hook up the GetTrackInfo method to the rust demuxer results.
Prefer rust demuxer only if there's an Opus track.
Fill in audio and video track metadata. Pass audio codec_specific_config
to the decoder.
With this change sample.mp4 plays.
MozReview-Commit-ID: F8xwWPZZBfZ
Extract all the parameters passed to CreateAudioDecoder/CreateVideoDecoder and
place them into a structure that is passed down to the creation of the actual
decoder, where the relevant parameters can be extracted.
This makes it easier to add more arguments to the Create*Decoder calls in future.
MozReview-Commit-ID: 9LZlcfRVz6A
--HG--
extra : rebase_source : ce3f0c7d0784b96267728697ff5d535ccb8ee7a6
PDMFactory will automatically load and initialize the required frameworks upon first use.
Also fix constness of some methods.
MozReview-Commit-ID: HFbvTMRFAey
--HG--
extra : rebase_source : ce3e7ff6cefc35b32674c9a81c3488fe21b48626
Pass declared-but-yet-undefined DecoderDoctorDiagnostics pointer to various
routines that contribute to deciding if a media format can be played, and
those that create decoders.
Points where a DecoderDoctorDiagnostics can be injected are currently marked
with "/* DecoderDoctorDiagnostics* */ nullptr", and some will be used in
following patches.
MozReview-Commit-ID: 7u37bvY4CpW
When running gtest, none of the prefs actually exist, so we end up having most PDMs disabled.
MozReview-Commit-ID: GNjhXtjKpGC
--HG--
extra : rebase_source : 3e5a931dd49c798cff9792e3a1c4ff2e5afc4a83
We now use an index of samples made of block of samples delimited by keyframes. The search is performed using a binary search. This allows to quickly find which blocks are found within the media cache.
On a 8 core mac pro, this leads to a 67% improvement on CPU time spent playing a long MP4 video (from 112s CPU to 45s CPU)
The optimisation is only possible if all mp4 data chunks are continuous (which they almost always are)