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

575 Коммитов

Автор SHA1 Сообщение Дата
alwu 6bf81c9c16 Bug 1756260 - part1 : split some of current state machine methods and variables to another new base class preparing for a new type of state machine. r=jolin
In following patch, we will implement a new type of state machine. In order to avoid redundant code, this patch splits some basic share codes into a new base class.

Differential Revision: https://phabricator.services.mozilla.com/D140013
2022-05-11 17:46:11 +00:00
Cristian Tuns df3db4d641 Backed out 10 changesets (bug 1756260) for causing build bustages on ExternalEngineStateMachine.obj CLOSED TREE
Backed out changeset d2339ec8194e (bug 1756260)
Backed out changeset 391201cf338b (bug 1756260)
Backed out changeset 1a9aa3f175d0 (bug 1756260)
Backed out changeset d624c80ba67f (bug 1756260)
Backed out changeset 46e8a8457044 (bug 1756260)
Backed out changeset 93245b0e2118 (bug 1756260)
Backed out changeset b69ee552b64e (bug 1756260)
Backed out changeset 9fc71b8478d5 (bug 1756260)
Backed out changeset 34b10d427f0f (bug 1756260)
Backed out changeset ed9640359f3a (bug 1756260)
2022-05-10 23:32:51 -04:00
alwu 2b0a067fdc Bug 1756260 - part1 : split some of current state machine methods and variables to another new base class preparing for a new type of state machine. r=jolin
In following patch, we will implement a new type of state machine. In order to avoid redundant code, this patch splits some basic share codes into a new base class.

Differential Revision: https://phabricator.services.mozilla.com/D140013
2022-05-11 02:57:17 +00:00
Paul Adenot 6995b651b9 Bug 1751023 - Fix static analysis warnings in MediaDecoderStateMachine. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D136395
2022-02-10 12:46:44 +00:00
Marian-Vasile Laza 566c6f57a1 Backed out 2 changesets (bug 1751023) for causing mochitest failures on test_playback_rate.html.
Backed out changeset 703e7c358f73 (bug 1751023)
Backed out changeset 946a654afa04 (bug 1751023)
2022-02-09 00:02:45 +02:00
Paul Adenot 611a857d6f Bug 1751023 - Fix static analysis warnings in MediaDecoderStateMachine. r=media-playback-reviewers,chunmin
Differential Revision: https://phabricator.services.mozilla.com/D136395
2022-02-08 17:32:16 +00:00
alwu c88ed9264e Bug 1717119 - part2 - only store more video frames than usual for 4k+ video. r=bryce
For lower resolution videos, we should be able to decode them well without storing too many video frames. So let's keep this mechanism for 4k+ video only.

Differential Revision: https://phabricator.services.mozilla.com/D118402
2021-06-23 20:31:13 +00:00
alwu a342363d48 Bug 1692881 - part1 : let MDSM detect whether the video decoding is too slow and force to request the next key frame. r=bryce
If the decoded video MDSM received is already late, then it indicates that video decoding is too slow.

If we keep decoding but in the same speed, it's very likely all following decoded videos would still be behind the clock and need to be discarded.

The reader has its own mechanism to seek to the next keyframe, but that will only happen when the time of next keyframe is behind the given time threshold, which is the current time.

When the video has pretty long keyframe interval (eg. 5s), then that mechanism won't be triggered because the even if the decoded video frames are late, the next keyframe still far exceeds the current time, so the reader doesn't think it's necessary to skip.

Therefore, MDSM should force the reader to seek to the next keyframe directly, because it know both the decoded time of video frames and the current playback time.

Differential Revision: https://phabricator.services.mozilla.com/D117242
2021-06-14 22:31:50 +00:00
Csoregi Natalia d1bbd6e368 Backed out 2 changesets (bug 1693250) for failures on test_recreate_media_sink_audible_change.html. CLOSED TREE
Backed out changeset 0e0f90271853 (bug 1693250)
Backed out changeset 45cd86944c9f (bug 1693250)
2021-05-06 01:14:51 +03:00
alwu 5812a14721 Bug 1693250 - part1 : keep clock time being monotonically increased even if the media sink has been changed. r=bryce
The purpose of this patch is to create a consistent clock timeline among different media sinks.

Having a consistent clock timeline can help the newly created media sink to understand audio data's "adjusted" time, which can prevent the sink from inserting silence if the sink incorrectly think there is a gap between data and sink start time.

However, once seeking completed, we should use the media time that indicates to the new position, instead of using the previous clock time.

Eg.
Audio duration = 10, and has seamlessly looped 5 times. Then the start time of the sample in 2s in the 6th looping would be 2 + 5*10 = 52.
If we switch to the new sink, and use media time (which is 2s) as a start time to start a new sink, then the new sink would think there is a gap between 2s and 52s and push a lot of silence into the data. [1]


[1] https://searchfox.org/mozilla-central/rev/9b430bb1a11d7152cab2af4574f451ffb906b052/dom/media/mediasink/AudioSink.cpp#390-426

Differential Revision: https://phabricator.services.mozilla.com/D113548
2021-05-05 20:07:06 +00:00
Brendan Early 11d4046786 Bug 1120222 - Set AudioSink name to title of MediaElement's parent r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D93462
2021-04-19 15:17:26 +00:00
Andreas Pehrson 1df5aff0c0 Bug 1601799 - Use a SharedDummyTrack for graph access in DecodedStream. r=karlt
When enabling our MediaTrack implementation (which we don't plan to by default,
NB) and disabling all audio tracks and unselecting all video tracks while having
an active captureStream leads to having no output tracks in DecodedStream.

In this case, DecodedStream doesn't know which graph to use for creating the
intermediary tracks it feeds data to. We don't want to resort to the default
graph either, since two graphs on different clocks could then race each other.

With this patch we plumb down a SharedDummyTrack from the media element where
the captureStream was triggered, through MediaDecoder, to DecodedStream. The
SharedDummyTrack guarantees to keep the graph alive, and holds the graph used
for the output tracks.

Differential Revision: https://phabricator.services.mozilla.com/D99822
2021-01-05 07:43:34 +00:00
Simon Giesecke f7f5462a4b Bug 1626570 - Improve handling of copying arrays in dom/media/. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D73627
2020-05-05 11:38:10 +00:00
Alex Chronopoulos b5314f7dc0 Bug 1571513 - Implement suspend/resume of MediaDecoder to clean up low level resources. r=alwu
Implement the `MediaDecoder::Suspend/Resume` to shutdown and recreate the MediaSink. This is important the page is refreshed because the existing tree does not shutdown immediatelly. It stays alive but remains suspended thus it is necessary to clean up the low-level system resources. In order to support the suspended state with the existing work flow, if MediaSink is suspended it is disallowed to start it or change the sink id. Recreating the MediaSink is possible but starting it is restricted until resume.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 17:48:25 +00:00
Eric Rahm 6ea4ed1c80 Bug 1322095 - Part 2: Remove nsAutoPtr from dom/media. r=jya
This converts `nsAutoPtr` usage in dom/media to `UniquePtr`. Beyond just a
search and replace we also needed to update assignment and access of the
`UniquePtr`s. This falls into a few categories:
  - Assignment from a newly constructed object switches to `MakeUnique`
  - Assignment from a raw ptr switches to `UniquePtr::reset`
  - Handing out a raw ptr now requires `UniquePtr::get`
  - Uses `UniquePtr::release` rather than `nsAutoPtr::forget`
  - A few spots are updated to return a `UniquePtr` rather than a raw ptr

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

--HG--
extra : moz-landing-system : lando
2020-02-21 22:44:00 +00:00
Alastor Wu 9c2660e673 Bug 1603288 - add detailed name for different seeking state. r=bryce
There are multiple seeking states in `MDSM`, it would be good to see the full name of the seeking state on the debug log to know what seeking state we're using.

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

--HG--
extra : moz-landing-system : lando
2019-12-13 00:37:00 +00:00
alwu 1d93afb4e6 Bug 1593843 - part2 : fix build problem under unified build. r=bryce
As we added new files, which affects the build bundle created by unified build. Therefore, add missing scope definition and included header to pass the build.

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

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:12 +00:00
Noemi Erli 23395b20e2 Backed out 13 changesets (bug 1593843) for bustages in Logging.h CLOSED TREE
Backed out changeset b6e3fa6363bd (bug 1593843)
Backed out changeset 3db512256b0d (bug 1593843)
Backed out changeset f67081ea84ee (bug 1593843)
Backed out changeset ad02bb934459 (bug 1593843)
Backed out changeset 1a79176d3f7b (bug 1593843)
Backed out changeset 486c8562b816 (bug 1593843)
Backed out changeset 0d4313c436c5 (bug 1593843)
Backed out changeset 0c7e831d11bf (bug 1593843)
Backed out changeset 02ac8c39f46d (bug 1593843)
Backed out changeset 80895462dddf (bug 1593843)
Backed out changeset 4ab855869725 (bug 1593843)
Backed out changeset 5a24fc933cd6 (bug 1593843)
Backed out changeset f1c50ee60a78 (bug 1593843)
2019-11-23 05:18:17 +02:00
alwu 4abf12bb60 Bug 1593843 - part2 : fix build problem under unified build. r=bryce
As we added new files, which affects the build bundle created by unified build. Therefore, add missing scope definition and included header to pass the build.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 09:17:35 +00:00
Andreas Pehrson 626de4fb8d Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 12:52:48 +00:00
Andreas Pehrson 3c62bb84d8 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-22 00:07:04 +00:00
Daniel Varga af05b317ec Backed out 7 changesets (bug 1597216, bug 1596777, bug 1536156) for reftest failures at reftest/bipbop_300_215kbps.mp4.lastframe.htm. On a CLOSED TREE
Backed out changeset a3fa99d936f3 (bug 1536156)
Backed out changeset 29dd64930421 (bug 1536156)
Backed out changeset 77c16444e714 (bug 1536156)
Backed out changeset d540f1802ff6 (bug 1536156)
Backed out changeset 8283eed414d2 (bug 1536156)
Backed out changeset 01d2c84810f0 (bug 1597216)
Backed out changeset e0184916cf37 (bug 1596777)
2019-11-22 01:58:42 +02:00
Andreas Pehrson 1052205963 Bug 1536156 - Let cloneElementVisually() return a promise that resolves when frames have been rendered. r=alwu,mconley,bzbarsky
This patch does the following:
- Makes cloneElementVisually() return a promise
- Plumbs an event from the MediaDecoderStateMachine's VideoSink to
  HTMLVideoElement
- Hooks the event up to resolve the promise from cloneElementVisually()
- Updates tests and their expectations.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 21:51:48 +00:00
Andreas Pehrson 9d878d1ca7 Bug 1596777 - Hook up the SecondaryVideoContainer with state mirroring. r=alwu
This better follows how MediaDecoder and MediaDecoderStateMachine was
architected.

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

--HG--
extra : moz-landing-system : lando
2019-11-20 16:32:52 +00:00
Andreas Pehrson dbaeed36a9 Bug 1172394 - Simplify MediaSink somewhat. r=padenot
This patches does several minor things:
- Moves SetSink (from setSinkid) to automatic coalescing of multiple calls
  through a Canonical/Mirror setup instead of a manual atomic counter.
- Simplifies the logic for when to update the sink in SetSink.
- Removes PlaybackParams as a general MediaSink property, as it only contains
  audio params.
- Makes PlaybackParams an internal AudioSink concept, that AudioSinkWrapper
  knows about.
- Ensures mMediaSink is only accessed on the decoder TaskQueue, to allow
  accessing mirrored members when creating it.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:05 +00:00
Andreas Pehrson 7800d98a51 Bug 1172394 - Refactor how DecodedStream is set up. r=padenot
This patch removes the responsibility of js-facing MediaStreamTracks from the
MediaDecoder stack, and moves the machinery for setting up DecodedStream to
higher order functions like state mirroring and watchables.

OutputStreamManager is completely gone, since it was designed to manage
MediaStreamTracks across multiple output streams for a single decoder,
on main thread. HTMLMediaElement took over its task in the previous patch.

The MediaDecoderStateMachine now has three control points for capturing:
- mOutputCaptured, which, if true, will capture all decoded data into
  mOutputTracks. If this is set, but mOutputTracks is empty, we are still
  waiting for tracks, and DecodedStream will not play any data. When tracks are
  set, a new DecodedStream is created that will play data through
  SourceMediaTracks piped into mOutputTracks.
- mOutputTracks, which is the set of tracks data is captured into, for
  forwarding to all the output tracks the media element is managing. This set of
  tracks is managed by the MediaDecoder owner, and must contain one audio track
  if the decoder is decoding audio, and one video track if the decoder is
  decoding video. It may be empty since output can be captured before metadata
  is loaded, or playback has ended.
- mOutputPrincipal, which is the principal of the decoded data. All data sent
  into SourceMediaTracks is tagged with this principal.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 22:40:07 +00:00
Csoregi Natalia 6ba30843e8 Backed out 15 changesets (bug 1500049, bug 1172394, bug 1546756, bug 1302379) for failures on browser_disabledForMediaStreamVideos.js. CLOSED TREE
Backed out changeset 355f090421a6 (bug 1500049)
Backed out changeset 306341d0b586 (bug 1302379)
Backed out changeset 3ff0d72d23a2 (bug 1546756)
Backed out changeset a4f256e68cef (bug 1172394)
Backed out changeset d0aa43657e8c (bug 1172394)
Backed out changeset edff95b6f724 (bug 1172394)
Backed out changeset 94bd21d9b396 (bug 1172394)
Backed out changeset 7e7baa73e1ef (bug 1172394)
Backed out changeset c3bd415507e8 (bug 1172394)
Backed out changeset 1c45b135318d (bug 1172394)
Backed out changeset c57c41e8c39e (bug 1172394)
Backed out changeset a796541fe5ef (bug 1172394)
Backed out changeset 89ad0b553b0f (bug 1172394)
Backed out changeset 744fb77a5833 (bug 1172394)
Backed out changeset afb4b226ff04 (bug 1172394)
2019-11-14 00:32:51 +02:00
Andreas Pehrson 82611c9705 Bug 1172394 - Simplify MediaSink somewhat. r=padenot
This patches does several minor things:
- Moves SetSink (from setSinkid) to automatic coalescing of multiple calls
  through a Canonical/Mirror setup instead of a manual atomic counter.
- Simplifies the logic for when to update the sink in SetSink.
- Removes PlaybackParams as a general MediaSink property, as it only contains
  audio params.
- Makes PlaybackParams an internal AudioSink concept, that AudioSinkWrapper
  knows about.
- Ensures mMediaSink is only accessed on the decoder TaskQueue, to allow
  accessing mirrored members when creating it.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:54 +00:00
Andreas Pehrson 53d52cde4e Bug 1172394 - Refactor how DecodedStream is set up. r=padenot
This patch removes the responsibility of js-facing MediaStreamTracks from the
MediaDecoder stack, and moves the machinery for setting up DecodedStream to
higher order functions like state mirroring and watchables.

OutputStreamManager is completely gone, since it was designed to manage
MediaStreamTracks across multiple output streams for a single decoder,
on main thread. HTMLMediaElement took over its task in the previous patch.

The MediaDecoderStateMachine now has three control points for capturing:
- mOutputCaptured, which, if true, will capture all decoded data into
  mOutputTracks. If this is set, but mOutputTracks is empty, we are still
  waiting for tracks, and DecodedStream will not play any data. When tracks are
  set, a new DecodedStream is created that will play data through
  SourceMediaTracks piped into mOutputTracks.
- mOutputTracks, which is the set of tracks data is captured into, for
  forwarding to all the output tracks the media element is managing. This set of
  tracks is managed by the MediaDecoder owner, and must contain one audio track
  if the decoder is decoding audio, and one video track if the decoder is
  decoding video. It may be empty since output can be captured before metadata
  is loaded, or playback has ended.
- mOutputPrincipal, which is the principal of the decoded data. All data sent
  into SourceMediaTracks is tagged with this principal.

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

--HG--
extra : moz-landing-system : lando
2019-11-13 08:55:39 +00:00
Andreas Pehrson 1bdb34c6ec Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 10:23:02 +00:00
Gurzau Raul 40dae37e00 Backed out 7 changesets (bug 1454998) for build bustages at MediaTrackGraph.h on a CLOSED TREE.
Backed out changeset 80417bdfa721 (bug 1454998)
Backed out changeset 8ff03f2f4ca2 (bug 1454998)
Backed out changeset ae6056b748d1 (bug 1454998)
Backed out changeset ab721cb2066b (bug 1454998)
Backed out changeset d0e8d413cd1c (bug 1454998)
Backed out changeset 3ce4dc7e9ae2 (bug 1454998)
Backed out changeset 6105a4176729 (bug 1454998)

--HG--
rename : dom/media/AudioCaptureTrack.cpp => dom/media/AudioCaptureStream.cpp
rename : dom/media/AudioCaptureTrack.h => dom/media/AudioCaptureStream.h
rename : dom/media/MediaTrackGraph.cpp => dom/media/MediaStreamGraph.cpp
rename : dom/media/MediaTrackGraph.h => dom/media/MediaStreamGraph.h
rename : dom/media/MediaTrackGraphImpl.h => dom/media/MediaStreamGraphImpl.h
rename : dom/media/MediaTrackListener.cpp => dom/media/MediaStreamListener.cpp
rename : dom/media/MediaTrackListener.h => dom/media/MediaStreamListener.h
rename : dom/media/ForwardedInputTrack.cpp => dom/media/TrackUnionStream.cpp
rename : dom/media/ForwardedInputTrack.h => dom/media/TrackUnionStream.h
rename : dom/media/webaudio/AudioNodeExternalInputTrack.cpp => dom/media/webaudio/AudioNodeExternalInputStream.cpp
rename : dom/media/webaudio/AudioNodeExternalInputTrack.h => dom/media/webaudio/AudioNodeExternalInputStream.h
rename : dom/media/webaudio/AudioNodeTrack.cpp => dom/media/webaudio/AudioNodeStream.cpp
rename : dom/media/webaudio/AudioNodeTrack.h => dom/media/webaudio/AudioNodeStream.h
2019-10-02 11:46:23 +03:00
Andreas Pehrson 36d89d91c8 Bug 1454998 - Rename streams to tracks. r=padenot,karlt,smaug
This renames the following (in alphabetical order, non-exhaustive):

AudioCaptureStream -> AudioCaptureTrack
AudioNodeStream -> AudioNodeTrack
AudioNodeExternalInputStream -> AudioNodeExternalInputTrack
DirectMediaStreamTrackListener -> DirectMediaTrackListener
MediaStream -> MediaTrack
  - Note that there's also dom::MediaTrack. Namespaces differentiate them.
MediaStreamGraph -> MediaTrackGraph
MediaStreamTrackListener -> MediaTrackListener
MSG -> MTG (in comments)
ProcessedMediaStream -> ProcessedMediaTrack
SharedDummyStream -> SharedDummyTrack
SourceMediaStream -> SourceMediaTrack
StreamTime -> TrackTime
TrackUnionStream -> ForwardedInputTrack
  - Because this no longer takes a union of anything, but only a single track
    as input.

Other minor classes, members and comments have been updated to reflect these
name changes.

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

--HG--
rename : dom/media/AudioCaptureStream.cpp => dom/media/AudioCaptureTrack.cpp
rename : dom/media/AudioCaptureStream.h => dom/media/AudioCaptureTrack.h
rename : dom/media/TrackUnionStream.cpp => dom/media/ForwardedInputTrack.cpp
rename : dom/media/TrackUnionStream.h => dom/media/ForwardedInputTrack.h
rename : dom/media/MediaStreamGraph.cpp => dom/media/MediaTrackGraph.cpp
rename : dom/media/MediaStreamGraph.h => dom/media/MediaTrackGraph.h
rename : dom/media/MediaStreamGraphImpl.h => dom/media/MediaTrackGraphImpl.h
rename : dom/media/MediaStreamListener.cpp => dom/media/MediaTrackListener.cpp
rename : dom/media/MediaStreamListener.h => dom/media/MediaTrackListener.h
rename : dom/media/webaudio/AudioNodeExternalInputStream.cpp => dom/media/webaudio/AudioNodeExternalInputTrack.cpp
rename : dom/media/webaudio/AudioNodeExternalInputStream.h => dom/media/webaudio/AudioNodeExternalInputTrack.h
rename : dom/media/webaudio/AudioNodeStream.cpp => dom/media/webaudio/AudioNodeTrack.cpp
rename : dom/media/webaudio/AudioNodeStream.h => dom/media/webaudio/AudioNodeTrack.h
extra : moz-landing-system : lando
2019-10-02 08:18:16 +00:00
Andreas Pehrson 3383369e5f Bug 1577495 - Use a single SharedDummyStream per HTMLMediaElement. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D43982

--HG--
extra : moz-landing-system : lando
2019-08-29 23:11:19 +00:00
Andreas Pehrson 04f22f20a5 Bug 1573102 - Remove mGraph from HTMLMediaElement::OutputMediaStream and OutputStreamManager. r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D43666

--HG--
extra : moz-landing-system : lando
2019-08-29 13:32:50 +00:00
Andreas Pehrson 4b3fa9c67e Bug 1493613 - Move MediaStream control from DOMMediaStream to MediaStreamTrack. r=padenot
This is inherently large, because modifying these bits of DOMMediaStream and
MediaStreamTrack affects all consumers and producers of all DOMMediaStreams and
MediaStreamTracks.

Things are generally much simpler now.

Producers of tracks now create a MediaStream in the graph, add it to a
MediaStreamTrackSource subclass that takes ownership of it, and add the source
to a MediaStreamTrack. Should the producer need a DOMMediaStream it is now much
simpler to create as the only thing needed is the current window. The stream is
a rather simple wrapper around an array of MediaStreamTracks.

HTMLMediaElement is still not as straight forward as other consumers since it
consumes the DOMMediaStream directly, as opposed to a set of tracks.
The new MediaStreamRenderer helper class helps bridge the gap between this fact
and the new track-based MediaStreamGraph interface, as it needs to juggle
registering multiple audio tracks for audio output. This hooks into existing
HTMLMediaElement logic and brings a welcome simplification to all the glue
previously needed there.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 07:58:17 +00:00
Andreas Pehrson 378c51c9f8 Bug 1177793 - Pass principal instead of forcing black when capturing cross-origin media resource. r=jya,jib
Differential Revision: https://phabricator.services.mozilla.com/D36896

--HG--
extra : moz-landing-system : lando
2019-07-08 21:15:10 +00: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
alwu 4fea1ece94 Bug 1532495 - part1 : only skip the 'completed' state during seamless looping mode. r=jya
The normal looping process is that, goes to `completed` state first, notify playback ended, and finally media element would call seek to the start position in order to start looping again.

However, if we're in the seamless looping mode, we can stay in `loopingDecoding` state and repeating the looping without going to other states. Otherwise, we should go to `completed` state if decoding has ended.

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

--HG--
extra : moz-landing-system : lando
2019-05-09 17:47:52 +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
Andreas Pehrson 1e4382f9fb Bug 1544650 - Always pre-create MediaStreamTracks for DecodedStream in MediaDecoder. r=padenot
This moves the responsibility for creating MediaStreamTracks from
DecodedStream::Start to MediaDecoder. This let's MediaDecoder create them as
soon as metadata is known. This gives the application guarantees on when tracks
can be expected to exist, and aligns with the spec that says they should be
created when metadata is known.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:46:30 +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
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
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 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
alwu 42c302ff20 Bug 1499903 - part1 : correct the events order when we're in the seamless looping. r=chunmin
When the media which has `loop` attribute is playing to the end, the spec mentions that media should do seek to the start position [1].

During seeking, the dispatched events order [2] for MediaElement should be
1. seeking
2. timeupdate
3. seeked

[1] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:attr-media-loop-2
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek

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

--HG--
extra : moz-landing-system : lando
2018-11-23 05:23: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
Dorel Luca 0a1112ab71 Backed out 3 changesets (bug 1499903) for frequently asserting at dom/media/MediaDecoderStateMachine.cpp
Backed out changeset 634b4c2dad35 (bug 1499903)
Backed out changeset 1a77eb131a2b (bug 1499903)
Backed out changeset ed4236eceb1a (bug 1499903)
2018-11-07 05:40:07 +02:00
alwu 0c4634255b Bug 1499903 - part1 : correct the events order when we're in the seamless looping. r=chunmin
When the media which has `loop` attribute is playing to the end, the spec mentions that media should do seek to the start position [1].

During seeking, the dispatched events order [2] for MediaElement should be
1. seeking
2. timeupdate
3. seeked

[1] https://html.spec.whatwg.org/multipage/media.html#playing-the-media-resource:attr-media-loop-2
[2] https://html.spec.whatwg.org/multipage/media.html#seeking:dom-media-seek

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

--HG--
extra : moz-landing-system : lando
2018-11-06 16:55:38 +00:00
alwu 62bedf505c Bug 1498440 - part3 : remove time-adjustment related codes in ReaderProxy. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D9188

--HG--
extra : moz-landing-system : lando
2018-11-05 22:04:12 +00:00