Commit Graph
177 Commits
Author SHA1 Message Date
Andreas Pehrson d6259111fd Bug 1319446 - DirectMediaStreamListener, you are dead to me. r=padenot
MozReview-Commit-ID: KwztE5ogSj9
2017-09-27 12:01:46 +02:00
Andreas Pehrson 30bbee4216 Bug 1296531 - Expose GraphRate through DOMMediaStream. r=jesup
MozReview-Commit-ID: 6kwuLiEgtDI
2016-11-17 09:57:02 +01:00
Andrew McCreight 84ee98de3c Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1
2017-08-29 16:02:48 -07:00
Matthew Gregan 732e0cc4ee Bug 1388236 - Remove B2G-only AudioChannel code from MSG. r=padenot 2017-08-10 13:00:08 +12:00
Nicholas Nethercote d4dada6a3b Bug 1382099 - Remove MOZ_WIDGET_GONK from dom/media/. r=gerald.
As well as the obvious #ifdefs, this allows DOMHwMediaStream to be
removed, and also the "phone-state-changed" observer.
2017-07-24 10:08:55 +10:00
Paul Adenot 3e850de877 Bug 1378067 - Label more runnables in dom/media (GraphDriver.cpp, CubebUtils.cpp, DOMMediaStream.cpp). r=jesup
MozReview-Commit-ID: EQzR1AfzvzE
2017-07-18 11:26:58 +02:00
Sebastian Hengst 577b32c852 Backed out changeset 6dc016256eba (bug 1378067) for bustage at dom/media/webaudio/WebAudioUtils.cpp:107. r=backout on a CLOSED TREE 2017-07-18 11:51:22 +02:00
Paul Adenot 770a73708c Bug 1378067 - Label more runnables in dom/media (GraphDriver.cpp, CubebUtils.cpp, DOMMediaStream.cpp). r=jesup
MozReview-Commit-ID: EQzR1AfzvzE
2017-07-18 11:26:58 +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
Paul Adenot b501ebc61e Bug 1330360 - Create new MSGs for each nsPIDOMWindow. r=jesup
MozReview-Commit-ID: 5m1MGcLmT7J
2017-06-23 16:18:34 -07:00
Bill McCloskey ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Dan Minor 404b6bf20a Bug 1319489 - Allow DOMMediaStream constructor to accept a nullptr for aWindow; r=jesup
For testing purposes, it is useful to pass a null aWindow to the DOMMediaStream
constructor. This limits the amount of code that needs to be mocked to create
a mock media stream.

MozReview-Commit-ID: Jgm1m7N0FU4
2017-06-21 12:51:33 -04:00
Jean-Yves Avenard 88a286dcec Bug 1374596: P7. Fix includes as per coding style. r=padenot
MozReview-Commit-ID: 5WfOWcOoxg0
2017-06-20 17:56:55 +02:00
Jean-Yves Avenard 6b93a3b2cc Bug 1374596: P3. Fix MediaStream* headers. r=padenot
MozReview-Commit-ID: 5dIPrLqxUtm
2017-06-20 17:32:18 +02:00
Jonathan Hao fd3d68110a Bug 1217238 - Reduce time precision when privacy.resistFingerprinting is on. r=mystor
This patch is adapted from Tor bug 1517.

To offer some protection against timing attacks by JS content pages, in this
patch we round the various time-exposing APIs (such as Date and
Event.timeStamps) to the nearest 100 ms when the pref "privacy.resistFingerprinting" is on.

MozReview-Commit-ID: eGucM9nGTn
2017-06-06 11:45:14 +08:00
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