Commit Graph

97 Commits

Author SHA1 Message Date
Andreas Pehrson
e93d5f7b7d Bug 1208328 - Implement MediaStream.onaddtrack. r=jib, r=smaug
MozReview-Commit-ID: JVZO5mlxvgW

--HG--
extra : rebase_source : 49b0ebaff593c28b727602d7b61bab5feea80485
extra : source : ba0529f6b0733534d50fa842dfebd52c6b477140
2016-05-31 09:29:52 +02:00
Andreas Pehrson
b116cbbb27 Bug 1274221 - Make FindOwnedDOMTrack look for (optionally) unique tracks. r=ctai
MozReview-Commit-ID: 1y8YuwJWIS5

--HG--
extra : rebase_source : 0baab5c71f5e935f69dd3430fc6ce0a7f6c866b3
extra : intermediate-source : ce89c5b1f32de13ca7128de14538eabcb749b925
extra : source : c2154e0e122ac3981d1c5c7e748633a64111cbf7
2016-05-24 13:26:25 +02:00
Andreas Pehrson
d551df2bcf Bug 1208373 - Introduce a new blocking mode to MediaInputPort. r=jesup
This lets us notify about a created TrackUnionStream track (and since it was
created, we can notify when it ends), even though it has been blocked from main
thread.

MozReview-Commit-ID: HyopzISBfbb

--HG--
extra : rebase_source : a3d676257473bba08190b8e2b24d027c42306621
extra : intermediate-source : 5454dcaa31ff8eb060b6f1531a376dcbc24ffb4d
extra : source : 690904309e169aa74f95163f0d796493ef882972
2016-06-07 16:20:29 +02:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Carsten "Tomcat" Book
79d88f89e8 Backed out changeset 5454dcaa31ff (bug 1208373) 2016-06-09 15:18:42 +02:00
Carsten "Tomcat" Book
60e86b393e Backed out changeset ce89c5b1f32d (bug 1274221) 2016-06-09 15:18:38 +02:00
Carsten "Tomcat" Book
89552f5055 Backed out changeset ba0529f6b073 (bug 1208328) 2016-06-09 15:18:32 +02:00
Andreas Pehrson
2597c73af2 Bug 1208328 - Implement MediaStream.onaddtrack. r=jib, r=smaug
MozReview-Commit-ID: JVZO5mlxvgW

--HG--
extra : rebase_source : b2ec734dc408e96c9a9f265c11c7308895c3b6ce
2016-05-31 09:29:52 +02:00
Andreas Pehrson
9c625f8d0f Bug 1274221 - Make FindOwnedDOMTrack look for (optionally) unique tracks. r=ctai
MozReview-Commit-ID: 1y8YuwJWIS5

--HG--
extra : rebase_source : fbf328d1ea7ba94d0cf5f4c9bf2e0e4738cf5f42
extra : source : c2154e0e122ac3981d1c5c7e748633a64111cbf7
2016-05-24 13:26:25 +02:00
Andreas Pehrson
5b155d5add Bug 1208373 - Introduce a new blocking mode to MediaInputPort. r=jesup
This lets us notify about a created TrackUnionStream track (and since it was
created, we can notify when it ends), even though it has been blocked from main
thread.

MozReview-Commit-ID: HyopzISBfbb

--HG--
extra : rebase_source : 55d6dd5d6a34a0b499b45e0b72f900fc37cff1bf
extra : source : 690904309e169aa74f95163f0d796493ef882972
2016-06-07 16:20:29 +02:00
Andreas Pehrson
05c6dff3b5 Bug 1208390 - Implement MediaStream.getTrackById(). r=jib, r=smaug
MozReview-Commit-ID: 5a90ZOx7eUE

--HG--
extra : rebase_source : b2fcb6aa7bc0a442cc80ecf3b9dce81415245b41
2016-05-20 13:01:30 +02:00
ctai
4e89100cf8 Bug 1266644 - Rename DOMMediaStream:: CreateXXXStream to DOMMediaStream:: CreateXXXStreamAsInput. r=jesup r=pehrsons
MozReview-Commit-ID: 4X0Q1XuENa4
2016-04-25 11:43:27 +08: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
1e072d6fc3 Bug 1266680 - Rename BlockTrackId to BlockSourceTrackId. r=jesup
It wasn't clear which TrackID should be passed to MediaInputPort::BlockTrackId(); source or destination.

MozReview-Commit-ID: I9LoSjdpRwE

--HG--
extra : rebase_source : 20eeb5e4ee47eb1cdf00e94cdc72ee11177bbee2
2016-04-22 17:14:26 +02:00
Thomas Zimmermann
d08ecacecf Bug 1262808: Refactor |PrincipalID| to |PrincipalHandle| in Gonk media code, r=rjesup
This patch renames |PrincipalID| to |PrincipalHandle| and fixes related
media code of Gonk.
2016-04-12 16:54:41 +02:00
Andreas Pehrson
b40a807720 Bug 1208371 - Move GetCurrentTime undef to DOMMediaStream.cpp. r=jesup
Not sure why this surfaced now. Include ordering must have changed.

MozReview-Commit-ID: 43eGMdVoycw

--HG--
extra : rebase_source : 5013c1bb93060ea593bca96fe84f3418ea1aefa3
2016-01-22 17:23:10 +08:00
Andreas Pehrson
ee5913bb8b Bug 1208371 - Move MediaStreamTrack's label to MediaStreamTrackSource. r=jib
MozReview-Commit-ID: Aj7Cht4zxc6

--HG--
extra : rebase_source : c454a9f2b81a6a1eb574c1abee0fab64abbe5b72
2016-01-22 16:27:37 +08:00
Andreas Pehrson
6862394047 Bug 1208371 - Ensure DOMMediaStream principals reflect what could reside in their playback streams. r=mt,jesup
Calculating a principal when adding a track is easy - just combine the new
track principal into the stream's principal.

When removing a track it's a bit trickier. The DOMMediaStream has to wait until
the MediaStreamGraph has removed the track from the underlying playback stream.

We do this by letting the MediaStreamGraph return a Pledge (single threaded
Promise) when blocking a track in a stream (the way we end removed tracks).
The pledge gets passed to the MediaStreamGraph and when the block has been
applied it is passed back to the main thread where it is finally resolved
and the DOMMediaStream may recompute its principal once all outstanding
track removals have been applied.

MozReview-Commit-ID: 3QP0YcDyfGf

--HG--
extra : rebase_source : 6642849ec1c7d774467395dee82b0a37fdd33a99
2016-03-16 16:00:34 +01: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
0b6623e60e Bug 1208371 - Remove PeerIdentity from DOMMediaStream. r=mt
MozReview-Commit-ID: 5e4TxCiWwGF

--HG--
extra : rebase_source : 7ee47cf4e606cb2d90b0bbb8237d8155bc96d2ee
2016-01-05 10:16:29 +08:00
Andreas Pehrson
eb7cd31741 Bug 1208371 - Make PeerIdentity RefCounted. r=mt
This so it can be shared between multiple tracks.

MozReview-Commit-ID: 3mjQImVY0f8

--HG--
extra : rebase_source : 9c8d11bb38e06a2cf5f7bf1c24ca657e28387682
2016-01-05 10:16:28 +08:00
Andreas Pehrson
705ec66ce8 Bug 1208371 - Remove ref counting from DOMMediaStream::TrackListener. r=roc
This makes it consistent with PrincipalChangeObserver.

MozReview-Commit-ID: 91PtqFZRcW6

--HG--
extra : rebase_source : e39abb668be7fbd0dae0a701ec17b048c8761879
2016-01-05 10:16:28 +08:00
Andreas Pehrson
c742b9dadf Bug 1208371 - Change HTMLMediaElement video sinks to check principal for video only tracks. r=mt
MozReview-Commit-ID: KGbyJDgpBOn

--HG--
extra : rebase_source : 526556a2174417ec68cb0a84acb1f3fe704ebaf0
2016-01-26 15:36:52 +08:00
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
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
70707f7c85 Bug 1208371 - Make HTMLMediaElement::CaptureStream pass its principal to MediaStreamTrack. r=mt
MozReview-Commit-ID: 7ERLRSM8fz6

--HG--
extra : rebase_source : 99504bb19ac35eea6889a507589710c3575e8b0f
2016-01-14 18:34:39 +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
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
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
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
88628853b2 Bug 1208371 - Move OnTracksAvailableCallback out of DOMMediaStream. r=roc
So it can be forward declared.

MozReview-Commit-ID: 4RH7p8AzO84

--HG--
extra : rebase_source : e9c4ef72029de4ed09dca3b51ba2b46829f41d14
2016-01-05 10:16:21 +08: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
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02: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
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