Commit Graph
88 Commits
Author SHA1 Message Date
Andreas Pehrson 656499f37a Bug 1296531 - Don't notify of queued data after a track ended. r=jesup
This could confuse listeners, since non-direct listeners would see more
data than their direct counterparts.

MozReview-Commit-ID: FC5rukQtrKL
2017-05-03 14:15:11 +02:00
Paul Adenot aadd3c3a24 Bug 1341555 - Consolidate use of the MSG's AbstractMainThread, and stop having AbstractMainThread on MediaStreams. r=pehrsons
MozReview-Commit-ID: 5hGDQcfpH6a
2017-06-29 11:30:57 -07:00
Andreas Pehrson 989447676a Bug 1332845 - Remove direct listeners before ending track in TrackUnionStream. r=jesup
There was a race where ending the track before removing the direct listener here,
allowed the source to append more data (notifying the direct listener)
after the consumer had been notified of the ending track.

MozReview-Commit-ID: E08UeMNQhGx
2017-04-07 17:35:26 +02:00
Bevis Tseng d028a1f078 Bug 1314833 - Part 2.2: Use AbstractThread::CreateDirectTaskDrainer() to Drain Direct Tasks Dispatched to MediaStreamGraph. f=rjesup,r=padenot,jwwang
MozReview-Commit-ID: 1KgE3uKu4CG
2016-12-07 22:00:12 -10:00
Michael Layzell c3575c8cdd Bug 1322390 - Iterate over a copy of mOwnedDirectListeners when removing them, r=pehrsons
MozReview-Commit-ID: PCLCEiKTFO
2016-12-08 15:54:46 -10:00
Dan Minor daee673a83 Bug 1172997 - Track suspended MediaStream inputs separately to optimize input processing; r=karlt
MozReview-Commit-ID: Id7vVSCFO76
2016-08-24 13:04:33 -04:00
Ryan VanderMeulen dbf61a2219 Merge m-c to autoland. a=merge 2016-08-25 08:14:36 -04:00
Andreas Pehrson e0e40610c8 Bug 1259788 - Remove direct track listeners from TrackUnionStream before inputs are removed. r=jesup
MozReview-Commit-ID: DTHF2pHEFSt
2016-08-23 18:08:19 +02:00
Andreas Pehrson fada6356cc Bug 1259788 - Implement disabled track modes for direct track listeners. r=jesup
MozReview-Commit-ID: H8TygONnCiv
2016-08-23 18:05:51 +02:00
Andreas Pehrson 2d5667b427 Bug 1259788 - Add a new disabled mode for MSG tracks. r=jesup
MozReview-Commit-ID: 1dMTR4Wmcd8
2016-08-15 14:19:42 +02:00
Kan-Ru Chen a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
ctai 0ee3adf86d Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3
2016-05-31 18:05:11 +08:00
Sebastian Hengst df26ea4a84 Backed out changeset ecee67ed1ddf (bug 1201363) 2016-08-03 19:33:24 +02:00
ctai 6c267804c5 Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3
2016-05-31 18:05:11 +08:00
Carsten "Tomcat" Book 88057f059a Backed out changeset e350d8c25d2e (bug 1201363) 2016-08-02 12:53:46 +02:00
ctai 0b2fd60850 Bug 1201363 - Do not copy video segment to StreamTracks in TrackUnionStream. r=jesup
Now everything is ready. We can make NotifyQueuedTrackChanges only triggered by TRACK_EVENT_CREATED and TRACK_EVENT_ENDED without breaking anything. Also we make TrackUnionStream no longer copying data in video case.

MozReview-Commit-ID: IgLx1mpBWB3
2016-05-31 18:05:11 +08:00
ctai 247106d0a0 Bug 1266646 - Move group of MediaStreamListener to a new header file. r=pehrsons
This can reduce the include header dependency. MediaStreamVideoSink will inherit from DirectMediaStreamTrackListener. But we can't use forward declaration on MediaStreamListener because the usage of nsTArray<RefPtr<MediaStreamVideoSink>>.

MozReview-Commit-ID: 328s4Kw9NvW
2016-06-30 15:07:48 +08:00
ctai a589c57c1f Bug 1266646 - Rename MediaStreamDirectListener and MediaStreamTrackDirectListener to DirectMediaStreamListener and DirectMediaStreamTrackListener respectively. r=pehrsons
Rename those two function to better name alignment with AddDirectListener and AddDirectTrackListener.

MozReview-Commit-ID: 6QY08oyih1X
2016-04-29 11:45:25 +08:00
Andreas Pehrson cb934180a4 Bug 1280445 - Remove wrapper from MediaStream. r=jesup, r=padenot
MozReview-Commit-ID: CTCFloIUXKa
2016-06-29 12:27:13 +02:00
Andreas Pehrson edbfea26fb Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg
2016-05-24 13:23:50 +02:00
Andreas Pehrson 1abab5d75b 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
2016-06-07 16:20:29 +02:00
Sebastian Hengst ddf5f47cd4 Backed out 9 changesets (bug 1208373) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 95412432bf10 (bug 1208373)
Backed out changeset 38e3e48c8dd0 (bug 1208373)
Backed out changeset 72cf70065470 (bug 1208373)
Backed out changeset 8cffa26910a8 (bug 1208373)
Backed out changeset 9a8c5a9bb9d5 (bug 1208373)
Backed out changeset bc120c9071bb (bug 1208373)
Backed out changeset fb8a0b464701 (bug 1208373)
Backed out changeset 5ddb73097cfd (bug 1208373)
Backed out changeset c4827087a333 (bug 1208373)
2016-06-14 11:06:51 +02:00
Sebastian Hengst cb1a123799 Backed out 3 changesets (bug 1274221) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 80443106b263 (bug 1274221)
Backed out changeset 795bcfd6223d (bug 1274221)
Backed out changeset 30c253e762c6 (bug 1274221)
2016-06-14 11:05:33 +02:00
Sebastian Hengst 0f229b854b Backed out changeset c89b8cc657b2 (bug 1266646) 2016-06-13 21:23:53 +02:00
ctai 836786922a Bug 1266646 - Rename MediaStreamDirectListener and MediaStreamTrackDirectListener to DirectMediaStreamListener and DirectMediaStreamTrackListener respectively. r=jesup,pehrsons
Rename those two function to better name alignment with AddDirectListener and AddDirectTrackListener.

MozReview-Commit-ID: 6QY08oyih1X
2016-04-29 11:45:25 +08:00
Andreas Pehrson a5c047b3a8 Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg
2016-05-24 13:23:50 +02:00
Andreas Pehrson 4c87bedac3 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
2016-06-07 16:20:29 +02:00
Carsten "Tomcat" Book c1a6f45089 Backed out changeset 5454dcaa31ff (bug 1208373) 2016-06-09 15:18:42 +02:00
Carsten "Tomcat" Book ead62c6397 Backed out changeset 45bfebd36a99 (bug 1274221) 2016-06-09 15:18:36 +02:00
Andreas Pehrson bb257edc6d Bug 1274221 - Ensure MediaStreamListeners are always notified of created and ended tracks. r=ctai, r=jesup
This means that when a MediaStreamListener is added to a stream, we'll call
NotifyQueuedTrackChanges with TRACK_EVENT_CREATE for all tracks that already
exist.

Likewise, we'll call NotifyQueuedTrackChanges with TRACK_EVENT_ENDED for all
tracks that exist and have ended.

This fixes potential race conditions where a track was created and/or ended
before the listener was asynchronously added.

MozReview-Commit-ID: G3juhfiZMtg
2016-05-24 13:23:50 +02:00
Andreas Pehrson 00b13d950b 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
2016-06-07 16:20:29 +02:00
ctai ef2131576b Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData. r=jesup
MozReview-Commit-ID: JBRdxD1wA4c
2016-06-07 12:25:04 +08:00
ctai ce516618f7 Bug 1266647 - Clean NotifyQueuedTrackChange to only notify when command is track create and track end. r=jesup r=pehrsons
MozReview-Commit-ID: 4Pp3xHeBIW4
2016-05-04 16:08:44 +08:00
ctai 8352ffa4ea 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.
2016-01-26 10:49:01 +08:00
Andreas Pehrson bcdcd5e645 Bug 1208371 - Switch MediaPipeline to use direct listeners on tracks. r=jesup,bwc
MozReview-Commit-ID: BSSfkTwXoVN
2016-03-18 14:21:51 +01:00
Andreas Pehrson eceb6ea30b Bug 1208371 - Add DirectTrackLister to MediaStreamGraph and MediaStreamTrack. r=roc,jesup
MozReview-Commit-ID: HRWa6A35FSC
2016-03-03 17:28:37 +01:00
Andreas Pehrson 38bfdc68fe Bug 1208371 - Forward input stream and track id on regular track changes for union streams. r=roc
MozReview-Commit-ID: 3JsDI3jsnBb
2016-01-05 10:16:26 +08:00
Andreas Pehrson 30456ca0fc Bug 1208371 - Add a MediaStreamTrackListener to MediaStreamGraph. r=roc
MozReview-Commit-ID: 6KHzimw9kiP
2016-03-03 17:27:59 +01:00
Andreas Pehrson a9efa69c8a Bug 1208371 - Allow MediaInputPorts mapped to a destination TrackID. r=roc
This lets us know the track's TrackID in the destination stream before
the input port has been processed.
For sanity we only allow mapping to a destination TrackID if the
destination stream does not have any TRACK_ANY input ports already
assigned to it as that can cause intermittent TrackID collisions.

MozReview-Commit-ID: ClFyQl0nYFC
2016-01-05 10:16:22 +08:00
Birunthan Mohanathas bfee0fb40c Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda d871b9515f 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 245cd6a02f Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
sajitk 13171aa66e Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher 9ec1c7554a Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE 2015-11-11 09:36:56 -08:00
sajitk 47326a1fc0 Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-11 06:52:00 +01:00
Andreas Pehrson b756a21b79 Bug 1170958 - Remove ProcessedMediaStream::ForwardTrackEnabled. r=roc,jesup
TrackUnionStream guarantees that TrackIDs are maintained if no tracks
have claimed them before.

In the gUM case, we have a SourceMediaStream which we wholly own (the
DOMMediaStream's Input stream), piped into a TrackUnionStream which
no-one external is able to add tracks to (the DOMMediaStream's Owned
stream) - addTrack()ed tracks are added to the DOMMediaStream's Playback
stream.

The MediaStreamTracks being enabled/disable refer to a TrackID in the
DOMMediaStream's Owned stream.

Alas, we don't need to forward a track's enabled state, we can just do
it on the source.
2015-09-30 09:31:54 +08:00
Andreas Pehrson 4fa3929d86 Bug 1170958 - Improve logging of MediaStreams and playback. r=roc 2015-09-30 09:31:54 +08:00
Andreas Pehrson f183ed6c8d Bug 1170958 - Allow MediaInputPort to lock to a specific input track. r=roc
Locking to specific tracks lets us dynamically remove and add single
tracks to a ProcessedMediaStream.
2015-09-30 09:31:53 +08:00
Wes Kocher 954ce67cb5 Backed out 9 changesets (bug 1170958) for frequent test_getUserMedia_addTrackRemoveTrack.html failures
Backed out changeset 277c1f8098d1 (bug 1170958)
Backed out changeset aa86bb9eea95 (bug 1170958)
Backed out changeset 8af8b85a4b26 (bug 1170958)
Backed out changeset ec1bf225e9cb (bug 1170958)
Backed out changeset 4a04ddca2b6b (bug 1170958)
Backed out changeset e85c9977a311 (bug 1170958)
Backed out changeset 16b40ff04e8f (bug 1170958)
Backed out changeset ad206925c84a (bug 1170958)
Backed out changeset 2106eccec79b (bug 1170958)
2015-09-25 13:08:55 -07:00
Andreas Pehrson 56ea0b7c51 Bug 1170958 - Remove ProcessedMediaStream::ForwardTrackEnabled. r=roc,jesup
TrackUnionStream guarantees that TrackIDs are maintained if no tracks
have claimed them before.

In the gUM case, we have a SourceMediaStream which we wholly own (the
DOMMediaStream's Input stream), piped into a TrackUnionStream which
no-one external is able to add tracks to (the DOMMediaStream's Owned
stream) - addTrack()ed tracks are added to the DOMMediaStream's Playback
stream.

The MediaStreamTracks being enabled/disable refer to a TrackID in the
DOMMediaStream's Owned stream.

Alas, we don't need to forward a track's enabled state, we can just do
it on the source.
2015-09-25 23:23:18 +08:00