This is needed for Servo's gecko-media where there is no support for
Mozilla Preferences.
MozReview-Commit-ID: HbDT42SRrE3
--HG--
extra : source : 8952a9fc838fb2f45bf70a0ad5a3eb45bbeccec2
The NS_LITERAL_STRING macro creates a temporary nsLiteralString to encapsulate the char16_t string literal and its length, but AssignLiteral() can determine the char16_t string literal's length at compile-time without nsLiteralString.
MozReview-Commit-ID: 6vgQiU8zN3o
--HG--
extra : rebase_source : 1b536b92ef43f610db057ace6f108620e8d8b4d5
extra : source : 336e21386d5eeb16f1c9893c29377f23b67cc4b0
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.
MozReview-Commit-ID: F750v6NN81s
--HG--
extra : rebase_source : 714dd78df0f4c33e23e5b117615bd8fd561674c5
extra : source : 742bda9e6b1ddaf34d09894204ad18ce798b79b7
browser.sessionhistory.cache_subframes has been disabled for 12yrs. It's not
actually maintained and it leaks content viewers. Using this unreliable feature
in test cases is a bad practice, so remove the pref completely and fix existing
test cases.
MozReview-Commit-ID: 3tQLpsqmmaq
--HG--
extra : rebase_source : 3e5094fed014a5d152e85f21b6de796a9a7abaa9
After detached the source buffer, we would reset all its resource and shutdown
demuxer.
MozReview-Commit-ID: 7xEJ7q00aeF
--HG--
extra : rebase_source : c80ebb2e9ed6c9d3a672273d20ba2558b289e92d
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.
--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
Print error code couldn't effectively help people understand the reason of error, we should print its name.
MozReview-Commit-ID: KaBTi8zpq91
--HG--
extra : rebase_source : 64eebd9af18fcb5062ff347464045bb9327fb716
PDMFactory::CreateDecoder may not always modify CreateDecoderParams::mError as not all PDM handle this optional return value.
MozReview-Commit-ID: K8WFA0o778U
--HG--
extra : rebase_source : 55c35ab0cb5282d8dfbd1bbc1a2e6e22d97d3209
We misused MFR::DecoderData's address as an identity in bug 1393399 but our intention was MediaDataDecoder's address.
We report telemetry data when we get the 1st decoded frame from a new MediaDataDecoder, which is identified by its address.
If we misuse the MFR::DecoderData's address as identity, it will take longer than we expect since only when
the MFR is recreated will we get a new MFR::DecoderData.
MozReview-Commit-ID: HOf5hTSoBed
--HG--
extra : rebase_source : 76731bd11eac9243a23a972f85c72203c3a3e7f1
There were some cases where these tracks were detected as ended when they were
in fact not. That result in problems in the MediaRecorder.
MozReview-Commit-ID: 4CNUYRvzOgK
--HG--
extra : rebase_source : b94c29bc73e76575489a4684facc0b01bb7aeb22
extra : source : bedb7abcc84263c6a6369c4d05e8bf3287281090
See comment 0 for the rationale. We check |aRequest != mResource->mChannel|
to know if a new channel is being loaded and the call should be aborted.
MozReview-Commit-ID: 6G1x7cXNvAq
--HG--
extra : rebase_source : 3114979192346e257f5d8040b8e0ffffa419d3f5
extra : source : eeb067bc2905dfa6fb5764fd42ebb78e1b71a61d
See comment 3 for the detail. We can't assert !mClosed since NotifyDataReceived()
could be called after the stream is closed.
MozReview-Commit-ID: 4pTfjABdl9B
--HG--
extra : rebase_source : d7d8b38268f3f54242dd728fe5fd0ada17d6ee48
extra : source : 713510f4087b38f0d447529dbf601f19b3a89eae
The load ID works as follows:
1. A load ID is passed to MediaCacheStream::NotifyDataStarted()
when loading a new channel.
2. Each MediaCacheStream::NotifyDataReceived() call is also associated
with a load ID from which the data is received.
3. If |mLoadID != aLoadID| tests to be true in NotifyDataReceived(), it means
the data is from an old channel and should be discarded.
4. MediaCache::Update() reset mLoadID for the stream before calling
CacheClientSeek() to prevent data from the old channel from being
stored to the wrong position.
MozReview-Commit-ID: 9kBoublLlln
--HG--
extra : rebase_source : 58e6d3fe40ec7a549cabc70b30db8006b49c0563
This keeps us in a good shape that NotifyDataStarted() is always called
before subsequent NotifyDataReceived() calls. This is also required by P3
where we need to set the loadID before NotifyDataReceived().
MozReview-Commit-ID: 9TPodkMM4EH
--HG--
extra : rebase_source : 0079e3ae6b791c64c76ca3bc3faac46039fc48fc
See comment 0 for the rationale.
The principal will not change after OnStartRequest().
MozReview-Commit-ID: K2HyWBBzGmC
--HG--
extra : rebase_source : 1d913390b1b94923d859bdb5f6e8d34d3f0ed60d
If mBlockChanges is cleared when PerformBlockIOs() is dropping the data lock,
blockIndex will become an invalid index after it acquire the data lock again.
MozReview-Commit-ID: 5Cu2TgEO3F5
--HG--
extra : rebase_source : 1b3dce490acee6d034c3b85741deda79d209d21a
Continuation on bug 1397307 which was incomplete.
MozReview-Commit-ID: JGGHQyjnALI
--HG--
extra : rebase_source : 067652250dcd0904c8436eebc50068c7fb8d8cbb
Only the Windows H264 decoder supports CreateDecoderParam::mError, all the other PDM leave the value untouched.
As such, it can't be assumed that in case of failure, the mError attribute will be set.
MozReview-Commit-ID: GWHGP6Wv3fl
--HG--
extra : rebase_source : 081b71c7a53c41d9a13904e4182e3cfdb876ae43
In some Android ROMs, MediaCodec doesn't allocate additional buffers to reduce
consumer starvation and will not work when MDSM grips most recently returned
frame before rearching seek target. Implement SetSeekThreshold() to get actual
seek target to check if video buffers can be released back to remote decoder
immediately.
MozReview-Commit-ID: 7IetuVxCXc0
--HG--
extra : rebase_source : 8e8643dbde757d41a26de45663a8232b4c66c386
Someone changing the attribute appendWindowStart and appendWindowEnd can be expected to know what they are doing. As such, we don't need to make sure playback starts when content timestamps are broken.
MozReview-Commit-ID: EcPORuDHpF5
--HG--
extra : rebase_source : 2e29f07d8c4c52dfee360bac9e83b4d92b3eae38
We only process a demuxed sample at a time. Waiting until one is decoded to do the next pending ones.
MozReview-Commit-ID: JlXhyPzso8U
--HG--
extra : rebase_source : c11185ca75fd5950aa4273dd9ec03d2cf9b217ba
We unfortunately can't store this information in the VideoInfo as typically the framerate isn't found in the container's metadata. Additionally, the VideoInfo object is readable-only as it is shared across threads.
As such, we can only estimate it as we demux samples.
MozReview-Commit-ID: 5HB33ubfGAs
--HG--
extra : rebase_source : 1d6d09da76a99524422b14d50db477a9aa222da0
Don't unnecessarily, create a decoder, flush, shutdown and create a new one on the first sample.
MozReview-Commit-ID: 8utEX5JEmq8
--HG--
extra : rebase_source : e40548e7ef4ad1a8e3c57f3070a2ffc77bf81a3f
Automatic conversion (say from int to bool) makes DecoderParam difficult to extend.
MozReview-Commit-ID: G0T7jPogskN
--HG--
extra : rebase_source : 59437fd2b430ccd6be50b18c98b5a5c4ed2c8240
So we don't have to look at GetOffset(). We want to reduce the use of
MediaCacheStream::mChannelOffset so it is easier to fix data races about it.
MozReview-Commit-ID: 3GAbKYA9xi4
--HG--
extra : rebase_source : bfaceb190da30e3276085fb7930468ad51e3a98f
The TestTrackEncoder file only contained audio encoder tests. This makes the
distinction between the already existing TestVideoTrackEncoder and these audio
tests clearer.
MozReview-Commit-ID: KmM616S72Gm
--HG--
rename : dom/media/gtest/TestTrackEncoder.cpp => dom/media/gtest/TestAudioTrackEncoder.cpp
extra : rebase_source : abd0965fd27ef0f51575ac20e908b4cc908bca47
The AudioTrackEncoder has logic to attempt to init when given an AudioSegment.
This logic has previously been part of NotifyQueuedTrackChanges. This
changeset moves the logic to its own method. This allows for finer testing of
the init attempt behaviour.
MozReview-Commit-ID: Der1iM9J8fr
--HG--
extra : rebase_source : bb47dd483d69349482a6d8882e9768b1a8d09480
This adds a mochitest to verify that the max-fs constraint results in smaller
video for VP8 and H.264.
MozReview-Commit-ID: Hk6uyqoiwUY
--HG--
extra : rebase_source : 99602d3d98f8f17b8d71fd94ef3198d43abb7541
1. Pass ChromiumCDMCallback interface to ChromiumCDMParent instead of ChromiumCDMProxy directly.
2. Wrap dispatching to main thread function to clean up the redundant code.
MozReview-Commit-ID: 5HxS9Fc1yr
--HG--
extra : rebase_source : 3ac4c4b260f3196bd862e97aaf12c2422d43ad11
In patch3, we remove the minimum resolution check, now the video under 48x48 can
be playback successfully. Therefore, removing them from error test and we should
ensure they can be playback.
MozReview-Commit-ID: BvLtr4DN1hU
--HG--
extra : rebase_source : 30b9dc35f5754d6ecc7cddaf7f5a9fabf9965889
Return MediaResult instead of using nsresult, because it can contain more detailed
error information. We could also return this error with our rejected decode promise.
MozReview-Commit-ID: 80yEAbxqvWu
--HG--
extra : rebase_source : 51a56b571767c6b64f0c92353585261b28ea5616
Change mLastError type to MediaResult and send it as parameter to PDM::CreateVideoDecoder
in order to get detailed error description.
MozReview-Commit-ID: 4sIRXTHsrzr
--HG--
extra : rebase_source : 23d72cc72f5683305745024de913f44298d717d5
After bug 1392143, we won't enable HW decoding for the resolution < 132 pixels.
In addition, software decoder doesn't have the minimum resolution limit, so
we can remove the minimum resolution check.
MozReview-Commit-ID: 7MiLpwjiq3s
--HG--
extra : rebase_source : 742556f6f2fb40b3e5e69212707a606d3b22ed36
WMFDecoderModule should only focus on whether the mime type is supported or not.
Let WMFVideoMFTManager do the checking.
MozReview-Commit-ID: K6jPfrntu7s
--HG--
extra : rebase_source : f6ba055824c3a7ebac85666e3201fd6b79e8d815
We should report the more detailed error when creating the decoder failed,
instead of just reporting "can not create decoder".
MozReview-Commit-ID: 8vunP5c3zzI
--HG--
extra : rebase_source : 327a988463bf61ad17d1f93bf0a2640d9c9735c7
In patch3, we remove the minimum resolution check, now the video under 48x48 can
be playback successfully. Therefore, removing them from error test and we should
ensure they can be playback.
MozReview-Commit-ID: BvLtr4DN1hU
--HG--
extra : rebase_source : 36cdd1e18cd41516319989b56e4e83888b0ecf50
Return MediaResult instead of using nsresult, because it can contain more detailed
error information. We could also return this error with our rejected decode promise.
MozReview-Commit-ID: HrI3QKlSJC
--HG--
extra : rebase_source : 6aba73c887e3068bf2a3f031a9a3b0698decc2e3
Change mLastError type to MediaResult and send it as parameter to PDM::CreateVideoDecoder
in order to get detailed error description.
MozReview-Commit-ID: 4sIRXTHsrzr
--HG--
extra : rebase_source : 23d72cc72f5683305745024de913f44298d717d5
After bug 1392143, we won't enable HW decoding for the resolution < 132 pixels.
In addition, software decoder doesn't have the minimum resolution limit, so
we can remove the minimum resolution check.
MozReview-Commit-ID: 7MiLpwjiq3s
--HG--
extra : rebase_source : 742556f6f2fb40b3e5e69212707a606d3b22ed36
WMFDecoderModule should only focus on whether the mime type is supported or not.
Let WMFVideoMFTManager do the checking.
MozReview-Commit-ID: K6jPfrntu7s
--HG--
extra : rebase_source : f6ba055824c3a7ebac85666e3201fd6b79e8d815
We should report the more detailed error when creating the decoder failed,
instead of just reporting "can not create decoder".
MozReview-Commit-ID: 8vunP5c3zzI
--HG--
extra : rebase_source : 327a988463bf61ad17d1f93bf0a2640d9c9735c7
It will allow to blacklist all NVidia Tesla and AMD UVD3 GPU.
MozReview-Commit-ID: LaJqyIj0Yau
--HG--
extra : rebase_source : aa93c4379181e2cb09733f0053de55bf64787ef6
This fixes the data race when Seek() read mClosed off the main thread.
MozReview-Commit-ID: GO7Kk5VgVpg
--HG--
extra : rebase_source : e29353aea1e077e30fd284a80a56472d6772e9e1
extra : intermediate-source : 20a5860220a6eb54616cbe059afdaebc81e07e1f
extra : source : 0722d581e2d03eb140ea722527975534471c31b5
So we know what to pass to SetupChannelHeaders()
when the channel is redirected.
MozReview-Commit-ID: DbCPGA3qIyn
--HG--
extra : rebase_source : 4b8a5b620344fa261b243c0935ce49ebb7a9b4aa
extra : source : dfe1a9fe59a623f4d1972f3184a5861cfef62ffd
We have MediaCacheStream::mChannelOffset to keep the download positon.
We don't need 2 variables for the same purpose.
MozReview-Commit-ID: IpnEJWuA9A9
--HG--
extra : rebase_source : 8e720d878c12555d0a5528167c183ddb881b249e
extra : source : 623cf4cc3ab5ad0d9d263bac05a58699b3577277
This ensures XRE_IsContentProcess() is defined, as it's used in this file.
MozReview-Commit-ID: JFCmvZ8aZdT
--HG--
extra : rebase_source : 5852da1b4b76f767e7d36071cdfa1f97eaedbf8c
It will allow to blacklist all NVidia Tesla and AMD UVD3 GPU.
MozReview-Commit-ID: LaJqyIj0Yau
--HG--
extra : rebase_source : aa93c4379181e2cb09733f0053de55bf64787ef6
1. Pass ChromiumCDMCallback interface to ChromiumCDMParent instead of ChromiumCDMProxy directly.
2. Wrap dispatching to main thread function to clean up the redundant code.
MozReview-Commit-ID: 5HxS9Fc1yr
--HG--
extra : rebase_source : ff3227b01003398d0410bdde5f43621f44d9e477
browser.sessionhistory.cache_subframes has been disabled for 12yrs. It's not
actually maintained and it leaks content viewers. Using this unreliable feature
in test cases is a bad practice, so remove the pref completely and fix existing
test cases.
MozReview-Commit-ID: 3tQLpsqmmaq
--HG--
extra : rebase_source : ce6e27c7d422f32dec858712eba5ed8011ee8039
mIgnoreClose is always set in conjunction with a call to CloseChannel().
Since mListener->Revoke() will prevent future OnStopRequest() calls from coming,
it is unnecessary to set mIgnoreClose and therefore we can remove this member.
MozReview-Commit-ID: HEXIhIUG8WN
--HG--
extra : rebase_source : 656c1bb67fcddcca4c2c17b0bb783ad325ab52ec
extra : source : b852f796c1ba6a8bc442013b7b6058a24a33634b
MediaCacheStream::mStreamLength has been set either in Init() or InitAsClone().
MozReview-Commit-ID: L259ecDgjN7
--HG--
extra : rebase_source : 7df74d388808492faac73c3e41a972cb22cdb187
extra : intermediate-source : d834e02c15ed9361a02977349459fad079910642
extra : source : 45df347e1fd6b67d60212f2d87312d597656a7d6
The only caller is CacheClientSeek() which always passes nullptr to it.
MozReview-Commit-ID: 3CTkbF6ktp2
--HG--
extra : rebase_source : f53fe82ca0fc5e2926c4d2cf1346630098a9614f
extra : intermediate-source : a4823926a983af9293c9fe9857e39527735ea226
extra : source : 88a08faec452614217bebe80fc2b00a2b08f7f38
This is more efficient because aStreamListener won't be null.
MozReview-Commit-ID: 4b22l7cTK6y
--HG--
extra : rebase_source : 5e2366eaa79ccff2aacaf47d67805e3f939cc362
extra : intermediate-source : f6a6c58325085ce47e41a189d2e14239695bdaed
extra : source : 16b0c9ebdc4102fcd07d28a2c1a1a3b26d607f47
1. mChannel is null.
2. mCacheStream has been initialized by InitAsClone().
So ChannelMediaDecoder::Load() doesn't need to call OpenResource(nullptr) at all.
MozReview-Commit-ID: FeARp9fu65L
--HG--
extra : rebase_source : ee3ae9bfa6830ed18fea152e12da18e181870d2d
extra : intermediate-source : 6b78ae143afa325b378d7cc2cbd2e3e0bcfdfe93
extra : source : 098787b9606b70697a3b1762b35a488799995475
We also make it return void since it now always succeeds.
MozReview-Commit-ID: H1oQWoguEzF
--HG--
extra : rebase_source : b5c6714832bed6fceb80c4afcdf4a590cc7dc567
extra : intermediate-source : 01aa9da848391bbf0b39f8dca874c0234f3202fb
extra : source : af04510d8603ffe407069ef342fdb4d3bca33509
Fix the fail by patch1, so we can re-enable it.
MozReview-Commit-ID: It3JkvQzAdk
--HG--
extra : rebase_source : 5ad433012750c8f6c92b16b787e87b32ee03d7a6
For chained ogg files, the new part would contain new timestamp from zero, so
we need to add the duration of previously decoded data to make sure the current
time is correct.
MozReview-Commit-ID: Bb1lCiKz4uQ
--HG--
extra : rebase_source : 5cfd81eb092a042e6394aa5209516ad75e741a37
This changing causes the resampling rate tolerance so that the ME.current time
might not be the same as ME.duration depending on the different resampling rate.
MozReview-Commit-ID: H2dpyw5Bghv
--HG--
extra : rebase_source : 850efb46c7980ec4234e239e38bc7dbb233cd573