Commit Graph

89 Commits

Author SHA1 Message Date
sajitk
16f44d3d8d Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-15 14:49:01 +01:00
Wes Kocher
798325cd22 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE 2015-11-11 09:36:56 -08:00
sajitk
ac8ad4ec76 Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian 2015-11-11 06:52:00 +01:00
Karl Tomlinson
8b455e2653 bug 1217625 remove ADD_STREAM_SUSPENDED r=padenot
Sometimes we'll need an initial suspended count of 2, which is not supported
by this API, but this is not necessary anyway.
2015-10-22 22:14:46 +13:00
Andreas Pehrson
2716fa8418 Bug 1216417 - Add logging for audio and video output changes in MSG. r=roc 2015-10-29 13:19:51 +08:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Andreas Pehrson
400f1f3074 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
9fb5ec93b1 Bug 1170958 - Refactor DOMMediaStream to contain a 3-stage track chain. r=roc
This lets us separate tracks by ownership like so:
* Input    - Owned by the producer of the DOMMediaStream (gUM etc.)
* Owned    - Contains Input tracks (per above) or tracks cloned tracks
             if this DOMMediaStream is a clone.
* Playback - Contains Owned tracks plus tracks addTrack()ed to this
             DOMMediaStream minus tracks removeTrack()ed from this
             DOMMediaStream.
2015-09-30 09:31:54 +08:00
Andreas Pehrson
c9960c5389 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
Andreas Pehrson
56bfd29483 Bug 1170958 - Add input stream and track as args to NotifyQueuedTrackChanges. r=roc
This allows for tracking the input track of an added track (for
ProcessedMediaStream tracks; SourceMediaStream tracks don't have input
tracks) directly in the NotifyQueuedTrackChanges handler, which will be
necessary for locking MediaInputPorts to specific tracks.
2015-09-30 09:31:53 +08:00
Karl Tomlinson
f6821996d3 bug 1205558 introduce SecondsToNearestStreamTime r=padenot 2015-09-18 15:42:00 +12:00
Karl Tomlinson
9b77587a0f bug 1208327 make enum AudioContextOperation strongly typed and forward declare instead of including AudioContext.h r=roc
AudioContext.h is now exported only under mozilla.dom.
2015-09-25 08:49:03 +12:00
Wes Kocher
84e72a2137 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
c5ca578a06 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
Andreas Pehrson
dbb83ae994 Bug 1170958 - Refactor DOMMediaStream to contain a 3-stage track chain. r=roc
This lets us separate tracks by ownership like so:
* Input    - Owned by the producer of the DOMMediaStream (gUM etc.)
* Owned    - Contains Input tracks (per above) or tracks cloned tracks
             if this DOMMediaStream is a clone.
* Playback - Contains Owned tracks plus tracks addTrack()ed to this
             DOMMediaStream minus tracks removeTrack()ed from this
             DOMMediaStream.
2015-09-25 23:23:18 +08:00
Andreas Pehrson
7b2578d331 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-25 23:23:18 +08:00
Andreas Pehrson
751f38d856 Bug 1170958 - Add input stream and track as args to NotifyQueuedTrackChanges. r=roc
This allows for tracking the input track of an added track (for
ProcessedMediaStream tracks; SourceMediaStream tracks don't have input
tracks) directly in the NotifyQueuedTrackChanges handler, which will be
necessary for locking MediaInputPorts to specific tracks.
2015-09-25 23:23:17 +08:00
Robert O'Callahan
fc061439e6 Bug 1189506. Call StreamTimeToGraphTime in MediaStreamGraphImpl::UpdateCurrentTimeForStreams, since we know blocking has been taken account of already there. r=karlt 2015-09-08 16:38:40 +12:00
Robert O'Callahan
4ff85f7fdc Bug 1189506. Create StreamTimeToGraphTime/GraphTimeToStreamTime that don't take account of blocking, and call them from AudioNodeStream. r=karlt 2015-09-16 16:35:16 +12:00
Robert O'Callahan
09722211fa Bug 1189506. Rename StreamTimeToGraphTime/GraphTimeToStreamTime to ...WithBlocking. r=karlt 2015-09-08 15:41:00 +12:00
Robert O'Callahan
536d91d710 Bug 1189506. Remove unused NotifyConsumptionChanged. r=karlt 2015-09-04 21:39:35 +12:00
Robert O'Callahan
af99009ff6 Bug 1189506. Remove no-longer-used TimeVarying.h. r=karlt 2015-09-04 18:49:27 +12:00
Robert O'Callahan
c405b22505 Bug 1189506. Replace MediaStream::mBlocked with simpler MediaStream::mStartBlocking. r=karlt 2015-09-04 18:44:43 +12:00
Robert O'Callahan
c43f836134 Bug 1189506. Remove unused MediaStreamGraph::GetBufferedTicks. r=karlt 2015-09-04 18:44:20 +12:00
Robert O'Callahan
a92e7b36cd Bug 1189506. Remove mExplicitBlockerCount and related code since it's always zero now. r=karlt 2015-09-04 17:00:25 +12:00
Robert O'Callahan
8e7b013812 Bug 1189506. Remove MediaStream::mBlockInThisPhase. r=karlt 2015-09-04 16:57:32 +12:00
Robert O'Callahan
6ca95977cc Bug 1189506. Simplify blocking code now that stream blocking decision are always independent of other streams. r=karlt 2015-09-16 16:15:55 +12:00
Robert O'Callahan
8f5a4ebbb4 Bug 1189506. Remove MediaInputPort::mFlags. r=karlt 2015-09-04 16:45:21 +12:00
Robert O'Callahan
2b6ab625a1 Bug 1189506. Remove aFlags parameter from AllocateInputPort. r=karlt 2015-09-04 16:42:42 +12:00
Robert O'Callahan
dd4e631334 Bug 1189506. Convert ChangeExplicitBlockerCount to MediaStream::Suspend/Resume. r=padenot 2015-09-11 01:45:36 +12:00
Robert O'Callahan
8194fdbb81 Bug 1189506. Make AudioContext responsible for tracking all nodes which need to be suspended and resumed. r=padenot
This simplifies MediaStreamGraph by removing the need for it to be aware
of which AudioContext a stream belongs to.

This also makes it easier to reuse stream suspending for purposes other than
AudioContext suspend/resume.
2015-09-16 16:15:21 +12:00
Robert O'Callahan
ec9072a5d4 Bug 1200099. Stop using a distinct mPlaybackStream to play a media stream through an HTMLMediaElement. r=jwwang 2015-08-31 23:33:53 +12:00
Paul Adenot
6d221a8d51 Bug 901633 - Part 13 - Teach the resampler at the input of the MSG to dynamically change its channel count if needed. r=jesup
When the audio comes from a PeerConnection, we don't know how many channels the
audio will have, and it can change anyways.
2015-09-01 14:25:48 +02:00
Paul Adenot
9f365dce46 Bug 1190676 - Part 3 - Make getting a MediaStreamGraph for a channel more explicit. r=roc
Hopefully this wil also prevent getting the wrong graph.
2015-08-25 10:17:31 +02:00
Karl Tomlinson
f0bd706a0c bug 1197043 move AudioNodeStream creation to stream class r=padenot 2015-08-12 11:26:24 +12:00
Karl Tomlinson
0744ddb0e1 bug 1197043 introduce MediaStreamGraph::AddStream() r=padenot 2015-08-12 11:46:56 +12:00
Karl Tomlinson
393d2224b6 bug 1197043 remove unnecessary aSampleRate parameter for AudioNodeStream creation r=padenot 2015-08-12 11:04:13 +12:00
Karl Tomlinson
de8e0bbe82 bug 1198100 remove mNotificationMainThreadRunnable r=baku
If AddMainThreadListener() were called multiple times after
mFinishedNotificationSent is set then we'd get some extra NotifyRunnables but
NotifyMainThreadListeners() clears mMainThreadListeners anyway so we still get
only one notification per listener.

mNotificationMainThreadRunnable is an unnecessary optimization, so better not
to add storage to every MediaStream.
2015-08-24 11:54:24 +12:00
Karl Tomlinson
d8ac3855f8 bug 962719 update stream state to processed time after processing r=padenot
Notifications are now up to date with processing, and
MediaStream::GetCurrentTime() now returns "the main-thread's view of how much
data has been processed by this stream", as documented.
2015-07-29 19:32:10 +12:00
Karl Tomlinson
e8c4ebf219 bug 962719 provide video frames to the container as soon as available r=roc
This does not affect the target time of the video frames, but may mean that more
frames are displayed.
2015-08-14 14:16:57 +12:00
Karl Tomlinson
6a58379f0a bug 1190285 remove unused graph update indices r=roc 2015-07-31 21:36:05 +12:00
Karl Tomlinson
9bc0a80496 bug 1190285 unvirtualize MediaStream::AdvanceTimeVaryingValuesToCurrentTime() r=roc 2015-08-03 12:28:19 +12:00
Karl Tomlinson
f5bc428f47 bug 1190285 move GraphTime definition to avoid GraphDriver.h includes r=padenot 2015-07-23 11:48:47 +12:00
Karl Tomlinson
37dcaaaf96 bug 1190285 remove unused HaveEnoughBuffered r=padenot 2015-07-31 18:54:05 +12:00
Karl Tomlinson
136cc01d76 bug 1190285 remove unused DispatchWhenNotEnoughBuffered r=padenot 2015-07-31 18:46:04 +12:00
Nicholas Nethercote
242308999c Bug 1188745 - Rename nsTArray::SizeOfExcludingThis() as ShallowSizeOfExcludingThis(). r=froydnj.
This makes it clearer that, unlike how SizeOf*() functions usually work, this
doesn't measure any children hanging off the array.

And do likewise for nsTObserverArray.
2015-07-28 23:24:24 -07:00
Paul Adenot
738cc6a637 Bug 1156472 - Part 4 - Add a new MediaStreamGraph API to connect a MediaStream to a capture stream. r=jesup,roc 2015-07-24 14:28:16 +02:00
Wes Kocher
81078e6666 Backed out 14 changesets (bug 1156472) for test_getUserMedia_audioCapture.html failures on b2g emulator
Backed out changeset deec8eb18346 (bug 1156472)
Backed out changeset 0f5bec4c05ba (bug 1156472)
Backed out changeset 2dd83ac00bf9 (bug 1156472)
Backed out changeset abd4e47887f7 (bug 1156472)
Backed out changeset 4824d9874663 (bug 1156472)
Backed out changeset 12805598e6fa (bug 1156472)
Backed out changeset e2f0062a1f67 (bug 1156472)
Backed out changeset 99ef8e436a7f (bug 1156472)
Backed out changeset 65bbfc1546af (bug 1156472)
Backed out changeset 2ab4f16eaf0a (bug 1156472)
Backed out changeset 7f565685e20a (bug 1156472)
Backed out changeset 28c03c98cb2b (bug 1156472)
Backed out changeset d477cfba6e1d (bug 1156472)
Backed out changeset 9819fa56caa1 (bug 1156472)
2015-07-24 13:15:57 -07:00
Paul Adenot
38bf0a545b Bug 1156472 - Part 4 - Add a new MediaStreamGraph API to connect a MediaStream to a capture stream. r=jesup,roc 2015-07-24 14:28:16 +02:00
Carsten "Tomcat" Book
d944a5d83e Backed out 14 changesets (bug 1156472) for bustage on a CLOSED TREE
Backed out changeset 2ddbf85a42c0 (bug 1156472)
Backed out changeset 306d02e17081 (bug 1156472)
Backed out changeset 03598139f39a (bug 1156472)
Backed out changeset 4b1e6069b598 (bug 1156472)
Backed out changeset 6c588a5eaaec (bug 1156472)
Backed out changeset 8c98d7beaea7 (bug 1156472)
Backed out changeset fbf59fbb5875 (bug 1156472)
Backed out changeset 66479dd9eed9 (bug 1156472)
Backed out changeset c8502deeed33 (bug 1156472)
Backed out changeset 1a60ff1149a1 (bug 1156472)
Backed out changeset af1638279785 (bug 1156472)
Backed out changeset 8210276a98ca (bug 1156472)
Backed out changeset 13730e7c5997 (bug 1156472)
Backed out changeset 05acb71cf981 (bug 1156472)
2015-07-24 17:08:37 +02:00