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

94 Коммитов

Автор SHA1 Сообщение Дата
Bill McCloskey d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
JW Wang 80c9f230f3 Bug 1359715 - let functions in MediaData.h take TimeUnit instead of int64_t. r=kaku
We want to replace the use of int64_t for microseconds by TimeUnit
whenever possible since int64_t is ambiguous which could be microseconds
or milliseconds.

MozReview-Commit-ID: LRz9d4yKBYJ

--HG--
extra : rebase_source : 1f73f1f338142b3183491d04726821a881ccabbe
extra : intermediate-source : 88e167b7b06303d10d92cd5317502f405d1c553e
extra : source : 98deb30ec93d395f9951f5fc488170ae35e29675
2017-04-24 17:33:05 +08:00
JW Wang 302d82c85a Bug 1356530 - Change the type of MediaData::mTime to TimeUnit since int64_t is ambiguous. r=kaku
MozReview-Commit-ID: 4bVeqIuWO2O

--HG--
extra : rebase_source : d504ac15a6dc59ad42f3ab80faf23f629d74315f
extra : intermediate-source : 6e52995b6c8146451d98dffc62f6907755dc856e
extra : source : 82d2649cdafb5a6389f6858c23578811933580c9
2017-04-14 17:13:36 +08:00
JW Wang 6359124d70 Bug 1355756. P3 - let CreateAndCopyData() and its friends take TimeUnit for duration. r=gerald
MozReview-Commit-ID: ES0on9VCuu3

--HG--
extra : rebase_source : 8d3e80ec2e1923587b5865516a16bfff9009397d
extra : intermediate-source : 3e59c61b1ccef78e3e8fe52791d7104aade7930c
extra : source : 46fd639ea6a2219bbed70f6555a2acf03ec01a7a
2017-04-12 17:46:09 +08:00
JW Wang 464497b945 Bug 1355756. P1 - change the type of MediaData::mDuration to TimeUnit. r=gerald
MozReview-Commit-ID: 3d4bUYtSuMI

--HG--
extra : rebase_source : 94c821b6d381421035e6a12cbe038436055c5822
extra : intermediate-source : 9a06beffc736486f47b9cf05e7f482e726d53068
extra : source : fdbdcd5c1474f04dc1dbde66fcf3a9ecec953053
2017-04-12 17:27:34 +08:00
Chris Pearce 42faf7c8fa Bug 1315850 - Create CDM video decoder in EMEDecoderModule. r=jya
MozReview-Commit-ID: 3xgFxg1WfmY

--HG--
extra : rebase_source : 018abf2b8e1b351a29ba62275a2681fe9ea4fc24
2017-03-08 16:20:09 +13:00
Chris Pearce 756932ea4e Bug 1341894 - Correct encryption subsamples in AVCC -> AnnexB conversion. r=jya
This menas we can have GMPVideoDecoder's AVCC -> AnnexB conversion done by the H264Converter, and
simplify the code in WidevineVideoDecoder.

MozReview-Commit-ID: 3HT5VXth6LL

--HG--
extra : rebase_source : b840489edafa5dc981ba44f722d92083a40e34cd
2017-02-23 11:00:28 +13:00
Jean-Yves Avenard 572d9a0a80 Bug 1339748: P2. Let the MediaDataDecoder tells the format it wants. r=cpearce
MozReview-Commit-ID: 22GEUnwEacd

--HG--
extra : rebase_source : 019627d3ff0ef0430bcaf83a4098ffd62fc53b05
2017-02-17 22:19:55 +01:00
Sebastian Hengst 955ce77a9f Backed out changeset f508a675e8dc (bug 1339748) 2017-02-18 17:36:21 +01:00
Jean-Yves Avenard 1aee5fb0ac Bug 1339748: P2. Let the MediaDataDecoder tells the format it wants. r=cpearce
MozReview-Commit-ID: 22GEUnwEacd

--HG--
extra : rebase_source : ce57fbd3028333485368267955b2645057f54805
2017-02-17 22:19:55 +01:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Jean-Yves Avenard 9b64d77e88 Bug 1334061: P4. Move MediaDataDecoderProxy into wrapper category. r=cpearce
We will later use it for non-EME/GMP related  tasks.

MozReview-Commit-ID: 4rIjviYdYkO

--HG--
rename : dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.cpp => dom/media/platforms/wrappers/MediaDataDecoderProxy.cpp
rename : dom/media/platforms/agnostic/gmp/MediaDataDecoderProxy.h => dom/media/platforms/wrappers/MediaDataDecoderProxy.h
extra : rebase_source : 76a58c03b29b127163ce7fc7a29bc827f63797a9
2017-02-16 10:14:19 +01:00
Jean-Yves Avenard 24676ed7ec Bug 1334061: P3. Make MediaDataDecoderProxy work with no taskqueue. r=cpearce
MediaDataDecoderProxy can now be used to easily override methods of MediaDataDecoder.

MozReview-Commit-ID: 5Uni9sFmi83

--HG--
extra : rebase_source : 03efd0d6a93eb79327350e930f7ef25496320406
2017-02-15 20:12:19 +01:00
Jean-Yves Avenard b43fb544d5 Bug 1334061: P1. Fix headers and coding style. r=gerald
MozReview-Commit-ID: D6ubdaBN0PJ

--HG--
extra : rebase_source : c27f1e5ec4370c1d258aab5bfde4598be9443858
2017-02-15 19:09:29 +01:00
Jean-Yves Avenard 73fd84bc5d Bug 1319987: P5. Promisify MediaDataDecoder. r=cpearce,gerald,mattwoodrow,snorp
This is a big change, and unfortunately impossible to break down with independently functional commits.

There are four main changes being applied here:

* Code cleanup, including making all MediaDataDecoder related code mozilla coding style compliant
* Make MediaDataDecoder use MozPromise
* Making Flush and Shutdown processes fully asynchronous
* Fixing few data races encountered across the code, in particular in the Android PDM

MozReview-Commit-ID: DpiZucGofJT

--HG--
extra : rebase_source : 80bd6c6f9726d536b6f306c40d9af6df27333be9
2017-01-26 13:56:46 +01:00
Jean-Yves Avenard d144f37888 Bug 1319987: P1. Remove handling for WaitingForKey in MFR. r=cpearce
This is not compatible with promise based decoders. We'll re-implement it in a different fashion later on.

MozReview-Commit-ID: HYBNKVxEUmB

--HG--
extra : rebase_source : fe9f26e47b77a64099a422be844d20f4108663d0
2016-12-20 18:53:39 +11:00
Bevis Tseng f2bdbd8fd1 Bug 1314833 - Part 2.1: Factor out AbstractThread::MainThread() used in Media Playback. r=billm,jwwang
MozReview-Commit-ID: 9yJi3iDtVZG

--HG--
extra : rebase_source : 39c720ccc576ed9247b5e8abb70d99d7873b3ad6
2016-11-29 13:03:36 +08:00
Chris Pearce af0e6c4ab5 Bug 1329543 - Remove PGMPAudioDecoder. r=gerald
MozReview-Commit-ID: nwW4s4MtJX

--HG--
extra : rebase_source : 95079ac628f301f8ceb8b5540c7ea95a15deb931
2017-01-14 16:14:32 +08:00
Chris Pearce 6265ff2efa Bug 1329543 - Remove GMPAudioDecoder and unencrypted GMP decoding. r=gerald
MozReview-Commit-ID: JLlHmyEg6Qo

--HG--
extra : rebase_source : c7b17efed0b24ed0aec075de144d306c985bddec
2017-01-14 11:44:41 +08:00
Chris Pearce 95c18b7326 Bug 1329543 - Remove kEMEKeySystemPrimetime. r=gerald
MozReview-Commit-ID: FNvnpZVPMMt

--HG--
extra : rebase_source : c65d007a9894830bd3b85638dcc8c37b5f36fed5
2017-01-14 11:26:37 +08:00
Chris Pearce 1b21fde486 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : d678628dec67a059aec06918f07ea93ecc54a5f9
2016-11-14 11:07:02 +13:00
Iris Hsiao 891306a89a Backed out changeset 9343cb73c218 (bug 1306314) 2016-11-14 11:07:28 +08:00
Chris Pearce 5926bef365 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : 6f1db4a019deaedac07fa15c1958270268dcb941
2016-11-14 11:07:02 +13:00
Chris Pearce 5cba5b5a25 Bug 1314858 - Refactor multiple callers of HasPluginForAPI into a helper. r=gerald
I've repeated myself a few times, so make a helper to make determining which
GMPs are available easier.

MozReview-Commit-ID: 2fFLeaA5o8u

--HG--
extra : rebase_source : 74ea0b429d339273535610df3bbd7fec7beae469
2016-11-03 14:33:31 +13:00
Chris Pearce 7250493ddc Bug 1314858 - Remove GMPDecoderModule::UpdateUsableCodecs. r=gerald
MozReview-Commit-ID: 7678JImLL9T

--HG--
extra : rebase_source : 77cd678431669cc3932cfaabc7034e546b92166c
2016-11-02 15:31:21 +13:00
Chris Pearce 776ec7bfa9 Bug 1314858 - Make GMPDecoderModule::SupportsMimeType call GMPService::HasPluginForAPI() directly. r=gerald
MozReview-Commit-ID: 3VblaPbTQFJ

--HG--
extra : rebase_source : 6f66e97cb22fa8f92a2d26adffeba60ec8a30936
2016-11-02 10:04:39 +13:00
JW Wang a92f42e8f7 Bug 1313557 - remove the assertion from InternalInit() to avoid data race. r=jya
MozReview-Commit-ID: B9GCHOjMqVf

--HG--
extra : rebase_source : da1d80dc1d8f3a34a826192e0bcd146a54c11a8f
2016-10-28 11:43:03 +08:00
Matt Woodrow a36eef926a Bug 1300682 - Part 5: Use KnowsCompositor to initialize decoders and create one for VideoDecoderParent to use. r=nical,jya 2016-10-07 21:13:33 +13:00
Jean-Yves Avenard 40284ca39a Bug 1303673: P9. Make some GMP errors non fatal. r=cpearce
MozReview-Commit-ID: LMWQtJElle7

--HG--
extra : rebase_source : 02e9a30cf049d26b6e7f7f78c98d8b595a72cac5
2016-09-20 16:56:58 +10:00
Jean-Yves Avenard 485daa6ea7 Bug 1303673: P4. Provide GMP error code in MediaResult. r=cpearce
MozReview-Commit-ID: LfXNfMymvk4

--HG--
extra : rebase_source : 12c1bf1fe0245802429bbbbf75910f2906fde9f2
2016-09-20 15:57:32 +10:00
Jean-Yves Avenard 70ed5282de Bug 1299072: P18. Use MediaResult with InitPromise. r=gerald
MozReview-Commit-ID: JiLgiyxvfNC

--HG--
extra : rebase_source : 4cc453a5fe7b1e4f4b865c31a24a5feed64df7e4
2016-09-13 13:06:18 +10:00
Jean-Yves Avenard f4efa8be06 Bug 1299072: P4. Return extended failure details to reader. r=gerald
We provide even further details for the GMP decoder. Other decoders to follow.

MozReview-Commit-ID: 7NxJPec8xWv

--HG--
extra : rebase_source : f44120983070e5c107ecd5cafc762da90aab44bf
2016-09-10 09:56:53 +10:00
Matt Woodrow 99bf9b18df Bug 1301294 - Remove unnecessary nsresult return value from MediaDataDecoder interface. r=jya 2016-09-09 15:50:37 +12:00
JW Wang d13f41c2a0 Bug 1294616 - Somewhat improve the string performance by defining string literals whose length is known at compile time. r=cpearce
MozReview-Commit-ID: LAlqMDtGQN7

--HG--
extra : rebase_source : 4f2cdc9cb9ee7e4dd024d47dad329304f6ba70ae
extra : source : 6db22a524b1452fc50bf56535e7c619a8441dcfe
2016-08-15 15:41:53 +08:00
Bryce Van Dyk bf4a449efb Bug 1145011 - Implement waitingforkey event. r=jya
Bubble information from SamplesWaitingForKey to an HTMLMediaElement so that we
can emit a waitingForKey event. If we are unable to decode more samples due to
needing a key the event will be signalled. See
http://w3c.github.io/encrypted-media/#dom-evt-waitingforkey for more information
on this event.

The code in place before this patch handles updating readyState when we are
waiting for a key, this patch adds the event which should be emitted in such a
case. The spec defines certain preconditions should be the case before running
the algo to emit this event. For example, the element should potentially be
playing, and it should have at least HAVE_FUTURE_DATA ready state. This is not
strictly true for when the new code is run, due how existing code handles ready
state. We are honoring the spirit of the spec, though the letter of the spec is
lightly gone against in the handling of the preconditions.

MozReview-Commit-ID: LKlDd4wkRSE

--HG--
extra : rebase_source : 2c61fc41636e430afa23240ad5d26c886124d87f
2016-08-22 08:51:01 +12:00
James Cheng 21f18593ca Bug 1295920 - Replace enum with enum class in PlatformDecoderModule.h. r=jya
MozReview-Commit-ID: lDjsTI82pV

--HG--
extra : rebase_source : 9ec7b89e3af8fe0e50ea4bb48d464367e49c86c4
2016-08-17 17:24:13 +08:00
James Cheng 0593e89ea0 Bug 1293194 - Building with --disable-eme fails with GMPDecoderModule.cpp:15:30: fatal error: mozilla/EMEUtils.h: No such file or directory. r=cpearce
MozReview-Commit-ID: VUGdiaLqkV

--HG--
extra : rebase_source : 3439ba2f7a81ad80f9db514f21c6091cc3e5711a
2016-08-09 12:13:30 +08:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Matt Woodrow f323872778 Bug 1292032 - Clean up VideoData static constructor methods. r=jya
--HG--
extra : rebase_source : e025c9a15ad00e970f9027f72c78b5d6effbc301
2016-08-04 15:31:52 +12:00
Bryce Van Dyk dc49694098 Bug 1290284 - Centralise string comparisons for H264 and VPX detection. r=cpearce
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
2016-07-29 14:12:54 +12:00
Bryce Van Dyk e06afda01b Bug 1279077 - Update GMP/EME path to support webm. r=cpearce
Update handling of VP8, VP9 to enable decryption and decoding via widevine.
Update handling with further validation to make sure that invalid video types
are rejected when trying to create widevine decryptor session or init widevine
decoders.

MozReview-Commit-ID: 8FOvUJfxr6L

--HG--
extra : rebase_source : 0f6aed8256d7f106a598b09e6f11efe80f0e4bb2
2016-07-29 15:53:22 +12:00
James Cheng 240e465d99 Bug 1288320 - Define each keysystem string as specific identifier instead of placing some.keysystem everywhere. r=cpearce
MozReview-Commit-ID: 1bwPRhMOawu

--HG--
extra : amend_source : 7550352f178c0082484acdd342db05ed0dc02e23
extra : transplant_source : %96%C1%B9%8B%28%B0%96f%8AM%AA%13T%1E%3Bg%98%96%92%C1
2016-07-27 16:07:46 +08:00
Gerald Squelart 371109fa03 Bug 1289378 - Fix inter-locking in PDMFactory+GMPDecoderModule - r=jya
Say PDMFactory::EnsureInit() runs on the main thread (effectively locking it)
and then tries to lock sMonitor; if another thread was also running
EnsureInit() and locked sMonitor, it will dead-lock when trying to sync-
dispatch the GMPDecoderModule creation to the main thread.

This can be fixed by ensuring that the actual PDMFactory instance creation is
always done on the main thread (and that we don't hold sMonitor before
dispatching to the main thread.)

Note that we can now simplify GMPDecoderModule::Init and assert we are already
on the main thread.

MozReview-Commit-ID: 8xHpoymw6po

--HG--
extra : rebase_source : aabc1f4768aebdd16873bbc1afdd1679d90aed6f
2016-07-27 12:43:33 +10:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
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
2016-07-14 10:16:42 -06:00
Chris Pearce de045590ac Bug 1267918 - Add GMPCrashHelper for HTMLMediaElement. r=gerald
This ensures that unencrypted GMP decoding crash reporting works.

MozReview-Commit-ID: 84TAV5F9Ie0

--HG--
extra : rebase_source : c0bf3021be9fa0833a7b375967572f1019e4e279
2016-06-29 11:42:07 +12:00
Chris Pearce e0a9078a6f Bug 1267918 - Add GMPCrashHelper to GMPService::GetGMP* functions. r=gerald
This enables callers to specify a way to determine the correct window to
dispatch the PluginCrashed event to should the GMP actor crash.

We need a way to determine the correct window at crash time, as the GMP's
window can change at runtime. For example, if the GMP is being used for
unencrypted decoding, the <video> element can be moved to a new browser window
at runtime.

Note: I don't handle disconnecting the GMPCrashHandlers in this patch; we do
delete the GMPCrashHandlers in this patch when their associated GMP crashes, and
in the next patch we handle disconnecting GMPCrashHandlers in the case where
we don't crash.

MozReview-Commit-ID: DrwcZAB6Ys0

--HG--
extra : rebase_source : 8da188b68456914773e6adae8cbccd6bf6a6e7a7
2016-06-29 11:41:56 +12:00
Dan Glastonbury 3224020227 Bug 1281632 - P6: Extract parameters to GMPAudioDecoder into struct. r=gerald
MozReview-Commit-ID: 7UXY5uEQUtj

--HG--
extra : rebase_source : 1f947526ab0bfafe8e7859627473ba578cdb4f87
2016-06-28 17:56:56 +12:00
Dan Glastonbury 55f422c73a Bug 1281632 - P5: Extract parameters to GMPVideoDecoder into struct. r=gerald
MozReview-Commit-ID: UICBFgDHBm

--HG--
extra : rebase_source : b411444ccc7fce9587fa43a0dcefac46cfe98486
2016-06-28 17:56:56 +12:00
Dan Glastonbury 5de2ec4fa5 Bug 1281632 - P2: Reduce GMPAudioDecoder/GMPVideoDecoder ctor count. r=gerald
This means we expose fewer constructors, and the definition is in the .cpp file
so changing it won't cause lots of things to recompile.

MozReview-Commit-ID: DY7UCYfOb25

--HG--
extra : rebase_source : b753c87d00cafc897749d9d7a550ee0cccb59ddf
2016-06-28 17:56:55 +12:00
Dan Glastonbury 1b2a65cfc3 Bug 1281632 - P1: Extract creation parameters and pass via struct. r=gerald
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
2016-06-28 17:56:55 +12:00