Many video codecs use a suffix to specify level, profile and optional features,
like "avc1.42E001" or "vp09.00.41.08".
MediaCodecs::ContainsPrefix() can be used to facilitate codec identification
from their prefix alone, e.g.: "avc1" or "vp09".
MozReview-Commit-ID: D6kcjggXptS
--HG--
extra : rebase_source : 3a60c01da1d91adf29f51ce3c32f8df60282c90a
Note we remove the call to mChannel->SetContentType() from RecreateChannel().
The hint never works as expected for [1] is the only caller to
nsIChannel::GetContentType() and MediaResource::Create() always happens
before any reads from the resource.
[1] http://searchfox.org/mozilla-central/rev/b425854d9bbd49d5caf9baef3686e49ec91c17ec/dom/media/MediaResource.cpp#1500
MozReview-Commit-ID: 1n4yHEouCjC
--HG--
extra : rebase_source : 9a7345c29b985ddee7a90a94191e9d526e2a0a67
extra : source : 054d9ffaf21eb937a6349df76228269ad2d7dc2c
Also remove CanClone() overrides that are identical to that of the base class.
MozReview-Commit-ID: A0Q5ychQtso
--HG--
extra : rebase_source : 3369558a8e6bc9f86ab6dcdc39fe40f686041001
Make sure we test the other major container we
need to parse correctly.
MozReview-Commit-ID: AnrGADFXPkw
--HG--
extra : rebase_source : 5e20580d0900a62f923b96089410845c187ac2a7
This hint will inform readers if caching is discouraged (e.g., for
SourceBufferResource) or recommmended (e.g., for MediaCache-backed
ChannelMediaResource).
MozReview-Commit-ID: 7hopNS0s5tE
--HG--
extra : rebase_source : 681646cc904229e8513adb148baa085254508049
`fread(buf, count, 1, f)` meant that exactly one object of size `count` could
be read.
Changing that to `fread(buf, 1, count, f)` now reads up to `count` size-1
objects (aka bytes) up to `count` and returns that number of bytes read, which
is usually what we want from a read, i.e. as much as possible even if it's less
than requested.
MozReview-Commit-ID: 3Lgvws19SFd
--HG--
extra : rebase_source : e5b89a7073d2a5a0365c6fe6aa938bd17cf37935
If the requested cached-data offset is out of range, we should just return the
same offset, as it signals that the actual cached range is 0 bytes, without
having to deal with -1.
MozReview-Commit-ID: D0rXO0S0mss
--HG--
extra : rebase_source : 39784ff39d12d416358a181f0245ec2129c6992d
Otherwise we might fail the assertion |!mRequest| in the destructor of MozPromiseRequestHolder.
MozReview-Commit-ID: HsVD2re0R7e
--HG--
extra : rebase_source : c023899d92501dd3e275000c9ef0eb50df117236
This function is arguably nicer than calling NS_ProcessNextEvent
manually, is slightly more efficient, and will enable better auditing
for NS_ProcessNextEvent when we do Quantum DOM scheduling changes.
The MP4Reader class was removed in bug 1163486, replaced
by MediaFormatReader combined with MP4Demuxer. Bug 1175752
disabled the corresponding gtest, but as the underlying
object is gone, the test should be removed instead.
MozReview-Commit-ID: 7mU4Q98LtKA
--HG--
extra : rebase_source : 10b20e749321a50bac708c493badbdf32b41f859
We now have code that unconditionally requires the rust
compiler and are committed to adding more. Remove this
last vestige of conditional support.
MozReview-Commit-ID: EK6FBnAbR
--HG--
extra : rebase_source : 6efda10a74f9ca0482304c2b1ffe6941e42138f8
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
media::TimeUnit can take its place. We don't want 2 things for the same purpose to cause confusion.
MozReview-Commit-ID: 3z6hbgXFsxP
--HG--
extra : rebase_source : 0b472e351abdc48e337aaf645ae8be467e8a300f
extra : intermediate-source : 4e2156ec04fd30af6cf59adfd1390cf67f411d4c
extra : source : bf5b035c7041a892517373dd566d2a7d7ec60c72
There was a cycle amoung a window object -> a HTMLMediaElement -> a MediaDecoder -> a Promise (-> back to the window object).
And we have no way to break the cycle since the MediaDecoder does not participate into the collection.
By moving the Promise form MediaDecoder to HTMLMediaElement, we will be able to break the cycle since the HTMLMediaElement is in the collection.
We'll implement the cycle collection in the next patch.
MozReview-Commit-ID: CyVXBl6IMI3
--HG--
extra : rebase_source : 195a322ce3e6fe933e72be4aec5d2ebfa1f54865
Move the creation of MediaElementGMPCrashHelper out from MediaDecoder.cpp
which reduces the dependency of MediaDecoder to HTMLMediaElement.
MozReview-Commit-ID: E60aMfcFr7V
--HG--
extra : rebase_source : f50a8ee6f2fbec0bdf117eb1217066bc9c701745
extra : source : dd4e52da6d0d6205fe61d0caba44bbff008fd21a
ConstructMediaTracks and RemoveMediaTracks are actually HTMLMediaElement's responsibilities.
MozReview-Commit-ID: 8lOdzD4pN7N
--HG--
extra : rebase_source : 7159d2c62b77429e5b2305b9e3eb7a0020a3b52c
extra : source : 0467c059be3cd8f066da5fc912b7738a5b9c4dd9
Open a GetOwnerDoc() method to the MediaDecoderOwner interface and then we can get the
owner document via a pointer to MediaDecoderOwner in MediaDecoder.
MozReview-Commit-ID: JCzQDLx1MsU
--HG--
extra : rebase_source : e194c95cb1513046ec7aa19d6c6e9f8231971a2d
extra : source : 1b9c45911a036e3677b6636cda84a636681d71de
'queue' is not used inside that lambda, so we can drop it.
Another option would have been to simulate its use through `Unused <<`.
But I think that it's a useful test, *not* to capture the queue here, to verify
that it is correctly captured in the enclosing MozPromise::Then.
MozReview-Commit-ID: LUQGPJzDcTb
--HG--
extra : rebase_source : 8a539816b8c3ce16ea7af2fed0d6b2b68bd3900b
Note: Only the Adobe GMP used enum storage, so not that it's unused we may
as well remove this.
MozReview-Commit-ID: JtmQ69eJzaI
--HG--
extra : rebase_source : 29929e680dc1692b957b34ce274c4944743768e8
Instead of `...Codecs().AsString().EqualsASCII("...")`, one can just type
`...Codecs() == "..."`.
MozReview-Commit-ID: JS0yXhs0mz1
--HG--
extra : rebase_source : 40947ca3975ae5390d5dae5add7ed35460235545