Commit Graph

264 Commits

Author SHA1 Message Date
Mike Conley
10393bbf48 Bug 1533099 - Show the most recently decoded image when creating a visual clone of a video that isn't playing. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D22422

--HG--
extra : moz-landing-system : lando
2019-03-18 14:37:24 +00:00
Alex Chronopoulos
59234c63dd Bug 1533612 - Change to unsigned int to avoid integer overflow. r=jya
mProcessedQueueLength is int32_t (wrapped around an Atomic) but it is updated from the method FramesToUsecs() which returns int64_t (wrapped around a CheckedInt) thus it is changed to unsigned int to avoid integer overflow.

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

--HG--
extra : moz-landing-system : lando
2019-03-14 04:11:39 +00:00
Will Hawkins
bfb578d1e9 Bug 1525320: Add config prefs that let us tell media and animated images to paint only the first frame r=jya
Differential Revision: https://phabricator.services.mozilla.com/D21613

--HG--
extra : moz-landing-system : lando
2019-03-13 02:48:38 +00:00
Mike Conley
38db7d8e61 Bug 1521964 - Allow VideoSink to have a secondary VideoFrameContainer assigned to it. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D20022

--HG--
extra : moz-landing-system : lando
2019-03-01 22:36:33 +00:00
Chris Pearce
883206cfcc Bug 1529738 - Add profiler markers for video frames dropped due to slow video decode. r=jya,mstange
Differential Revision: https://phabricator.services.mozilla.com/D20760

--HG--
extra : moz-landing-system : lando
2019-02-28 20:10:17 +00:00
Jean-Yves Avenard
4377bd3b8b Bug 1524890 - P11. Remove duration from AudioData construction parameter. r=bryce
It can be determined from the size of the buffer and the number of audio frames. Additionally, it ensures that the duration of the frame is always exactly what the AudioData contains.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:19:47 +00:00
Jean-Yves Avenard
ca21a59533 Bug 1524890 - P10. Add AudioData::SetTrimWindow. r=bryce
Don't re-create a new trimmed AudioData when we want to remove some content. This remove the need for some copies.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:19:32 +00:00
Jean-Yves Avenard
7f3801ebd7 Bug 1524890 - P8. Rely on buffer length to calculate the number of frames. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D20166

--HG--
extra : moz-landing-system : lando
2019-02-22 09:19:00 +00:00
Jean-Yves Avenard
3cf8c6d0df Bug 1524890 - P7. No longer access AudioData::mFrames directly. r=bryce
This will allow to remove mFrames member and calculate from the size of the content, which will dynamically change depending on a cropping filter.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:47 +00:00
Jean-Yves Avenard
1f5dfb6d37 Bug 1524890 - P4. Use Span<> with AudioBufferCursor. r=bryce
And we add some strong assertions that we never read passed the end of the buffer.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:05 +00:00
Jean-Yves Avenard
afe04d2952 Bug 1524890 - P3. Add AudioData::Data method that returns a Span. r=bryce
So that we never access the underlying buffer directly.

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

--HG--
extra : moz-landing-system : lando
2019-02-22 09:18:04 +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
Noemi Erli
3c06305cb1 Backed out changeset 849f81f21979 (bug 1515549) per achronop's request a=backout 2019-01-11 22:04:58 +02:00
Alex Chronopoulos
96cd8b2f6a Bug 1515549 - Avoid resetting volume in every AudioSink restart in case volume has changed outside firefox. r=jya
Avoid resetting volume in every AudioSink restart to stop unexpected volume change during play/pause and seek. Volume changes could occur if the volume has been modified outside firefox (for example pavucontrol in Linux).

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

--HG--
extra : moz-landing-system : lando
2019-01-10 11:24:29 +00:00
Andreas Pehrson
cb8996408e Bug 1512958 - Properly clean up produced tracks in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D14584

--HG--
extra : source : 74101900e7d484cc9ddcba2cd867ca172b961ea0
2018-12-21 16:23:57 +00:00
Coroiu Cristina
0215638358 Backed out 2 changesets (bug 1512958) for frequently failing mda at /dom/media/MediaDecoderStateMachine.cpp a=backout
Backed out changeset 74101900e7d4 (bug 1512958)
Backed out changeset 1d4816ef6e01 (bug 1512958)
2018-12-22 06:14:56 +02:00
Andreas Pehrson
8567b073f3 Bug 1512958 - Properly clean up produced tracks in DecodedStream. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D14584

--HG--
extra : moz-landing-system : lando
2018-12-21 16:23:57 +00:00
Andreas Pehrson
88cb071d63 Bug 1513638 - Rename DispatchToMainThreadAfterStreamStateUpdate to DispatchToMainThreadStableState. r=jya,karlt
Differential Revision: https://phabricator.services.mozilla.com/D14421

--HG--
extra : moz-landing-system : lando
2018-12-19 04:34:10 +00:00
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