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

254 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

Differential Revision: https://phabricator.services.mozilla.com/D36396

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Tarek Ziadé c48befbb9c Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug,jya
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-27 16:15:33 +00:00
shindli 9134ad98fa Backed out changeset c386ebfd9c6b (bug 1542674) as per tarek's request on IRC 2019-05-07 15:07:27 +03:00
Tarek Ziadé 446d5cdff7 Bug 1542674 - Make Media debug info machine parsable r=padenot,smaug
This patch structurizes the media debug information via webidl dictionaries
that are returned by HTMLMediaElement::GetMozRequestDebugInfo() and
MediaSource::GetMozDebugReaderData().

Differential Revision: https://phabricator.services.mozilla.com/D27893

--HG--
extra : moz-landing-system : lando
2019-05-06 16:39:58 +00:00
Jean-Yves Avenard 964cc95e13 Bug 1524890 - P5. Make MediaData::Type an enum class. r=bryce
Make its use more explicit and less likely to be incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D20163

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:18 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bryce Van Dyk fa9d86fda5 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec: the scheme implies mode. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec --
  possibly if the isProtected flag which we were tracking with mMode, is
  ever changed to be more than a bool in the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

Differential Revision: https://phabricator.services.mozilla.com/D15874

--HG--
extra : moz-landing-system : lando
2019-01-11 15:29:45 +00:00
Cosmin Sabou 15939f75f2 Backed out 6 changesets (bug 1487416) for causing Android build bustages on RemoteDataDecoder.cpp. CLOSED TREE
Backed out changeset 05bcc598e9fb (bug 1487416)
Backed out changeset b99936efbbc9 (bug 1487416)
Backed out changeset ee55b284223e (bug 1487416)
Backed out changeset d25449127f8f (bug 1487416)
Backed out changeset f7c201b7f9bc (bug 1487416)
Backed out changeset 233aedc8b42e (bug 1487416)
2019-01-10 23:37:20 +02:00
Bryce Van Dyk 1a3a965df3 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec of implementation. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

Differential Revision: https://phabricator.services.mozilla.com/D15874

--HG--
extra : moz-landing-system : lando
2019-01-10 18:37:48 +00:00
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard 31ed9de297 Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
Make thorough use of move semantic for MozPromise using nsTArray

Differential Revision: https://phabricator.services.mozilla.com/D11346

--HG--
extra : moz-landing-system : lando
2018-11-09 15:45:31 +00:00
Dorel Luca c34d2cd0fa Backed out changeset 157be32d85fe (bug 1504643) for conflicts while backing out bug 1471535 2018-11-09 12:13:54 +02:00
Jean-Yves Avenard c30e8ca9f0 Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
Make thorough use of move semantic for MozPromise using nsTArray

Differential Revision: https://phabricator.services.mozilla.com/D11346

--HG--
extra : moz-landing-system : lando
2018-11-09 08:41:45 +00:00
Jean-Yves Avenard 6c63270a37 Bug 1322234 - P2. When first frame decoding failed with hardware decoder, fall back to software decoding r=bryce
Continuing on the infrastructure provided by bug 1363668 we will now forcibly disable hardware decoding if the first frame failed to decode with a hardware accelerated decoder.

Depends on D7615

Differential Revision: https://phabricator.services.mozilla.com/D7616

--HG--
extra : moz-landing-system : lando
2018-10-04 09:43:24 +00:00
Jean-Yves Avenard 96925b4ff4 Bug 1495735 - Properly report updated media details. r=bryce
Also fix a long-term data race where we could read and write on mInfo.{mVideo,mAudio} on different task queues.

Differential Revision: https://phabricator.services.mozilla.com/D7484

--HG--
extra : moz-landing-system : lando
2018-10-03 08:23:08 +00:00
Jean-Yves Avenard 09c18364f7 Bug 1454630 - P2. Use new PDMFactory whenever encryption type change. r=bryce,cpearce
If the content being played was first non-encrypted, the PDMFactory would have been set without a CDMProxy. As such, it is necessary to use a new PDMFactory when the encryption type changes (from clear to encrypted).

Rather than attempting to detect if the encryption status has changed, simply use two PDMFactory, one with CDMProxy set and one without (for clear content)

Also, never attempt to recycle a decoder if the encryption type changed (used only on Android)

The TrackBuffersManager would have already handle the dispatching of the encrypted event when parsing the new init segment. As such, nothing more is necessary.

MozReview-Commit-ID: Jn14P2F6N5V

--HG--
extra : rebase_source : afe254fa8c4b835b15d9d48bb52d832f28196b7e
2018-05-27 18:42:25 +02:00
Jean-Yves Avenard b0af7c4063 Bug 1454630 - P1. Simplify retrieval of current TrackInfo. r=bryce
Adding some documentation to clarify on the difference between mInfo and mOriginalInfo

MozReview-Commit-ID: DWBsoi16QKf

--HG--
extra : rebase_source : 719c17b9ce61efdb633db108230f1bf78773ee51
2018-05-26 21:21:45 +02:00
Nicholas Nethercote 51f2b494ea Bug 1448222 - Remove MediaPrefs. r=jya
This patch converts all the prefs in MediaPrefs to the new StaticPrefs system.

Note that the "media.wmf.skip-blacklist" pref was present in both MediaPrefs
and gfxPrefs. The copy in MediaPrefs was never used; this explains why this
patch does not add an entry for it to StaticPrefList.h.

Note also that the patch removes themedia.rust.mp4parser pref, because it's
unused.

MozReview-Commit-ID: IfHP37NbIjY

--HG--
extra : rebase_source : df84ea813b7c366d7be663c696891325610149c8
2018-03-20 09:48:56 +11:00
Gerald Squelart 1b357db99b Bug 1407810 - Use DDLogger in media stack - r=jwwang
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
2017-10-10 17:55:27 +11:00
Kilik Kuo 426964efd1 Bug 1313449 - Refactor the condition for resolving the waiting promise. r=jya
The WaitForDataPromise cannot be resolved even when key has been updated and decode request has be resolved.
2 ScheduleUpdate(NotifyTrackDemuxer, NotifyNewOutput) are merged into 1 so that only mReceivedNewData is set to false again but MFR will
never have a chance to trigger another Update to call CancelWaitingForKey.
By refactoring the condition to resolve the WaitForDataPromise, MDSM is able to request new data and MFR is able to cancel waitingforkey then continue the flow.

MozReview-Commit-ID: 31brwzOoUvF

--HG--
extra : rebase_source : 8caf8b426dd693e2806ebb8a059a3b91026d7f52
2017-11-14 15:20:08 +08:00
Kilik Kuo f59b425307 Bug 1395922 - [P4] Make MDSM enter buffering state when MediaKeys is removed and resume the playback if setting same MediaKeys back. r=cpearce,jya
MozReview-Commit-ID: KdmeGqoVgak

--HG--
extra : rebase_source : 6c6d033db11a8d3808e08796f32ee72ffdd03aea
2017-11-03 20:14:49 +08:00
Kilik Kuo e785f1055a Bug 1395922 - [P2] Make MediaFormatReader::SetCDMProxy asynchronously with a promise. r=cpearce,jya
MozReview-Commit-ID: 7RarmmlA0lo

--HG--
extra : rebase_source : b9c2aa4489b999b84b6367329d732936822e5dea
2017-11-03 20:12:39 +08:00
Csoregi Natalia 6bf19d4921 Backed out 6 changesets (bug 1395922) for failing Media tests test_eme_sample_groups_playback.html and test_eme_sample_groups_playback.html r=backout a=backout
Backed out changeset f856af63682e (bug 1395922)
Backed out changeset f59a7e727f39 (bug 1395922)
Backed out changeset 9cd31c6a8e2c (bug 1395922)
Backed out changeset d46f952f94f8 (bug 1395922)
Backed out changeset f786d928b1e0 (bug 1395922)
Backed out changeset bacda0f99f71 (bug 1395922)
2017-11-06 12:34:02 +02:00
Kilik Kuo 4c6e8a291c Bug 1395922 - [P4] Make MDSM enter buffering state when MediaKeys is removed and resume the playback if setting same MediaKeys back. r=cpearce,jya
MozReview-Commit-ID: KdmeGqoVgak

--HG--
extra : rebase_source : b65cfc8e0e47c08e6b64b50e992bdf84da852bbd
2017-11-03 20:14:49 +08:00
Kilik Kuo 23f6932509 Bug 1395922 - [P2] Make MediaFormatReader::SetCDMProxy asynchronously with a promise. r=cpearce,jya
MozReview-Commit-ID: 7RarmmlA0lo

--HG--
extra : rebase_source : 195f64f405aa19920ccf09ffeddb087877d653a4
2017-11-03 20:12:39 +08:00
Jean-Yves Avenard a73b2aa424 Bug 1397307 - P6. Calculate average video frame rate as video is playing. r=gerald
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
2017-09-12 21:20:09 +02:00
Jean-Yves Avenard 9349efba14 Bug 1396515: Fix incorrect && and || operator placements. r=sylvestre
Includes some side 80 columns fix.

MozReview-Commit-ID: IXRoQfM0Hjc

--HG--
extra : rebase_source : 918cf87b2ce82c8de245dcb23cc359289ac5f21f
2017-09-04 11:27:43 +02:00
Jean-Yves Avenard f2acd77b7c Bug 1394591 - P1. Use nsCString for decoder description. r=gerald
This will allow to modify the string returned later.

MozReview-Commit-ID: Giw1JyukE4v

--HG--
extra : rebase_source : d126b8b956ff1f54c33a838834aee9cc6340de95
2017-09-01 14:25:28 +02:00
Sebastian Hengst 94169d21f8 Backed out changeset 409dbe62d0ea (bug 1394591) for asserting GLBlitHelper requires vertex_array_object in dom/media/mediasource/test/test_FrameSelection.html on Android 4.3. r=backout 2017-09-04 00:08:33 +02:00
Jean-Yves Avenard 15e988718f Bug 1394591 - P1. Use nsCString for decoder description. r=gerald
This will allow to modify the string returned later.

MozReview-Commit-ID: Giw1JyukE4v

--HG--
extra : rebase_source : d126b8b956ff1f54c33a838834aee9cc6340de95
2017-09-01 14:25:28 +02:00
Kaku Kuo e738871d59 Bug 1393399 P3 - keep the MediaDecoderOwner's identification in MFR; r=gerald
When GPU process crashes, the MediaDecoder, MDSM, and MFR are all destroyed.
So, we use MediaDecoderOwner to identify which video we're dealing with.

MozReview-Commit-ID: 1cv08M7Cpcf

--HG--
extra : rebase_source : 62f7be874d97a58eb4c1d7a98b4e9fe83a9313d3
2017-08-31 17:31:51 +08:00
JW Wang 30093548fb Bug 1378295. P6 - remove AbstractMediaDecoder and fix includes. r=jya
MozReview-Commit-ID: xN1Ywo9VDY

--HG--
extra : rebase_source : 9aee1697b5299e43eb35450a20015c08a11bdea6
extra : intermediate-source : 3095884f04356d0d2c3c34843098a0a8b23211b8
extra : source : ef0f7e5300060b7888b961596a32a8fbf483ebd2
2017-07-13 17:39:42 +08:00
JW Wang 709010e3e9 Bug 1378295. P2 - move AutoNotifyDecoded from AbstractMediaDecoder to FrameStatistics. r=jya
MozReview-Commit-ID: EdS2U2sfPdk

--HG--
extra : rebase_source : 786439f7fc7b9ed0904faf383a8e1ff0ccf35311
extra : intermediate-source : 3587a73488e07e13ccd0bc540cd814b5ee3210d9
extra : source : dcd94df0c7577e8c28d913d7061384650955d69f
2017-07-13 15:17:25 +08:00
JW Wang 35f6829a03 Bug 1378295. P1 - remove unused MFR::mDecoder. r=jya
MozReview-Commit-ID: BuvxlYs0LqD

--HG--
extra : rebase_source : 8595e8c5e08e9cd6575b3e3bf37e59e25c79045c
extra : intermediate-source : 589082a3f0571cea45e6942a1e6b82adda7efdcb
extra : source : 47cdc0a2b7acec44d102b165e1867b4f689e488c
2017-07-13 15:13:12 +08:00
JW Wang 0ad4cd546b Bug 1380568. P1 - store FrameStatistics in MFR. r=jya
So we can remove the use of AbstractMediaDecoder::NotifyDecodedFrames().

MozReview-Commit-ID: Ch7Saha6zdi

--HG--
extra : rebase_source : 8562faa56d1f31797643ed0f7ae550765d8c86d7
extra : intermediate-source : 05b50517cc40f2adf06facfccea628488dd319da
extra : source : d5af89f5a09e03c8fbb0d6111f88e3221f3a1d57
2017-07-07 11:05:03 +08:00
JW Wang 87a7705558 Bug 1316211. P16 - remove MediaDecoderReader completely and fix includes. r=gerald
MozReview-Commit-ID: AGNyyh4kt3e

--HG--
extra : rebase_source : 48bfd7c681693a965848078c19ac81707ac19540
extra : source : 093ff5fe2ab6dd7551453b10b480fa3553ec135d
2017-07-20 09:56:08 +08:00
JW Wang ef025c6fcf Bug 1316211. P15 - remove MDR from the base class of MFR. r=gerald
MozReview-Commit-ID: Jf5pCxkhexg

--HG--
extra : rebase_source : 3ec9423d4d0f3b60ee9e5f6f19af18188530e1d9
extra : source : 4fbc225bfc79abacaf47ffd4405ef2d6711dea32
2017-07-19 22:18:37 +08:00
JW Wang 2e40eb607f Bug 1316211. P14 - move members from MDR to MFR. r=gerald
MozReview-Commit-ID: EwdteoEY1uS

--HG--
extra : rebase_source : 2cc250720539ba6c1682efac69d3724164338137
extra : source : d4cc3de1ae224bdca414cd02f4d3473c44fe4d20
2017-07-19 17:34:05 +08:00
JW Wang 5370eb3105 Bug 1316211. P13 - replace use of MediaDecoderReader with MediaFormatReader. r=gerald
We will remove MediaDecoderReader in the future.

MozReview-Commit-ID: BaCRXleKK5a

--HG--
extra : rebase_source : dc14a593d6291136f02b1deb910cd6dcd01c0355
extra : source : 8f71b7dae0a541562c7c3829b5a873e9f9fd2674
2017-07-19 17:01:32 +08:00
JW Wang 7383189ffa Bug 1316211. P6 - move some members from MDR into MFR. r=gerald
MozReview-Commit-ID: 9H17UZjpCDT

--HG--
extra : rebase_source : 42ac663c72e71a4d3dddb995e43fde342e1ff7a8
extra : source : 0eac04f34efeb0c26fd9d09bea9299dbe460ffa9
2017-07-19 14:27:24 +08:00
JW Wang 39d88e8d8b Bug 1316211. P5 - remove IsAsync() and its callers. r=gerald
MozReview-Commit-ID: CT2gyEak2Qz

--HG--
extra : rebase_source : 205bf82c8abe7da9026bff6daab7562a5981ea39
extra : source : a6a543c1d90133036caada487799cac064e2f3f3
2017-07-19 14:24:35 +08:00
JW Wang ac2b0f2173 Bug 1380234. P3 - remove AbstractMediaDecoder::CompositorUpdatedEvent() and its users. r=jya
MozReview-Commit-ID: JioS7MC5qFh

--HG--
extra : rebase_source : 9df457507bfcbcd1baa2e66af61781cc2a2ec06f
extra : source : af4993bcca5097628b12b4861074d8eed9163d9b
2017-07-12 16:49:59 +08:00
JW Wang 803c5fa941 Bug 1380234. P2 - send compositor updates to the reader directly without using MediaEventSource. r=jya
MozReview-Commit-ID: EJO2PK525gS

--HG--
extra : rebase_source : 11a033d2e6a94b307ca8095b2ffd7348edb2b6d4
extra : source : 44c52998638933e8b709fa5196ef442314145d2f
2017-07-12 16:28:19 +08:00
JW Wang 4ca981216d Bug 1380234. P1 - pass KnowsCompositor to MFR through MediaDecoderReaderInit. r=jya
MozReview-Commit-ID: 3krK3meG5jV

--HG--
extra : rebase_source : f0a628ab28a527fa7f79ec61672e988cf1def8e7
extra : source : c8c2a6f2506338a8208f3bcf56160c47e6a29000
2017-07-12 15:37:02 +08:00
JW Wang aeaad5857f Bug 1378689 - add a structure to pack the data sent to the MediaDecoderReader constructor. r=jya
It would be handy we want to pass more data to the constructor.

MozReview-Commit-ID: 3AUUsTbv534

--HG--
extra : rebase_source : 8d230c85addf1ba296e6a0512f0d18ebd41c0d17
extra : source : e6568e9fa24f52c59baecaa16aa044b492f407fb
2017-07-06 16:59:22 +08:00
Kaku Kuo 458f8fcb6e Bug 1371188 P2 - remove MediaDecoderReader::RequestVideoData()'s aSkipToNextKeyframe parameter; r=jya
It is not used.

MozReview-Commit-ID: EDPhN6RzKN0

--HG--
extra : rebase_source : ab743da08760cd4014504528581d935ea9aa6752
extra : source : 3a7f3b90239b4bdf96c25e5df2f0c49a6c326c42
2017-06-12 16:06:11 +08:00
Kaku Kuo 2b13f6092f Bug 1371188 P1 - remove MFR::ShouldSkip()'s aSkipToNextKeyframe parameter; r=jya
MozReview-Commit-ID: 3w6QivBbjnl

--HG--
extra : rebase_source : 8b5b65ee58e3b7a943e81e8d0ca5b6fb5b2dc5bd
extra : source : 99e5165166bf7fe1cbfb883146700f57626c401e
2017-06-12 15:01:29 +08:00
Jean-Yves Avenard 3eef4c0a6a Bug 1363668: P1. Attempt to decode the first frame again if error occurred. r=jwwang
MozReview-Commit-ID: H5gwW7PONc6

--HG--
extra : rebase_source : 965bfeeb38fece71bc12aa5e8414b761dda672dd
2017-05-11 10:29:57 +02:00
Gerald Squelart 4101482ad6 Bug 1343437 - 'media.playback.warnings-as-errors' pref - r=jya
If 'media.playback.warnings-as-errors' is true, demuxing and decoding warnings
(i.e., non-fatal errors) will be treated as errors, causing playback to fail.

Currently set to false by default.

This could be later changed to catch and diagnose more issues.

MozReview-Commit-ID: BTaZ6TbIbNG

--HG--
extra : rebase_source : bacc24a46f588dd344e6d46178ae2d2c58882fcb
2017-03-03 16:10:48 +11:00
Gerald Squelart f717376fb5 Bug 1343437 - MFR::OnDemuxerInitDone forwards non-NS_OK MediaResult to HTMLMediaElement::DecodeWarning - r=jya
The MediaFormatReader now takes the MediaResult from the Demuxer::Init promise
resolution, and if there are no other errors but the MediaResult is not NS_OK
it will forward that warning to the decoder owner (i.e., the associated
HTMLMediaElement).

MozReview-Commit-ID: 5rTmzqqPLI0

--HG--
extra : rebase_source : 5f81db185a01c012bf0418af2a42986db14a7e6f
2017-03-06 15:22:17 +11:00