We should always append sample by using `AppendSample()` to assert whether a sample is valid, so making `mSamples` private can prevent a direct usage of the nsTarry's `AppendElement()`.
Also provide a method to return non-const mSamples which is only used for the move semantics.
Differential Revision: https://phabricator.services.mozilla.com/D38427
--HG--
extra : moz-landing-system : lando
We don't want to have a sample with invalid time, duration, end time or end timecode, so add a diagnostic assertion to check. And will handle invalid sample for demuxers in next patch.
Differential Revision: https://phabricator.services.mozilla.com/D38426
--HG--
extra : moz-landing-system : lando
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.
MozReview-Commit-ID: IeJJmzYqWMQ
--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
machine -> reader -> demuxer -> resource, etc.
And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)
More will be added later on, from just converting MOZ_LOGs, and as needed.
MozReview-Commit-ID: KgNhHSz35t0
--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
AudioInfo::mProfile is used to detect the type of AAC content we have stored from 1 to 4 as would be stored in an ADTS packet.
1: AAC Main
2: AAC LC (Low Complexity)
3: AAC SSR (Scalable Sample Rate)
4: AAC LTP (Long Term Prediction)
It is not used to store the profile level indication.
This caused the ADTS conversion needed by the Apple AudioToolbox decoder to fail, interrupting the detection of the inband SBR.
MozReview-Commit-ID: 1gf4HIMyCPo
--HG--
extra : rebase_source : 7ddb98e88d5516bd01f8f39156d8ee71fb32cc2e
The only actual code use in MediaSourceDemuxer can trivially be folded into
its caller GetNumberTracks in the same class.
MozReview-Commit-ID: E6zh98zmJwJ
--HG--
extra : rebase_source : 9358dc37523d6cd7c1a4d5ec62a790db6a092063
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.
MozReview-Commit-ID: 6s78RvPFMzv
--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
Will also significantly speed up sniffing in general as this code is called quite often.
MozReview-Commit-ID: KLjpRwynv2J
--HG--
extra : rebase_source : 2b0b652ab8f8e856cb5e7e755ef62480c6b7d281
1. using media::TimeUnit to save some typing.
2. replace TimeUnit() with TimeUnit::Zero().
3. replace TimeUnit::FromXXX(0) with TimeUnit::Zero().
4. replace TimeUnit::FromMicroseconds(std::numeric_limits<int64_t>::max()) with TimeUnit::FromInfinity().
5. replace some uses of int64_t with TimeUnit.
6. replace t > TimeUnit() with t.IsPositive().
MozReview-Commit-ID: 6hC94PXx86i
--HG--
extra : rebase_source : 1ea3b409e6ec12915f3e1a00359d6ff4152c8917
extra : intermediate-source : e31a12ad0e7a4840119036f261ed17eaaff85734
extra : source : ae07ee48000c4a52da0e4fd502b4d690ec51ce1f
Thanks to the previous patch, MediaDataDemuxer::Seek and
SkipToNextRandomAccessPoint (and all overrides in derived demuxers) can now
take their TimeUnit parameter by const&.
MozReview-Commit-ID: 6CqfjAXZ7Yk
--HG--
extra : rebase_source : c3453e4432d9e0281cf5eba55217b0c1d6312f5b
dom/media/ADTSDemuxer.cpp:481:10 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:513:11 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:526:14 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:527:23 [-Wclass-varargs] passing object of class type 'media::TimeUnit' through variadic function
dom/media/ADTSDemuxer.cpp:532:11 [-Wclass-varargs] passing object of class type 'const media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:201:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:237:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:256:13 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:257:22 [-Wclass-varargs] passing object of class type 'media::TimeUnit' through variadic function
dom/media/MP3Demuxer.cpp:262:10 [-Wclass-varargs] passing object of class type 'const mozilla::media::TimeUnit' through variadic function