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

97 Коммитов

Автор SHA1 Сообщение Дата
Andreas Pehrson ca18203053 Bug 1208371 - Remove CORSMode methods from DOMMediaStream. r=mt
MozReview-Commit-ID: KiJPucdErFV

--HG--
extra : rebase_source : 776469c4c19b78fa510d423065f4c9264ae27bf6
2016-01-05 10:16:27 +08:00
Andreas Pehrson a47ce20618 Bug 1208371 - Rename CreateOwnDOMTrack/CreateClonedDOMTrack to CreateDOMTrack/CloneDOMTrack. r=jib
MozReview-Commit-ID: DOGiwcYycJY

--HG--
extra : rebase_source : 197fc7a7c5d36200f987c38f26ab77ec8ea2d290
2016-01-05 10:16:26 +08:00
Andreas Pehrson 6d73d83ee7 Bug 1208371 - Various cleanups in DOMMediaStream/MediaStreamTrack. r=jib
MozReview-Commit-ID: DE0Gqto3Led

--HG--
extra : rebase_source : 8c49e98f0740b4e658010b98f57d090776930666
2016-01-21 19:05:53 +08:00
Andreas Pehrson d81423155b Bug 1208371 - Implement DOMMediaStream::Clone() r=smaug,jib,roc
MozReview-Commit-ID: FZQIWYZcEDr

--HG--
extra : rebase_source : 33336f84b8ab4f4fe9cc5bf734a7e3b587ff8729
2016-01-22 16:51:37 +08:00
Andreas Pehrson 660d9407e0 Bug 1208371 - Implement MediaStreamTrack::Clone(). r=smaug,jib,roc
MozReview-Commit-ID: HrL0RFMcG4B

--HG--
extra : rebase_source : 2b07983ebec0c0a7016b8a0e0e64ad38486d035b
2016-01-22 16:27:51 +08:00
Andreas Pehrson 50e2cdae29 Bug 1208371 - Kill nsDOMUserMediaStream with fire. r=jib
MozReview-Commit-ID: 4KWvwqRj6Qc

--HG--
extra : rebase_source : 2d305763710b6f7750a9b6300513493fa96e48b6
2016-01-24 16:05:16 +08:00
Andreas Pehrson 0396985d77 Bug 1208371 - Route ApplyConstraints through MediaStreamTrackSource. r=jib
MozReview-Commit-ID: CnJnxszKU4o

--HG--
extra : rebase_source : f5ef65897108b3feadd51b8b11a47f65a7a71ff1
2016-02-01 22:43:38 +08:00
Andreas Pehrson 5f32f21927 Bug 1208371 - Remove MediaStreamTrack::GetStream. r=jib
MozReview-Commit-ID: GP0Mo3CZZ8E

--HG--
extra : rebase_source : 196b149a180e033e021366790bf662037c4ec89f
2016-02-01 22:48:05 +08:00
Andreas Pehrson dcc36821e9 Bug 1208371 - Fix DOMMediaStream::OwnsTrack. r=roc
MozReview-Commit-ID: 3uPqOYJZq2k

--HG--
extra : rebase_source : f4dba615271b884298efd0c646f7104c45c372d8
2016-01-05 10:16:25 +08:00
Andreas Pehrson 053fc72107 Bug 1208371 - Remove some no longer necessary principal methods on DOMMediaStream. r=mt
MozReview-Commit-ID: LTVhpY6Bzgf

--HG--
extra : rebase_source : eadca5e713154a265bc81fd5bcccea5216105417
2016-01-14 20:43:35 +08:00
Andreas Pehrson 58ac7b5fd2 Bug 1208371 - Make remaining DOMMediaStream principal sources use MediaStreamTrack. r=mt
MozReview-Commit-ID: 1hgHp5dlBZJ

--HG--
extra : rebase_source : 30d7d5bccc663ef00a640b4f385278a336191088
2016-02-01 22:46:34 +08:00
Andreas Pehrson f2fb4ac630 Bug 1208371 - Let DOMMediaStream base its principal on the tracks it contains. r=mt
MozReview-Commit-ID: 7MtYk2GnpeS

--HG--
extra : rebase_source : 88903bea8491d365998df11056a6de6c697c613d
2016-03-16 16:08:43 +01:00
Andreas Pehrson 5cc032f3e6 Bug 1208371 - Turn DOMMediaStream::PrincipalChangeObserver into PrincipalChangeObserver<DOMMediaStream>. r=mt
MozReview-Commit-ID: JkBUEGdavZX

--HG--
extra : rebase_source : aca48148a30fc16db6a6435c592480a61174d96b
2016-01-22 12:10:41 +08:00
Andreas Pehrson 53d0645fe0 Bug 1208371 - Add DOMMediaStream::GetTrackById/GetOwnedTrackById. r=jib
MozReview-Commit-ID: 9qwW8CsB1eJ

--HG--
extra : rebase_source : f3f806fb5828ea47365b73233f5cfd4f52bdb938
2016-01-05 10:16:23 +08:00
Andreas Pehrson 2563887b60 Bug 1208371 - Add MediaStreamTrack::Graph(). r=jib
MozReview-Commit-ID: 643Jvp98D9z

--HG--
extra : rebase_source : baae53840aeda4d0f08a6442b11fa59d9c187995
2016-01-05 10:16:23 +08:00
Andreas Pehrson 24c7e122aa Bug 1208371 - Remove obsolete SetTrackEnabled() from DOMMediaStream r=roc
MozReview-Commit-ID: rYB2yACej8

--HG--
extra : rebase_source : 3feb238486c9488723c54c9819fb8848fc7a131c
2016-01-05 10:16:23 +08:00
Andreas Pehrson f52f9b9310 Bug 1208371 - Add convenience method for checking if TrackID is explicit. r=roc
MozReview-Commit-ID: 330Fk17FJD4

--HG--
extra : rebase_source : 27395cdf427e6096f90097c1502b7930162d2c3e
2016-01-05 10:16:22 +08:00
Andreas Pehrson c317ec4c33 Bug 1208371 - Let FindOwnedDOMTrack operate on input stream. r=roc
This let's us use FindOwnedDOMTrack before the TrackID in mOwnedStream
is known.

This is necessary for a stream clone with multiple tracks whose original
TrackID is the same.

MozReview-Commit-ID: J3OvbiNb8X

--HG--
extra : rebase_source : 25f2bddf07de99d187c5d546bfc5eac50b7d6295
2016-01-05 10:16:22 +08:00
Andreas Pehrson 01ed4f0e89 Bug 1208371 - Let MediaStreamTracks know their TrackID at the source. r=roc
For original tracks, the input TrackID is the same as in its
owned stream.
For cloned tracks, the input TrackID comes from the original track,
since no guarantees about TrackIDs in a cloned DOMMediaStream's owned
stream can be given
(imagine e.g., `new MediaStream([trackID1FromStreamX, trackID1FromStreamY]).clone()`).

MozReview-Commit-ID: 9iulggncBZ7

--HG--
extra : rebase_source : 699f6bb1d0e6e22a696bf5ca616594dd5b002ec5
2016-01-05 10:16:22 +08:00
Andreas Pehrson 5401608e6c Bug 1208371 - Add MediaStreamTrackSourceGetter interface. r=roc
This allows DOMMediaStream to assign MediaStreamTrackSources to
dynamically created MediaStreamTracks.

MozReview-Commit-ID: 3v91zLiqfl7

--HG--
extra : rebase_source : 4fe67e92b9c833fe5ba964fc5f3b11ba21447f36
2016-01-05 10:16:21 +08:00
Andreas Pehrson 9899305f28 Bug 1208371 - Add a MediaStreamTrackSource interface. r=roc
This lets a MediaStreamTrack communicate with its source/producer on the
main thread. It's for now used for stopping a track at the source and
retrieving some metadata, but it could also be a link between actual
sinks of a track and the source, to for instance let the source optimize
by scaling down the resolution when all sinks want lowres-video.

MozReview-Commit-ID: D4SJLr0aqhJ

--HG--
extra : rebase_source : ea511b5c86ca4836bfa980825f04617fef498261
2016-04-06 14:46:56 +02:00
Andreas Pehrson 497cedf7f8 Bug 1208371 - Make AudioCaptureStream startable. r=padenot
This allows us to add the JS-side MediaStreamTrack before the MSG-side
track.

MozReview-Commit-ID: BJfbivaljtU

--HG--
extra : rebase_source : f71acc42ca79974a2d5123eff0debc513fe719ee
2016-03-03 17:26:31 +01: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
Jean-Yves Avenard c4dd7379f5 Bug 1256626. Workaround Microsoft macro silliness. r=me
Unrelated to changes to 1256626, but obviously broke the unified build system ON A CLOSED TREE.

MozReview-Commit-ID: 3vklyHWFtgp
2016-03-19 14:04:33 +11:00
Gerald Squelart cb8bb9067d Bug 1248308 - Fix dom/media non-unified build errors - r=jya 2016-02-17 08:55:33 +11:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Sotaro Ikeda 233ac65d1e Bug 1239893 - Add gonk SidebandStream handling to DOMHwMediaStream r=roc 2016-01-26 02:01:43 -08:00
Emilio Cobos Álvarez b5364082de Bug 866513 - Non-empty MediaStreamTrack labels. r=jib 2016-01-16 13:39:00 +01:00
Jan-Ivar Bruaroey b2ed80be62 Bug 1229240 - make applyConstraints() reject instead of crash on non-gUM tracks. r=jesup
--HG--
extra : rebase_source : fa199b551ddc750b1dbdb20c1d0feafa8e8bc908
2015-12-01 15:27:26 -05:00
Sotaro Ikeda 6247e12af2 Bug 1205713 - Merge ImageHostOverlay/ImageClientOverlay to ImageHost/ImageClient r=nical 2015-12-29 01:07:33 -08:00
David Anderson 8e086a182c Remove Gonk usage of ImageContainer::CreateImage. (bug 1222910, r=sotaro) 2015-11-17 00:09:01 -08:00
sajitk 582e1a55fa Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk 3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Andreas Pehrson 05d7a65fae Bug 1219711 - Ensure MediaStreamTrack.enabled propagates across peer connections. r=jesup 2015-10-30 14:13:15 +08:00
Andreas Pehrson 11cfd4237b Bug 1212783 - Add a MediaStreamTrack to DOMCameraControl. r=aosmond
Without this, HTMLMediaElement cannot see that the camera stream contains
video so it won't hold the screen wake lock.

--HG--
extra : commitid : 1dGzbvOQkLe
extra : rebase_source : 23340b3c01f72cc82c02f4762f4fe10f1b129a3a
2015-10-22 12:36:23 +08:00
Andreas Pehrson 359f426a06 Bug 1212783 - Expose TrackPort in DOMMediaStream.h r=roc
--HG--
extra : commitid : 1dGzbvOQkLe
extra : rebase_source : 55bfaa60b8855752b65405a08f0fc10e45e1f613
2015-10-22 12:36:22 +08: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
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Andreas Pehrson f6ecc34621 Bug 1070216 - Guard against a null MediaInputPort in DOMMediaStream::FindPlaybackDOMTrack(). r=roc
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 6a1c4b15de505b195c0dd2f6c8d7b6ec4571964d
2015-10-15 01:08:33 +08:00
Andreas Pehrson 63f62a0f86 Bug 1070216 - Implement MediaStream constructors. r=smaug,jib,padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 76cc0498fa18159657760f6622f49f4b6938bdfc
2015-10-15 01:08:33 +08:00
Andreas Pehrson 419c440d96 Bug 1070216 - Guard against adding a track owned by one MSG to a stream owned by another. r=padenot
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 83b604c3b8c69c9edf55bdfaaebe67b6f2251c46
2015-10-15 01:08:33 +08:00
Andreas Pehrson 0391659f93 Bug 1070216 - constify DOMMediaStream::Get[Audio/Video]Tracks(). r=roc
--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : ef9c0288c603ff81191ac8bd8e16910d5360673e
2015-10-15 01:08:33 +08:00
Andreas Pehrson ab1e81e08f Bug 1070216 - Split DOMMediaStream::InitStreamCommon into three. r=roc
This allows us to initiate a DOMMediaStream into three states:
* One that has input, owned and playback streams, for data producers
  like gUM or RTCPeerConnection.
* One with owned and playback streams, for cloned DOM streams.
  If a cloned DOM stream has an empty input stream connected to its
  owned stream, both are regarded as not having current data.
* One with only a playback stream, for when it has been created with the
  default constructor from JS. Its track set can only be changed by
  addTrack() and removeTrack() which when called only affect mPlaybackStream.

--HG--
extra : commitid : J9Hj3Lffpg
extra : rebase_source : 03fd61130c8948c1be996e536eb3078bb09d8480
2015-10-15 01:08:32 +08:00
Andreas Pehrson eb480b5acd Bug 1103188 - Break out MediaTrackListListener to an interface. r=roc
Other modules than MediaTrackLists may want to receive updates on a
DOMMediaStream's track set. This moves the MediaTrackListListener out of
the MediaTrackList class into DOMMediaStream as a general interface.

The logic for adding MediaTracks to the MediaTrackList when
MediaStreamTracks are added or removed from a DOMMediaStream is moved to
HTMLMediaElement as this fits the model better - HTMLMediaElement is the
owner of the MediaTrackLists.

--HG--
extra : commitid : 3I8mAeBB3oL
extra : rebase_source : 66b8ffcfb5343811c181e4169f295b08494f2ee0
2015-09-30 09:32:06 +08:00
Andreas Pehrson 0239788481 Bug 1103188 - Deprecate DOMMediaStream::Stop(). r=jib
--HG--
extra : commitid : 3I8mAeBB3oL
extra : rebase_source : cc7351a34694b7b0e822bcd0b7025ded0ab54b9d
2015-09-30 09:32:06 +08:00
Andreas Pehrson aa989a17b6 Bug 1103188 - MediaStream::AddTrack/RemoveTrack implementation. r=roc
--HG--
extra : commitid : 3I8mAeBB3oL
extra : rebase_source : 7c8a9d50e5dbb672c773faa3675fe674aed9fb67
2015-09-30 09:32:05 +08:00
Andreas Pehrson f7821ba184 Bug 1170958 - Destroy track-locked MediaInputPorts when the track ends. r=roc
This is needed to make tests pass until we have bug 1208316 implemented.

--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : b7cb9cb1678a582fbf85b729b8f43508889f5c78
2015-09-30 09:31:54 +08:00
Andreas Pehrson 0a75ffee8d Bug 1170958 - Add DOMMediaStream::OwnedStreamListener. r=roc
A DOMMediaStream's owned stream is piped from the input stream which is
under the control of the DOMMediaStream's owner/producer (like
captureStream or gUM). When producers like these create new tracks after
the stream has already been created (the initial set should be available
to JS synchronously), it is nice if the DOMMediaStream picks them up
automatically and create the corresponding MediaStreamTracks.

The OwnedStreamListener added here does just that; creates an owned
MediaStreamTrack when a track appeared in the stream that didn't already
have a MediaStreamTrack.

It also moves the logic for ended tracks from the PlaybackStreamListener
to the OwnedStreamListener as we previously would see a track end in the
playbak stream after removeTrack() and that would be interpreted as the
track ending at the source.

--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : ee7d81282ee3fe0e05b55358dee8fc97a22473fe
2015-09-30 09:31:54 +08:00
Andreas Pehrson 5b79fead9f Bug 1170958 - Improve logging of MediaStreams and playback. r=roc
--HG--
extra : commitid : GPSNwBVyD4j
extra : rebase_source : 7463915dc8f14e6f9dde2e934e55b9c68d4148d6
2015-09-30 09:31:54 +08:00