Commit Graph

246 Commits

Author SHA1 Message Date
Jean-Yves Avenard
cf0ff88211 Bug 1512456 - P1. Don't use GenericPromise with MediaSink. r=alwu
The VideoSink shares the AudioSink's own EndedPromise to notify its user that it has ended. As such, the MozPromise used must be non-exclusive.
Using the GenericPromise for such purpose only hid that requirement.

We also remove the MediaSink from the media namespace, and clarify the naming of some arguments and class members to accurately describe what they do.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:44:51 +00:00
Andreas Pehrson
3410ec9f28 Bug 1509548 - Clean up what appears to be wip-leftover gunk in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D12926

--HG--
extra : moz-landing-system : lando
2018-11-29 17:37:21 +00:00
Andreas Pehrson
a02fa011f0 Bug 1509548 - Remove the concept of a known tracks time from MediaStreamGraph. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D12923

--HG--
extra : moz-landing-system : lando
2018-11-29 17:37:06 +00:00
Andreas Pehrson
58233bef5c Bug 1423241 - Add logging for a captured MediaDecoder. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D12286

--HG--
extra : moz-landing-system : lando
2018-11-23 15:03:21 +00:00
Andreas Pehrson
4213b7db86 Bug 1423241 - Refactor DecodedStream. r=jya
This removes DecodedStream's use of MediaStreamListener in favor of
MediaStreamTrackListener. This change has however rippled through to a lot
more cleanup, per below.

This moves the MediaStreamTrack lifetime ownership for captured
HTMLMediaElements from the media element to DecodedStream, where the
MediaStreamGraph-side tracks are already created and ended today.

This makes MediaStreamTrack creation explicit across the entire codebase and
lets us remove the MediaStreamTrackSourceGetter class and the infrastructure
of adding MediaStreamTracks after they've already been created in the graph
from DOMMediaStream.

With track ownership, and thus TrackID allocation ownership, happening
exclusively in DecodedStream for its output tracks, we also stop throwing
away and recreating the SourceMediaStream to which we feed data on seek.
This is one step closer to fixing bug 1172394 and spec compliance of
HTMLMediaElement.captureStream().

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

--HG--
extra : moz-landing-system : lando
2018-11-23 15:02:03 +00:00
Andreas Pehrson
80cde33d12 Bug 1423241 - Always add tracks at the stream's current time. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D12271

--HG--
extra : moz-landing-system : lando
2018-11-23 15:01:42 +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
alwu
fa0d371ff0 Bug 1498440 - part5 : rename PopEvent() to PopFrontEvent(). r=jya
We only have a interest in the data which is popped out from the front side of the queue.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 22:05:58 +00:00
alwu
b020b31588 Bug 1496281 - let AudioSinkWrapper decide whether we need to create AudioSink. r=jya
Allow AudioSinkWrapper to access MDSM's audio queue in order to know whether the audio source ended.

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

--HG--
extra : moz-landing-system : lando
2018-10-19 23:30:06 +00:00
Ciure Andrei
14f664ea99 Backed out changeset 25bff27f9944 (bug 1496281) requested for causing bug1498953 CLOSED TREE 2018-10-15 21:47:32 +03:00
alwu
710e33671f Bug 1496281 - do not create audio stream if audio has ended. r=jya
We should not init the audio steam when the audio queue is marked as finished.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 22:23:40 +00:00
Daniel Varga
d4fb1d5267 Backed out changeset 10dc6af46fbf (bug 1496281) for build bustage at builds/worker/workspace/build/src/dom/media/mediasink/AudioSink.cpp on a CLOSED TREE
--HG--
extra : amend_source : a30e9518eff0f50fbd746af15a3468b3b54b0215
2018-10-13 00:04:06 +03:00
alwu
7c15bc0720 Bug 1496281 - do not create audio stream if audio has ended. r=jya
We should not init the audio steam when the audio queue is marked as finished.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 20:43:22 +00:00
Alex Chronopoulos
2c94f04194 Bug 934425 - Set device info in MediaSink and switch sink device. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D5871

--HG--
extra : moz-landing-system : lando
2018-10-12 08:44:35 +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
70040ff272 Bug 1245400 - P3. Report number of frames dropped by compositor back to VideoSink. r=nical
We report the number of frames dropped by the compositor because they were too late through:
ImageComposite -> ImageHost -> CompositableTransactionParent -> ImageBridgeParent -> IPDL -> ImageBridgeChild -> ImageContainerListener -> ImageContainer -> VideoSink

Differential Revision: https://phabricator.services.mozilla.com/D2177
2018-08-22 17:26:36 +02:00
Andreas Pehrson
9d5b27393d Bug 1453127 - Clear output streams on shutdown. r=jya 2018-05-30 10:44:56 +02:00
Andreas Pehrson
6c6e70fcbc Bug 1453127 - Ensure TrackID uniqueness for captured MediaDecoder. r=jya 2018-05-29 10:21:51 +02: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
Paul Adenot
b7f37d63fd Bug 1457137 - Move instead of copying strings returned from various GetDebugInfo functions for HTMLMediaElement::MozDumpDebugInfo. r=gerald
MozReview-Commit-ID: LbZ0cWe7yb0

--HG--
extra : rebase_source : 31946e6dcfd2f750e16437f5876f29c851698b9f
extra : source : 4fd9b0ce611c4ad4ecbec1aace1777944214212a
2018-04-26 15:57:39 +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
2be26b6b7c Bug 1443942 - Move code to toggle high res timers into VideoSink. r=jya
We have code in the MDSM to toggle on high resolution timers on Windows when we
start/stop playing because the VideoSink relies on being awoken by timers to
update the set of current frames in the compositor's queue, and on Windows 7 we
end up dropping frames due to the timer lag without this.

We assert in the MDSM's destructor that we've turned off high res timers (as
they cause needless battery drain, so we only want them on when we need them),
and the new test_mediarecorder_principals is hitting that assert on Windows. I
think we're missing turning them off when we create a new VideoSink for
outputting to the MSG. That affects the value returned by
MediaDecoderStateMachine->mVideoSink->IsPlaying(), which is what we use to
decide whether we should enable high resolution timers. We track whether we've
enabled high res timers in MDSM::mHiResTimersRequested, and that gets out of
sync with IsPlaying() when we re-create the MediaSink.

Rather than trying to handle all the permutations of places where we need to
turn off high resolution timers in the MDSM, we're better to move the code to
toggle high res timers into the VideoSink, as that's actually where we need to
be sure that we have high resolution timers enabled anyway. It's the VideoSink
after all that is relying on timers for frame update, not the MDSM.

Also remove the media.hi-res-timers.enabled pref, as we haven't needed it.

MozReview-Commit-ID: 9dNxcYxPDZH

--HG--
extra : rebase_source : 6e403d59bb5f1dd0241fe8298a823ba08b1670fb
2018-04-06 13:33:28 +12:00
Alex Chronopoulos
851a3ee589 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Gurzau Raul
1368521911 Backed out 3 changesets (bug 1431810) for failing test_bug1431810_opus_downmix_to_mono.html on Windows
Backed out changeset a01c1941a829 (bug 1431810)
Backed out changeset 43eb1c01c67f (bug 1431810)
Backed out changeset 3fe9d85d684a (bug 1431810)
2018-03-26 12:09:42 +03:00
Alex Chronopoulos
85119eac26 Bug 1431810 - Disable Opus phase inversion on stereo to mono downmix. r=rillian
MozReview-Commit-ID: 5eaSPQzUu9o

--HG--
extra : rebase_source : 126d9faa2824d29fc73cf040b033ca585dfdbcee
2018-03-15 18:28:14 +02:00
Jean-Yves Avenard
f15eea87d5 Bug 1444479 - P5. Let AudioSink deal with unknown layout. r=padenot
MozReview-Commit-ID: F31zNl5o9n1
2018-03-24 10:58:01 +01:00
Jean-Yves Avenard
4680798728 Bug 1432779 - P7. Use typedef rather than actual type. r=padenot
this improve readability.

MozReview-Commit-ID: IYfrLMZ5djX
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
87fa7068d5 Bug 1432779 - P4. Remove the concept of preferred layout. r=padenot,r=kamidphish
Channel layout is derived by the content being played. The concept of preferred layout is meaningless. Either we have a layout defined, or we don't. There's no in-between.

So we remove it.

MozReview-Commit-ID: CSCAInNmzMS
2018-03-24 10:57:59 +01:00
Jean-Yves Avenard
6c310b818e Bug 1431221 - P11. Configure audio to use desired channel layout. r=padenot
MozReview-Commit-ID: 1wyeCIWohHE
2018-03-24 10:57:56 +01:00
Chris Peterson
37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Jean-Yves Avenard
a21ef82be7 Bug 1404997 - P14. Rename members to clarify the finish meaning. r=padenot
We have different concept of "finish" between the base class and its hierarchy.
Attempt to clear the sitatuation by renaming the members and related methods.

MozReview-Commit-ID: vFsXhMK5GY

--HG--
extra : rebase_source : 65eda9257e447584161da51af7c240e31027c501
2017-12-06 19:00:22 +01:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +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
Chris Pearce
8bddf869cf Bug 1416663 - Move Gecko/HTMLMediaElement specific stuff out of VideoFrameContainer. r=jwwang
MozReview-Commit-ID: 4giNMi8qsTZ

--HG--
extra : rebase_source : 0f9e33c3704aa3925635d2290a5e18f9eebd2b74
2017-11-13 16:09:23 +13:00
Chris Pearce
f231fe980b Bug 1414991 - Unified build fixes in media. r=gerald
MozReview-Commit-ID: KjLeQMSxOfO

--HG--
extra : rebase_source : 37b7222bfbadc0836acdeee19ebd82676872b4ea
2017-11-07 12:57:34 +13:00
JW Wang
80e976e596 Bug 1412212. P3 - also dump debug info of AudioSink. r=JamesCheng
MozReview-Commit-ID: AnvlXrhdoI5

--HG--
extra : rebase_source : b4d979dba64ea02e85cac0d9613915441dbadd90
2017-10-27 15:36:24 +08:00
JW Wang
33a2764739 Bug 1412212. P2 - compact the output of GetDebugInfo(). r=JamesCheng
MozReview-Commit-ID: 6cAedI4Ax5r

--HG--
extra : rebase_source : d4162dace6c443fa993863c138855b19c33d7b59
2017-10-27 15:03:36 +08:00
JW Wang
3fef1cee8e Bug 1411476. P4 - rewrite GetDebugInfo() functions to make string concatenation easier. r=gerald
MozReview-Commit-ID: V9cxIZGl8M

--HG--
extra : rebase_source : 10afe3e0e4c7d3d6153ea820d869e192345d755c
2017-10-25 13:13:30 +08:00
JW Wang
ee83cd683f Bug 1400674 - fix the algorithm of filling audio gaps with silence. r=jya
MozReview-Commit-ID: Hjsboq6PdlN

--HG--
extra : rebase_source : b92dbbe184563b71bb9cfc541a310ae60d41d68d
2017-10-13 17:24:24 +08:00
Sebastian Hengst
caa3760fb4 Backed out changeset 0442a3ecb494 (bug 1400674) for failing mda tests dom/media/mediasource/test/test_BufferingWait_mp4.html and test_WaitingOnMissingData_mp4.html. r=backout
--HG--
extra : amend_source : 260df77d213debe033fef9a110fe665f180e50cc
2017-10-16 10:18:06 +02:00
JW Wang
3705c2d6bb Bug 1400674 - P1: fix the algorithm of filling audio gaps with silence. r=jya
MozReview-Commit-ID: Hjsboq6PdlN

--HG--
extra : rebase_source : 639e1f4fcb96b6080133fced25ed304152e515af
2017-10-13 17:24:24 +08:00
Andrea Marchesini
b0b73ddd29 Bug 1388125 - CloneableWithRangeMediaResource for streams implementing nsICloneableInputStreamWithRange, r=jya 2017-09-18 13:34:43 +02:00
Alastor Wu
f2df60108c Bug 1398139 - part1 : revert the changing of bug 1386478. r=jwwang
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
2017-09-15 17:07:08 +08:00
Bill McCloskey
fe8e58f308 Bug 1397941 - Fix DecodedStream labeling bug (r=jwwang)
MozReview-Commit-ID: KL5XzLJuWgz
2017-09-11 19:10:59 -07:00
Matthew Gregan
f4d992a821 Bug 1388229 - Remove B2G-only audio stream type handling. r=kamidphish 2017-08-10 13:00:07 +12:00
JW Wang
108a5c3b92 Bug 1386478 - don't cap the return value of GetEndTime(). r=jya
A chained ogg file contains multiple streams and timestamps will not
monolithically increase. The current code will cap AudioEndTime()
to the end time of the 1st stream and currentTime won't be updated
correctly when playback position reaches the 2nd stream or later ones.

http://searchfox.org/mozilla-central/rev/bbc1c59e460a27b20929b56489e2e55438de81fa/dom/media/MediaDecoderStateMachine.cpp#3636-3637

MozReview-Commit-ID: DbIspYmEjVv

--HG--
extra : rebase_source : 20004ae6c6d4e15dc8aeebf646efc62342514d24
2017-08-02 10:45:48 +08:00