Commit Graph
162 Commits
Author SHA1 Message Date
Jan-Ivar Bruaroey 83de036235 Bug 1354642 - Add MakeRefPtr<> helper class. r=Ehsan
MozReview-Commit-ID: es34uMTZ00
2017-04-07 15:08:42 -04:00
Jean-Yves Avenard fa1fcd710b Bug 1319987: P9. More coding style fixes. r=gerald
MozReview-Commit-ID: DhFRqkWQZny
2017-01-27 13:20:37 +01: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
Andreas Pehrson f49bb6ad46 Bug 1317501 - Don't notify dom objects synchronously from MSG runnables in DOMMediaStream. r=padenot 2016-12-07 08:56:14 +01:00
Andreas Pehrson 9eb5a55c37 Bug 1321235 - Let ended MediaStreamTracks be removable. r=jesup
MozReview-Commit-ID: A3V3SY4L3HL
2016-12-01 19:35:48 +01:00
Andreas Pehrson b09ec5c14e Bug 1301675 - Rename BasicUnstoppableTrackSource to BasicTrackSource. r=jib
They are not unstoppable any longer. We just don't forward Stop() to the real source.

MozReview-Commit-ID: FdFccMsD3eb
2016-09-16 15:19:28 +02:00
Andreas Pehrson 0525598f25 Bug 1208316 - Punch a hole for media element captureStream to only go inactive as source ends. r=jib
MozReview-Commit-ID: 3H0m3fYMw1Y
2016-09-15 14:18:22 +02:00
Andreas Pehrson 40ca8a5dbb Bug 1208316 - Route notifications of ending tracks through MediaStreamTrack instead of DOMMediaStream. r=jib
MozReview-Commit-ID: KMFE5HXEOtJ
2016-09-23 17:03:13 +02:00
Andreas Pehrson ed326949b2 Bug 1208316 - Rename MediaStreamTrack::NotifyEnded to OverrideEnded. r=jib
Better semantics for what I want to do with NotifyEnded in later patches in the bug.

MozReview-Commit-ID: 8X0BdiVncNo
2016-09-08 11:06:21 +02:00
Andreas Pehrson 0be384512f Bug 1208316 - Implement MediaStream.active. r=jib, r=smaug
MozReview-Commit-ID: Fzk5vepqQ35
2016-09-08 13:44:49 +02:00
Sebastian Hengst 82cf47929c Bug 1306137 - remove b2g camera code: Remove dom/camera/ and code which depends on it. r=aosmond,bkelly
MozReview-Commit-ID: 7gvZrDtmcZP
2016-10-04 20:16:28 +02:00
Nicholas Nethercote 887efe04d5 Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.
2016-09-01 15:01:16 +10:00
Andreas Pehrson d3fdbf7bb4 Bug 1259788 - Use RefPtr<MediaStream> in NewRunnableMethod() in DOMMediaStream. r=jesup
MozReview-Commit-ID: F7nNCJBcWGz
2016-08-18 18:24:50 +02:00
Andreas Pehrson 2b53183b1b Bug 1259788 - Raise "addtrack" in separate tasks. r=jesup
Turns out runnables added through
MediaStreamGraph::DispatchToMainThreadAfterStreamStateUpdate on the same
iteration are all run in the same task. Creating them in the owning dom stream
in one task solves the timing issues and lets us add them
(and raise "addtrack") in individual tasks.

MozReview-Commit-ID: 9Q3NoFrmnQs
2016-08-22 12:23:37 +02:00
Andreas Pehrson 0ea44a1cbd Bug 1259788 - Support MediaStream sources for HTMLMediaElement.mozCaptureStream(). r=jesup
This adds support for HTMLMediaElement.mozCaptureStream() and
mozCaptureStreamUntilEnded() for a HTMLMediaElement playing a MediaStream.

This is up to spec, while capturing a HTMLMediaElement playing a file is not.
This incompatibility means we cannot mix sources for the returned MediaStream.

As such, a MediaStream returned while the HTMLMediaElement was playing a file
will only have content while the element is playing files. If the src changes
to a MediaStream, the stream will be empty.

It works the same way if a MediaStream was captured while the HTMLMediaElement
was playing another MediaStream.

This is due to TrackID management - MediaDecoder doesn't care, and creates new
tracks when you seek, so users are unable to keep track, while for MediaStream
we control everything from main thread and keep track of the TrackIDs used
previously.

This also adds a separate path from MediaElementAudioSourceNode so that we don't
forward video tracks when the returned MediaStream is only used internally for
WebAudio. We should in that case not require a DOMMediaStream but just forwarding
tracks to a TrackUnionStream should be enough, and will save us some cpu cycles.
This is however fine for now as it's simpler.

MozReview-Commit-ID: Bg8hESDISDU
2016-08-23 17:51:50 +02:00
Andreas Pehrson f2994d694b Bug 1259788 - Break out AddTrackInternal() from DOMMediaStream::CreateDOMTrack. r=jesup
Sometimes a track is added to a stream synchronously (before the stream is
exposed to script), and sometimes asynchronously (see the mediacapture-main spec
on the "addtrack" event).

In the latter case we might still need to create the MediaStreamTrack object
synchronously for tracking purposes. CaptureStream of Media element playing a
MediaStream wants this.

MozReview-Commit-ID: 7me8xzN7rwj
2016-08-12 13:50:41 +02:00
Jan-Ivar Bruaroey 24fa5af59c Bug 1213517 - make getUserMedia store initial constraints on resulting tracks. r=jesup
MozReview-Commit-ID: 291CrmVmq4x
2015-11-24 23:42:26 -05:00
Iris Hsiao 891d081796 Backed out changeset 0fc93ec9ccd7 (bug 1213517) 2016-07-18 15:41:37 +08:00
Jan-Ivar Bruaroey 748192df03 Bug 1213517 - make getUserMedia store initial constraints on resulting tracks. r=jesup
MozReview-Commit-ID: 291CrmVmq4x
2015-11-24 23:42:26 -05: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 68eba6821b Bug 1208328 - Don't block ended tracks on removal from MediaStream. r=jesup
After ending the MediaInputPort (to the playback stream) gets removed if locked
to the track specifically. Trying to remove the track at this point would try to
block it in the same MediaInputPort - but since it doesn't exist would trigger
an NS_ERROR instead.

MozReview-Commit-ID: IpRL6FAGxPp
2016-05-31 14:55:51 +02:00
Andreas Pehrson db940e82a5 Bug 1208328 - Implement MediaStream.onaddtrack. r=jib, r=smaug
MozReview-Commit-ID: JVZO5mlxvgW
2016-05-31 09:29:52 +02:00
Andreas Pehrson be92ab4019 Bug 1274221 - Make FindOwnedDOMTrack look for (optionally) unique tracks. r=ctai
MozReview-Commit-ID: 1y8YuwJWIS5
2016-05-24 13:26:25 +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
Andreas Pehrson 06ebefee0c Bug 1208373 - Implement MediaStreamTrack.readyState. r=smaug,jib
MozReview-Commit-ID: EoMaG0R3Dpp
2016-05-10 17:03:37 +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 ef7533d7f8 Backed out 5 changesets (bug 1208328) for frequent failures in test_peerConnection_addtrack_removetrack_events.html on Android 4.3 debug. r=backout
Backed out changeset 3160ce8f8759 (bug 1208328)
Backed out changeset aa209325161f (bug 1208328)
Backed out changeset d48bc6eca9c3 (bug 1208328)
Backed out changeset 945141b1f8da (bug 1208328)
Backed out changeset 48da132353c7 (bug 1208328)
2016-06-14 11:04:28 +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 7bcfa1ddd6 Bug 1208328 - Don't block ended tracks on removal from MediaStream. r=jesup
After ending the MediaInputPort (to the playback stream) gets removed if locked
to the track specifically. Trying to remove the track at this point would try to
block it in the same MediaInputPort - but since it doesn't exist would trigger
an NS_ERROR instead.

MozReview-Commit-ID: IpRL6FAGxPp
2016-05-31 14:55:51 +02:00
Andreas Pehrson 10c082f52d Bug 1208328 - Implement MediaStream.onaddtrack. r=jib, r=smaug
MozReview-Commit-ID: JVZO5mlxvgW
2016-05-31 09:29:52 +02:00
Andreas Pehrson 837cd4cfec Bug 1274221 - Make FindOwnedDOMTrack look for (optionally) unique tracks. r=ctai
MozReview-Commit-ID: 1y8YuwJWIS5
2016-05-24 13:26:25 +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
Andreas Pehrson f3b16e200b Bug 1208373 - Implement MediaStreamTrack.readyState. r=smaug,jib
MozReview-Commit-ID: EoMaG0R3Dpp
2016-05-10 17:03:37 +02:00
Carsten "Tomcat" Book cfe6bd7132 Backed out changeset 2b5684b6362e (bug 1208373) 2016-06-09 15:18:45 +02:00
Carsten "Tomcat" Book c1a6f45089 Backed out changeset 5454dcaa31ff (bug 1208373) 2016-06-09 15:18:42 +02:00
Carsten "Tomcat" Book c2640c5e0b Backed out changeset ce89c5b1f32d (bug 1274221) 2016-06-09 15:18:38 +02:00
Carsten "Tomcat" Book 526a6aeb01 Backed out changeset ba0529f6b073 (bug 1208328) 2016-06-09 15:18:32 +02:00
Carsten "Tomcat" Book 60694e4a83 Backed out changeset dbb4b83be583 (bug 1208328) 2016-06-09 15:18:31 +02:00
Andreas Pehrson 0d88bca28e Bug 1208328 - Don't block ended tracks on removal from MediaStream. r=jesup
After ending the MediaInputPort (to the playback stream) gets removed if locked
to the track specifically. Trying to remove the track at this point would try to
block it in the same MediaInputPort - but since it doesn't exist would trigger
an NS_ERROR instead.

MozReview-Commit-ID: IpRL6FAGxPp
2016-05-31 14:55:51 +02:00
Andreas Pehrson 23c940c87b Bug 1208328 - Implement MediaStream.onaddtrack. r=jib, r=smaug
MozReview-Commit-ID: JVZO5mlxvgW
2016-05-31 09:29:52 +02:00
Andreas Pehrson e810e6895d Bug 1274221 - Make FindOwnedDOMTrack look for (optionally) unique tracks. r=ctai
MozReview-Commit-ID: 1y8YuwJWIS5
2016-05-24 13:26:25 +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
Andreas Pehrson 747c882dc8 Bug 1208373 - Implement MediaStreamTrack.readyState. r=smaug,jib
MozReview-Commit-ID: EoMaG0R3Dpp
2016-05-10 17:03:37 +02:00
Andreas Pehrson 01c27dfceb Bug 1208390 - Implement MediaStream.getTrackById(). r=jib, r=smaug
MozReview-Commit-ID: 5a90ZOx7eUE
2016-05-20 13:01:30 +02:00
Carsten "Tomcat" Book 18a01d0317 Backed out changeset ee525e8953bd (bug 1208373) 2016-05-13 13:51:34 +02:00
Andreas Pehrson b8967e072a Bug 1208373 - Implement MediaStreamTrack.readyState. r=jib,smaug
MozReview-Commit-ID: EoMaG0R3Dpp
2016-05-10 17:03:37 +02:00