Граф коммитов

6150 Коммитов

Автор SHA1 Сообщение Дата
Peter Chang b9897cc163 Bug 1263499 - unify the QuickExit function, r=bsmedberg
MozReview-Commit-ID: DGJbyXULHPe

--HG--
extra : rebase_source : 26ad1fdc609060a578a27f3d44168160ec026c09
2016-04-11 16:12:33 +08:00
Eugen Sawin 12a4b44c2d Bug 1262456 - [1.1] Prevent interruption of the decoder shutdown procedure and early shutdown return. r=snorp 2016-04-12 22:21:51 +02:00
Milan Sreckovic e0b2b9e425 Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt

--HG--
extra : rebase_source : 4988f3f488c19dd35a9979e96f78a5511ee8f3d2
2016-04-12 15:18:11 -04:00
Thomas Zimmermann 448805f444 Bug 1262808: Fix use of |PrincipleHandle| in |MediaEngineGonkVideoSource| r=rjesup 2016-04-12 16:54:43 +02:00
Thomas Zimmermann d08ecacecf Bug 1262808: Refactor |PrincipalID| to |PrincipalHandle| in Gonk media code, r=rjesup
This patch renames |PrincipalID| to |PrincipalHandle| and fixes related
media code of Gonk.
2016-04-12 16:54:41 +02:00
JW Wang 753cf80b90 Bug 1259473 - per comment 14, move actions involving |this| to Init() from the constructor. r=jya. 2016-04-01 23:10:44 +08:00
Jean-Yves Avenard 266289f844 Bug 1262746: P3. Remove DownmixAudioToStereo method. r=rillian
Functionality is now provided through AudioConverter class.

MozReview-Commit-ID: 5MchZT1XRoO

--HG--
extra : rebase_source : 270581b49043f102a89e5eea97195379a937da22
2016-04-08 17:42:00 +10:00
Jean-Yves Avenard 698b349cd9 Bug 1262746: P2. Use AudioConvert in AudioStream to downmix samples. r=jwwang
MozReview-Commit-ID: 4jgKR8xw1dc

--HG--
extra : rebase_source : 68c2e488eac40edcd91416447ba85b823b3bd8ad
2016-04-08 17:37:31 +10:00
Jean-Yves Avenard 26e3402cf4 Bug 1262746: P1. Add downmixing capabilities to AudioConverter. r=rillian
This is using the same downmixer algorithm as found in the ogg reader.

MozReview-Commit-ID: 5KwVLPOg7Tt

--HG--
extra : rebase_source : 523979251421c49ddd05b90498d2ec8eb3309b94
2016-04-08 17:32:57 +10:00
Kirk Steuber 1daae03f6b Bug 1245256 - Added Widevine playback test plus other shaka-player playback tests. r=spohl
MozReview-Commit-ID: Hh3KVlV1CNj
2016-04-06 18:21:58 -07:00
Chris Pearce 753e89fc45 Bug 1245789 - Expose AsyncAddPluginDirectory on GMPServiceParent. r=gerald
Now that adding GMPs to the GMP service is async under the hood, for safety
the GeckoMediaPluginServiceParent needs to expose when adding a GMP
has finished so that things that depend on GMPs being present can be reliable.
For example, the call to GMPDecoderModule::UpdateUsableCodecs() that happens
at the end of AddPluginDirectory depends on the GMPs being up to date, so it
needs to happen after the add has finished.

MozReview-Commit-ID: Fn8b0GNILNg
2016-04-12 16:12:22 +12:00
Chris Pearce 1286c752d4 Bug 1245789 - Ensure GMP service has added all plugins before running GMP remove tests. r=gerald
MozReview-Commit-ID: 488sYVQbS4x
2016-04-12 16:12:22 +12:00
Chris Pearce 4038e1e9d9 Bug 1245789 - Ensure GMPs have finished loading from MOZ_GMP_PATH before GMPServiceParent::GetContentParentFrom returns. r=gerald
This means we wait for the GMP service to have finished detecting all available
GMPs from the environment before we start creating GMP actors. Without this, we
get gtest failures due to gtests trying to create GMP actors before the async
GMPServiceParent::LoadFromEnvironment() has completed, i.e. we fail to create
actors because we've not had a chance to setup the GMPParent capabilities yet.


MozReview-Commit-ID: Hl4o1c4QthJ
2016-04-12 16:12:22 +12:00
Chris Pearce c96ec15fb4 Bug 1245789 - Change GMPParent::InitPromise to instead use GenericPromise as defined in MozPromise.h. r=gerald
This makes it easier to chain promises returned by GMPParent::Init() with calls
to GMPServiceParent::LoadFromEnvironment() in the next patch.

MozReview-Commit-ID: KdGVvzAedJW
2016-04-12 16:12:22 +12:00
Chris Pearce 4eaf999528 Bug 1245789 - Make XPCOMThreadWrapper::GetCurrent() work. r=bholley
XPCOMThreadWrapper::GetCurrent() is failing because it's not keeping
AbstractThread::sCurrentThreadTLS up to date. This causes assertion failures
during startup of the GMP stack when dispatching via InvokeAsync to the GMP
thread, which is an XPCOM thread wrapped by the XPCOMThreadWrapper.

We can trivially initialize AbstractThread::sCurrentThreadTLS to be the
XPCOMThreadWrapper on the target thread, since it's thread-local-storage, and
the target thread won't change.

MozReview-Commit-ID: EIEFZppR2PS
2016-04-12 16:12:22 +12:00
Chris Pearce a7ef15b6b8 Bug 1245789 - Reject MediaKeys requests for Widevine if we don't have a platform AAC decoder. r=gerald
The Widevine CDM does not have an AAC decoder. It can however decrypt audio
streams. It's our policy to not decode AAC streams decrypted by the Widevine
CDM with the Adobe GMP's unencrypted decoding functionality. So reject
MediaKeySystemAccess requests for Widevine if we don't have a system AAC
decoder that we can use.

MozReview-Commit-ID: Ltq52wT1qno
2016-04-12 16:12:22 +12:00
Chris Pearce 2c831f28f4 Bug 1245789 - Push detection of WMF decoding for clearkey into GMPParent to simplify request media key system access logic. r=gerald
The logic in MediaKeySystemAccess is convoluted because it needs to keep
checking whether we're servicing a clearkey request and whether WMF is
available for gmp-clearkey to decode with. If we instead push those checks down
into GMPParent at the time where we parse the GMP info file, we can just not add
the decode capability to the GMPParent, and can remove the special cases in
MediaKeySystemAccess. This simplifies adding the (similar) special cases for
Widevine in the next patch.

MozReview-Commit-ID: IKD5LU86zIv
2016-04-12 16:12:22 +12:00
Chris Pearce 1fbf846737 Bug 1245789 - Use ifdef MOZ_WIDEVINE_EME to prevent compilation when not enabled. r=gerald
This means we won't try to build it when ac_add_options --enable-eme=widevine is
not present, and critically, we won't try to build it on Android, since the Chromium
Widevine plugin isn't available there.

MozReview-Commit-ID: 1jQvAbJP8HG
2016-04-12 16:12:21 +12:00
Chris Pearce 581bf9fd48 Bug 1245789 - Added support for --enable-eme=widevine and expose MOZ_$(keySystem)_EME in dom/media/{eme,gmp}. r=glandium
We need to not build Widevine by default, and when enabled we will need to be able to
ifdef on MOZ_WIDEVINE_EME (see next patch) so that we can not build the code on platforms
where it can't possibly work (Android specifcally, as Widevine isn't available as a
Chromium plugin there).



MozReview-Commit-ID: Avgz5NRcl9v
2016-02-26 14:01:41 +13:00
Chris Pearce da09cd13c1 Bug 1245789 - Ensure Widevine's nodeId are always unique and not permitted persistent storage. r=gerald
This ensures that we don't try to use one GMP instance to service multiple same-origin MediaKeys'
CDM access, as the Widevine CDM's Chromium interface is synchronous, so it doesn't handle running
multiple decoders well. Multiple same-origin GMPs can't safely use the same storage concurrently,
but thankfully Widevine doesn't require persistent storage, so we can just disallow that entirely
and avoid the problem.


MozReview-Commit-ID: 78I4IIGgHRA
2016-04-12 16:12:21 +12:00
Chris Pearce f744c99d0c Bug 1245789 - Send name of GMPAdapter over to GMP process in StartPlugin message. r=gerald
This lets the GMPChild know whether it needs to instantiate the WidevineAdapter.

MozReview-Commit-ID: 5X6IrRZPHdu
2016-04-12 16:12:21 +12:00
Chris Pearce c4ed00c030 Bug 1245789 - Parse Chrome CDM manifest in GMPService.addPluginDir. r=gerald
This has to happen on the main thread, as WebIDL parsing only happens there.
So it has to be async.

MozReview-Commit-ID: AfAoSkQAhl3
2016-04-12 16:12:21 +12:00
Chris Pearce 446a1fe1c6 Bug 1245789 - Store GMPCapabilities by value, rather than on the heap. r=gerald
MozReview-Commit-ID: 6B2IpUEqHlQ
2016-04-12 16:12:21 +12:00
Chris Pearce 694f3fc693 Bug 1245789 - Make GMPParent::Init() return a promise, so it can be async. r=gerald
This means that when initializing the Widevine CDM, we will be able to asynchronously
parse its manifest.json on the main thread, as the WebIDL JSON parser only runs there.

MozReview-Commit-ID: GI1sc4x4m16
2016-04-12 16:12:21 +12:00
Chris Pearce 67f4ed3368 Bug 1245789 - Add abstract thread wrapper for the GMP thread. r=gerald
I need to make GMPParent::Init() async, because the WebIDL JSON parsing
must happen on the main thread, and GMPParent::Init() is called on the
GMP thread, so I need GMPParent::Init() to be async so that in the
Chrome manifest case it can dispatch a task to the main thread to parse
the Chrome manifest before completing. So I'll make GMPParent::Init()
return a promise, and to do that, I need the GMP thread to have an
AbstractThread wrapper.

MozReview-Commit-ID: 44b4Z4jpar8
2016-04-12 16:12:20 +12:00
Chris Pearce 1a971257c4 Bug 1245789 - Add Widevine CDM -> GMP adapter. r=gerald
Add a GMPAdapter implementation that adapts the Widevine Chrome CDM to
the GeckoMediaPlugin API. We're still allocating memory for video frames
in non shmem buffers, and copying them over to a shmem before returning
them to Gecko, we can fix that at a later date. I hook this adapter up
in a later patch in the series.


MozReview-Commit-ID: 7iSFODVWPu3
2016-04-12 16:12:20 +12:00
Chris Pearce f706b0c753 Bug 1245789 - Add GMPAdapter which can be passed to GMPLoader to adapt non GMP library to GMP API. r=gerald
This means we can pass a non GMP library to GMPLoader::Load() and the adapter will make it usable.


MozReview-Commit-ID: GihjX2JRw3l
2016-04-12 16:12:20 +12:00
Chris Pearce 85c4260134 Bug 1245789 - Add Widevine KeySystem to EME. r=gerald
This means we recognize the keysystem string in our APIs.

MozReview-Commit-ID: E3KU3JTihcr
2016-04-12 16:12:20 +12:00
Chris Pearce 2a0d4dd3a3 Bug 1245789 - Handle unencrypted samples in encrypted media. r=gerald
Some encrypted MP4 files lack subsample info for some samples, so we need this check
to prevent us crashing on such files.

MozReview-Commit-ID: AXqOCAlb7IY
2016-04-12 16:12:20 +12:00
Chris Pearce 78b35c32d6 Bug 1245789 - Use frame size not display size in GMPVideoDecoder. r=kinetik
The Widevine CDM must use the frame size we pass in, as without this change some (but not all) EME
sites don't work.

MozReview-Commit-ID: 43BSMp72TXK
2016-04-12 16:12:20 +12:00
Jean-Yves Avenard b786ae484f Bug 1248861: P12. Update AudioCompactor to account for alignment padding. r=rillian
MozReview-Commit-ID: 2e9oUthWW4C

--HG--
extra : rebase_source : 30b370fc73e924c71c4f778913bebbace9505455
2016-04-09 21:11:16 +10:00
Jean-Yves Avenard 73b4e33df1 Bug 1248861: P11. Fix current downmixer. r=rillian
Current downmixer was using vorbis channel order (which isn't surprising as it was extracted from the Ogg reader).
Make it use SMPTE order as that's now what all MediaDataDecoder output.

MozReview-Commit-ID: 5Kf7UnC52wL

--HG--
extra : rebase_source : 1848ffac58b854c7886871a0ff3dadbc92e111a2
2016-04-06 14:52:49 +10:00
Jean-Yves Avenard efaaf786d6 Bug 1248861: P10. Ensure opus decoder channel layout is always in SMPTE order. r=rillian
MozReview-Commit-ID: BDZ25pXJQWa

--HG--
extra : rebase_source : 5ce15f24aab67c026794af2afb32c61ca171d707
2016-04-05 23:35:31 +10:00
Jean-Yves Avenard f586d2251b Bug 1248861: P9. Use ChannelLayout::MappingTable. r=gerald
MozReview-Commit-ID: 63584qWSKrs

--HG--
extra : rebase_source : 8337aadc084d0ed3235a15bb3167c0ef6d9e3bae
2016-04-07 15:26:20 +10:00
Jean-Yves Avenard 88bbc1f392 Bug 1248861: P8. Added ChannelLayout::MappingTable method. r=gerald
MozReview-Commit-ID: 5kRa08TpGTX

--HG--
extra : rebase_source : a3a0a24c749901002788e2ddc44c26931094bfca
2016-04-07 15:11:59 +10:00
Jean-Yves Avenard 0a33a8a5b9 Bug 1248861: P7. Ensure vorbis decoder channel layout is always in SMPTE order. r=rillian
MozReview-Commit-ID: GAqnJbQuqQU

--HG--
extra : rebase_source : b1eb0ac7b6ec453a8e87ef584df61049482c0fdb
2016-04-05 23:14:34 +10:00
Jean-Yves Avenard e113225273 Bug 1248861: P6. Ensure AT decoder channel layout is always in SMPTE order. r=rillian
MozReview-Commit-ID: 9XfzxdiQ3Zu

--HG--
extra : rebase_source : 25931bcbb54d399200e98ca3488ab3ec1810adcd
2016-04-05 08:24:16 +10:00
Jean-Yves Avenard 4b33cb8216 Bug 1248861: P5. Add AudioConverter class and relatives. r=cpearce
To be used in combination with AudioDataBuffer class that will be able to perform format conversion.
Can currently only perform channel re-ordering.

Future use will add downmixing, upmixing and resampling capabilities.

MozReview-Commit-ID: 2FBu9aRVtgj

--HG--
extra : rebase_source : 366178114b2bd3da40b247ae0fbe1e04cf83e452
2016-04-04 18:22:05 +10:00
Jean-Yves Avenard aca16336fe Bug 1248861: P4. Add AudioConfig and introduce channel layout definition. r=cpearce
Long term goal would be to merge AudioConfig with the existing AudioInfo class which doesn't provide sufficient data to properly determine how to play multichannel audio.

MozReview-Commit-ID: 3UDpZWPBUvS

--HG--
extra : rebase_source : 0643fdba0a6decf4f76c42f40bbb1b237e3e0300
2016-04-06 10:20:42 +10:00
Jean-Yves Avenard 6409e5ed1a Bug 1248861: P3. Use AlignedAudioBuffer object with AudioData. r=cpearce
MozReview-Commit-ID: 7HiF4eHlRwB

--HG--
extra : rebase_source : e7fd44ced280ccc359f61b7e5668e5481bb7ecb9
2016-04-03 23:09:45 +10:00
Jean-Yves Avenard 24930cd8ab Bug 1248861: P2. Use AlignedByteBuffer with MediaRawData. r=cpearce
MozReview-Commit-ID: BGzpFEAisvE

--HG--
extra : rebase_source : 7140a2d637ffe477db7e050a130ecf7ca6eacb44
2016-04-03 21:05:23 +10:00
Jean-Yves Avenard c186f77a84 Bug 1248861: P1. Add AlignedBuffer template class. r=cpearce
Along with AlignedByteBuffer and AlignedFloatBuffer

MozReview-Commit-ID: LmGc2JDBETi

--HG--
extra : rebase_source : b1091188870f0cfbfebcacad940504b02bc7c1dc
2016-04-03 19:25:21 +10:00
Randell Jesup ac06812534 Bug 1263738: Add fake:true to getUserMedia() use in a Crashtest r=jib
MozReview-Commit-ID: 2dLglIUFSVQ
2016-04-11 17:30:37 -04:00
Jan Henning e1bbdff4b6 Bug 1263334 - Check VBR header is valid before using it for duration calculations. r=esawin
MozReview-Commit-ID: KPrn5WeXUuF

--HG--
extra : transplant_source : E%89%8Cs%1BG%28y%B82%3E%F8%CB%A8Q%B3%1F%EB%94%C2
2016-04-09 20:38:45 +02:00
Paul Adenot f57cd3383d Bug 1260745 - Null-check the `friendly_name` field in a `cubeb_device`. r=jesup
They can be null, according to the cubeb API.

MozReview-Commit-ID: FOKG2kTy9NX

--HG--
extra : rebase_source : 256101a51f7ae24dd073a3dcbf3b94af22b4db94
2016-03-30 16:47:02 +02:00
Jean-Yves Avenard 778f74db59 Bug 1262727: [webm] Ensure first frame returned after seek is a keyframe. r=kinetik
Same after a reset or the first frame ever returned by the demuxer.

MozReview-Commit-ID: 6b7XlIk5GE4

--HG--
extra : rebase_source : 7e7b92c2ed7ea6973ad3869477b3110925a64525
2016-04-07 17:40:16 +10:00
Ryan VanderMeulen bb5308d31a Merge m-c to inbound. a=merge 2016-04-09 10:08:57 -04:00
Ryan VanderMeulen bf239fcfbd Bug 1209280 - Skip test_peerConnection_twoVideoTracksInOneStream.html on Android due to frequent failures. a=test-only 2016-04-09 09:57:39 -04:00
Kaku Kuo fef7021219 Bug 1261312 - Make sure that audio/video decode task is filed again. r=jwwang
The idea is that we can call Ensure{Audio/Video}DecodeTaskQueued() directly
since the conditions in the DispatchDecodeTasksIfNeeded() have already been
checked.

MozReview-Commit-ID: 9xataQiuSIx

--HG--
extra : transplant_source : %E4t%20%1FV%12%FE%08%9Cx%D7%0A%C3C%B0M%14%80%E4%85
2016-04-07 15:18:17 +08:00
Kilik Kuo 89ac1fb7b9 Bug 1256186 - Part 3: Remove the temporary solution which ignores MediaKeySystemStatus::Cdm_not_supported. r=jwwang
MozReview-Commit-ID: Jny48PqVFYR
2016-04-06 00:09:32 +08:00