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

29 Коммитов

Автор SHA1 Сообщение Дата
Andreas Pehrson 8696a0f2ac Bug 1752351 - Do not rely on a timer for canvas.captureStream's TimerDriver. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D137158
2022-02-02 22:30:33 +00:00
Csoregi Natalia 17a1c33aea Backed out 7 changesets (bug 1752351) for failures on test_capture_throttled.html. CLOSED TREE
Backed out changeset 7d6d47f9429b (bug 1752351)
Backed out changeset 8f75bab2ab54 (bug 1752351)
Backed out changeset 0c171c3b5e27 (bug 1752351)
Backed out changeset 1694bfb744ee (bug 1752351)
Backed out changeset 801268f30e94 (bug 1752351)
Backed out changeset 861e5267cafc (bug 1752351)
Backed out changeset 34237ea4f82f (bug 1752351)
2022-02-02 22:15:04 +02:00
Andreas Pehrson 029c43cb7e Bug 1752351 - Do not rely on a timer for canvas.captureStream's TimerDriver. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D137158
2022-02-02 18:47:57 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +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
Andreas Pehrson 8028758d0e Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 10:22:53 +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 1bc37d8ea4 Bug 1454998 - Remove the notion of streams from MediaStreamGraph. r=padenot,karlt
This change mainly removes the `mTracks` member from MediaStream and moves all
associated members up a level, so that a MediaStream in practice represents a
single track.

Classes will be renamed in a future patch to reflect this.

Other changes include:

The new `mEnded` member of MediaStream changes meaning to only become true when
all data in the stream has been processed. It stems from
StreamTracks::Track::mEnded which used to become true as soon as the last bit of
data had been added to a track, and there could still be data in the track that
would get processed in future iterations. We are moving towards not having any
future data in tracks, which is why this change is ok to make -- keeping the old
behavior will soon not make sense.

TrackUnionStream is changed to no longer take a list of streams as input and
forward the union of their tracks to itself. Instead it's limited to having one
track as input at a time.

The autofinishing functionality that TrackUnionStream had before has been
transformed into an autoending functionality to allow it to defer ending until
its been told that it's ok to end through the control API. This lets a single
TrackUnionStream span the lifetime of multiple inputs, which will be useful for
making DecodedStream spec compliant with HTMLMediaElement::CaptureStream(), and
for implementing the currently discussed MediaRecorder::ReplaceTrack(), to name
a few potential use cases.

AudioNodeStreams used to only have a track (and thus an AudioSegment) if the
EXTERNAL_OUTPUT flag was enabled on them. With all MediaStreams now representing
a track, AudioNodeStreams inherently have an AudioSegment as a member. It is
however only used with data if the EXTERNAL_OUTPUT flag is enabled.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 08:17:51 +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 1b9ef949cd Bug 1423253 - Change CanvasCaptureMediaStream's driver to push instead of pull. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D22900

--HG--
extra : moz-landing-system : lando
2019-03-22 11:42:10 +00:00
Andreas Pehrson 43f4e58733 Bug 1423241 - Move CanvasCaptureMediaStream from stream listener to track listener. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D9105

--HG--
extra : moz-landing-system : lando
2018-11-23 15:01:36 +00:00
Andreas Pehrson 3461beb8a0 Bug 1423241 - Move CanvasCaptureMediaStream MSG cleanup to MediaStreamTrackListener. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D12265

--HG--
extra : moz-landing-system : lando
2018-11-23 15:00:02 +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
Andreas Pehrson 231a5e70d4 Bug 1330919 - Pass RefreshDriver timestamp to captured frames from canvas. r=jesup
MozReview-Commit-ID: 75L94Y5VcsQ

--HG--
extra : rebase_source : adb150b4a874cf8ac762146773c955f9dbf989d1
2017-01-13 11:56:03 +01:00
Andreas Pehrson b9775969a5 Bug 1301675 - Implement CanvasCaptureTrackSource that allows stopping canvas capture. r=jib
MozReview-Commit-ID: 81DD9FDOxsm

--HG--
extra : rebase_source : c2105ba9347f702a15232fbc1afa44f0f03a88c2
2016-09-12 18:00:14 +02:00
ctai 8fcb64e480 Bug 1266644 - Rename StreamBuffer to StreamTracks. r=jesup r=pehrsons
Rename StreamBuffer to StreamTracks. We still need a place to keep the track information in every MediaStream, even the StreamBuffer::Track::mSegment is empty.

--HG--
rename : dom/media/StreamBuffer.cpp => StreamTracks.cpp
rename : dom/media/StreamBuffer.h => StreamTracks.h
2016-01-26 10:49:01 +08:00
Andreas Pehrson be74876e25 Bug 1208371 - Add PrincipalHandle to MediaChunks. r=mt,jesup
PrincipalHandle is a thread safe pointer to a holder of (the main-thread-only
nsIPrincipal) that can be passed around the MSG.

A MediaStreamTrack whose source has just updated its principal, sets the new
principal aside (as its "pending principal"), and combines the new principal
into its current principal.

Then the source starts passing the new principal to the MediaStreamGraph as
a PrincipalHandle.

Changes to a track's PrincipalHandle on the MSG will be surfaced through the
MediaStreamTrackListener API. These changes are dispatched to main thread
and compared to a MediaStreamTrack's pending principal. In case of a match
the track knows the correct principal is flowing and can move the pending
principal to be the current principal and update any main thread principal
observers.

MozReview-Commit-ID: D0JXGWhQFFU

--HG--
extra : rebase_source : 296e269bb46fc5a85a9c3f90dfc0dc40e53572bc
2016-04-06 14:56:44 +02:00
Andreas Pehrson 37365c3483 Bug 1208371 - Pass parent window to DOMMediaStream through constructor. r=roc
MozReview-Commit-ID: AvBYQNADpyV

--HG--
extra : rebase_source : 8972b162fbcb017034f3c975ff9b725e52bcaf17
2016-01-05 10:16:20 +08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jean-Yves Avenard bc55ba93a4 Bug 1240411: P9. Clean up media headers. r=jwwang
Remove redundant virtual keyword and add missing override if any.
2016-01-19 19:47:36 +11:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Andreas Pehrson 3f1d386795 Bug 1161913 - Part 2. Request canvas to push out its next drawn frame instead of pulling it. r=mt
--HG--
extra : transplant_source : %FF%3D%E7%BE%A1%EA%BE%5E%00w%07%084%D8%27D%CFp%EB%D6
2015-09-17 12:36:57 +08:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Bruce Sun 38b1adfc6c Bug 1168075 - Fix CanvasCaptureMediaStream build fail for bluetooth2. r=pehrsons 2015-05-25 18:33:00 +08:00
Andreas Pehrson a0fcf04b67 Bug 1032848 - Part 2: Implement HTMLCanvasElement::CaptureStream. r=mt, r=jesup, r=jgilbert, r=gwright
--HG--
extra : transplant_source : o%13%2CuRJ2%21%B0%AE%5D%F0%B3%11%B30Y%5B%A3N
2015-05-13 14:04:41 +08:00
Andreas Pehrson bbda919298 Bug 1032848 - Part 1: Implement WebIDL for HTMLCanvasElement::CaptureStream. r=smaug, r=mt
--HG--
extra : transplant_source : %A5o%A1%80w%7F%F7%B9%7B%FD%C7%94Rv%F6Q%F0%FF%A4/
2015-05-13 14:04:30 +08:00