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

509 Коммитов

Автор SHA1 Сообщение Дата
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 ee4625f0a7 Bug 1489049 - Don't recycle decoder on codec change. r=jolin
Differential Revision: https://phabricator.services.mozilla.com/D5397

--HG--
extra : moz-landing-system : lando
2018-09-10 21:37:19 +00:00
Jean-Yves Avenard df2e2243b9 Bug 1485536 - Don't account frames dropped by the compositor as presented. r=bryce
We rename a method in FrameStatistics to better match what it's actually doing.

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

--HG--
extra : moz-landing-system : lando
2018-08-27 10:27:19 +00:00
Csoregi Natalia 15876458af Backed out changeset 8c8ff2c7bfa1 (bug 1485536) for crashes at VideoSink. CLOSED TREE 2018-08-26 00:15:16 +03:00
Jean-Yves Avenard 5ab3282a07 Bug 1485536 - Don't account frames dropped by the compositor as presented. r=bryce
We rename a method in FrameStatistics to better match what it's actually doing.

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

--HG--
extra : moz-landing-system : lando
2018-08-25 12:39:29 +00:00
Andreea Pavel 73467d18e1 Backed out changeset 1dc785e713d9 (bug 1485536) for assertion failure at z:/build/build/src/dom/media/mediasink/VideoSink.cpp on a CLOSED TREE 2018-08-24 21:10:59 +03:00
Jean-Yves Avenard 3b4c682a62 Bug 1485536 - Don't account frames dropped by the compositor as presented. r=bryce
We rename a method in FrameStatistics to better match what it's actually doing.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 14:26:14 +00:00
Jean-Yves Avenard d3b19c39b3 Bug 1484242 - P1. Add AllocationPolicy objects. r=bryce
We extract the GlobalAllocationPolicy and the MediaDataDecoder wrapper from MediaFormatReader.

They will be used to create a new wrapping class that will serialize allocation and initalization of decoders if the platform requires it.

Differential Revision: https://phabricator.services.mozilla.com/D3676
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard c80c137b83 Bug 1482116 - Only schedule update when a track exists. r=bryce
Add assertion to more easily catch the problem

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

--HG--
extra : moz-landing-system : lando
2018-08-09 16:24:33 +00:00
Jean-Yves Avenard d586f6f943 Bug 1409664 - P9. Remove AutoTaskQueue and its use r=bryce
Summary:
TaskQueue no longer requires an explicit call to BeginShutdown() as such we no longer have a need for AutoTaskQueue.

Depends on D1621

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1622
2018-07-03 11:45:19 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jean-Yves Avenard 535b2be403 Bug 1454630 - P4. Only wait for CDMProxy if actually needed for the given decoder. r=bryce
If the particular track isn't encrypted, there's no need to wait for a CDMProxy.

MozReview-Commit-ID: DPbvbwsO58N

--HG--
extra : rebase_source : 0e7fea134404c861268dc8759cd7c0ebdf83dca4
2018-05-28 15:10:19 +02:00
Jean-Yves Avenard cc044be0ee Bug 1454630 - P3. Always recreate the PDMFactory when CDMProxy change. r=bryce
The code couldn't have worked and didn't do what the comment stated. When the CDMProxy changes, the current PDMFactory for encrypted content can no longer be used.

MozReview-Commit-ID: 7LpcQkK5gLL

--HG--
extra : rebase_source : e3926034069285be1559d0a1ea20d5f3c1561eb7
2018-05-28 14:46:35 +02: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
Jean-Yves Avenard 422c1d2336 Bug 1456743 - P2. Have MediaFormatReader debug show live audio codec type. r=bryce
Additionally, show the number of channels and the sampling rate.

MozReview-Commit-ID: L067Hbv0bXz

--HG--
extra : rebase_source : 193482c7e96b0094ec4d717a9cc30e371067aa1d
2018-04-30 19:06:06 +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
Chris Pearce 1cfc65da51 Bug 1392747 - Backed out changeset 6524c2d721db. r=backout
The logging added in this patch was landed to help debug very rare shutdown
failures on android, but the logging runs on other platforms and is annoying.
No one is looking at fixing the rare shutdown problem on Android. So remove the
logging until fixing the shutdown failure becomes a priority.
2018-02-20 15:54:00 +13:00
JW Wang 79b5f2dd2e Bug 1425996 - fix build error: unused variable 'rv'. r=gerald
MozReview-Commit-ID: 7MhsSWbxB3z

--HG--
extra : rebase_source : 81207a1e5b663314295f2f95afd4b726ffe8f12d
2017-12-21 12:12:42 +08:00
Gerald Squelart c5aeab4f69 Bug 1407810 - Use DDMOZ_LOG in media stack - r=jwwang
Mostly-mechanical replacement of MOZ_LOG with DDMOZ_LOG, usually just removing
the class name and `this` pointer (as they are already implicitly recorded).
Some files needed a bit more work when logging was done from helper classes or
static functions.

MozReview-Commit-ID: IeJJmzYqWMQ

--HG--
extra : rebase_source : 94200838dcdaf6c3bda9de30042ce2d307237eef
2017-10-13 16:31:59 +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
Chris Pearce 06046a7100 Bug 1423372 - Remove some unnecessary includes and fix unified build problems. r=jwwang
MozReview-Commit-ID: 7DgtGJQvgp7

--HG--
extra : rebase_source : 297baab1fd84e5302a5f90096e2bbe3bd5fbb20f
2017-12-06 11:36:50 +13:00
John Lin 33546f8acf Bug 1392747 - add debug message to trace media shutdown process. r=jwwang
MozReview-Commit-ID: LL19lxlSJem

--HG--
extra : rebase_source : 57ace04484fd3c4f9687e0f79745249358edf56b
2017-11-29 16:28:11 +08:00
Brindusan Cristian d0a4ab96a0 Merge inbound to mozilla-central r=merge a=merge 2017-11-16 00:24:15 +02: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
Andrea Marchesini 4b1b084ce7 Bug 1416724 - part 3 - AbstractThread::Dispatch return value check in dom/media, r=jwwang 2017-11-15 07:58:03 +01:00
shindli 385fb3428c Backed out 4 changesets (bug 1416724) for failing /builds/worker/workspace/build/src/dom/media/hls/HLSDemuxer.cpp:89:5 r=backout on a CLOSED TREE
Backed out changeset 45352aa4319d (bug 1416724)
Backed out changeset 01d1e5263bcd (bug 1416724)
Backed out changeset bc854c315ec8 (bug 1416724)
Backed out changeset 35a50167485d (bug 1416724)
2017-11-15 09:49:04 +02:00
Andrea Marchesini 642cdd108b Bug 1416724 - part 3 - AbstractThread::Dispatch return value check in dom/media, r=jwwang 2017-11-15 07:58:03 +01:00
Nicholas Nethercote b15805ab71 Bug 1414759 - Replace some unnecessary media prefs with code constants. r=cpearce
Specifically:
- media.decoder.limit
- media.num-decode-threads
- media.resampling.rate
- media.wmf.decoder.thread-count
- media.cache.resource-index

--HG--
extra : rebase_source : a46aa7078b98b4731ec96b66398c51aa6cb42d27
2017-11-13 17:16:06 +11: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
James Cheng 884fc56be9 Bug 1411523 - Remove 'this' from lambda captures [self, this] under dom/media r=jwwang
Capturing |this| only if |self| needs to appear more than twice in a lambda.

MozReview-Commit-ID: 38iYDznjgBH

--HG--
extra : rebase_source : 9471fd4519c5c5be6e6e10eb11db8eeb041327d1
2017-10-26 16:59:40 +08:00
bechen@mozilla.com fbee889f6c Bug 1408693 - Add a lock to protect the sGPUCrashDataMap. r=jwwang
MozReview-Commit-ID: 7NDcoGMkKZ3

--HG--
extra : rebase_source : 206af0de83a1fb4fb5258202a25de8484a9e2bef
2017-10-16 14:03:04 +08:00
Sebastian Hengst 7ef2d3c369 Backed out changeset bd78c5074204 (bug 1400674) 2017-10-16 10:17:55 +02:00
Jean-Yves Avenard 70c233ec2b Bug 1400674 - P3: Never drain audio decoders. r=jwwang
None of our audio decoders require draining, and as all audio frames are keyframes, we can always resume decoding from where we left of when encountering a gap in the data.

The vorbis decoder always "eats" the first sample provided, causing unecessary seek and drain.
This issue will be addressed in another change.

MozReview-Commit-ID: LNd3Pz4QT4v

--HG--
extra : rebase_source : e9e2763ec8d9e933a88319f5965fc08e154347ae
2017-10-12 19:06:07 +02:00
Alastor Wu 1bc4324cb2 Bug 1403832 - part1 : replace Error.Code() with Error.ErrorName(). r=jya
Use ErrorName() as it provides more useful information for the error detail.

MozReview-Commit-ID: BQUPQGcLd8L

--HG--
extra : rebase_source : 734825c88dfbe79de1e61498dcc24606c50314ee
2017-09-29 00:37:45 +08:00
Jean-Yves Avenard 8755f326b6 Bug 1403129 - Don't cache decoder's description. r=gerald
MozReview-Commit-ID: 5ULVmUWUBGk

--HG--
extra : rebase_source : e68fcf4db866e766ec9f60af2ce40787e2cd539a
2017-09-26 15:26:34 +02:00
Alastor Wu e22a7e735d Bug 1402206 - print error name for MediaFormatReader::OnSeekFailed(). r=jya
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
2017-09-22 16:23:08 +08:00
Kaku Kuo 88d6505246 Bug 1401902 - we should use MediaDataDecoder's address as an ID instead of MFR::DecoderData's address;r=gerald
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
2017-09-21 18:02:30 +08:00
Jean-Yves Avenard ac7ed4578a Bug 1401922 - P1. Ensure an error is returned when no decoder could be created. r=alwu
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
2017-09-21 13:25:05 +02:00
Jean-Yves Avenard 19ca46af01 Bug 1400614 - P2. Change string output content. r=gerald
Doesn't look as nice as I had hoped.

MozReview-Commit-ID: 6GAXsVKC2sQ

--HG--
extra : rebase_source : bc06616f22f08a6ae6d14dc2fb8b4b60448120f2
2017-09-17 09:56:38 +02:00
Jean-Yves Avenard 56de0134f7 Bug 1400614 - P1. Handle case where we have no video track. r=gerald
MozReview-Commit-ID: KcHMH3pOouc

--HG--
extra : rebase_source : 5b8135156a535ea75d13c2568123d242b79dd5cc
2017-09-17 00:57:17 +02:00
Jean-Yves Avenard f170080ea4 Bug 1397307 - P10. Remove uncessary loop. r=gerald
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
2017-09-14 14:45:10 +02:00
Jean-Yves Avenard e1eaa06ce9 Bug 1397307 - P7. Display video resolution and frame rate in debug data. r=gerald
MozReview-Commit-ID: 9vsheKkAm4p

--HG--
extra : rebase_source : 701231cbb976f72819eab7de20c9a5d9c5780136
2017-09-12 17:40:42 +02: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 6940b5e2e4 Bug 1397307 - P5. Avoid creating two decoders on first sample. r=gerald
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
2017-09-12 21:02:24 +02:00