Commit Graph

59 Commits

Author SHA1 Message Date
Ehsan Akhgari
14aa167f4e Bug 865247 - Part 1: Give MediaInputPort the notion of an input and output port number; r=roc 2013-05-05 11:47:36 -04:00
Ms2ger
c74b574718 Backout changesets f309dacf4010:be3cef4b69e3 for thread safety assertions on Windows and test failures on OSX. 2013-05-05 11:51:47 +02:00
Robert O'Callahan
9fcec03506 Bug 866514. Part 1: Add DOMMediaStream::OnTracksAvailableCallback. r=jesup 2013-05-03 17:02:55 +12:00
Ehsan Akhgari
6b4953320e Bug 865234 - Part 2: Send the channel mixing information to the AudioNodeStream; r=roc 2013-04-27 19:25:23 -04:00
Ehsan Akhgari
e6ef206ecb Bug 834513 - Part 3: Implement ScriptProcessorNode; r=roc 2013-04-13 21:37:04 -04:00
Sotaro Ikeda
ebcd1fab7b Bug 844248 - Add a custom media stream for camera preview. r=roc 2013-03-20 10:07:46 -04:00
Robert O'Callahan
2d9ba0737e Bug 850587. Part 2: Make NotifyHasCurrentData fire when a stream would be able to produce data if it was not blocked. r=jesup
Also removes NotifyHasCurrentData's boolean parameter; we just fire this
once and treat a stream that has once had current data as always
having current data (since we block a stream that would advance
beyond its available data).
2013-03-21 00:19:39 +13:00
Ehsan Akhgari
b953c5fc81 Bug 852011 - Reserve 5 elements in MediaStream::mBlocked in order to avoid excessive cost when dealing with removals from it; r=roc
--HG--
extra : rebase_source : 480c95b4110dcd8355d08eacbbbe91f963d73239
2013-03-17 23:27:14 -04:00
Ehsan Akhgari
c704fae974 Bug 851966 - Only store the produced AudioChunks for AudioNodeStreams that will result in playback; r=roc 2013-03-17 20:37:47 -04:00
Randell Jesup
8161849c3d Bug 839650: Add debugs to MediaStreamGraph to ease investigation of issues in the future r=roc 2013-03-07 03:53:45 -05:00
Ed Morley
b360848aef Backed out changeset be1ee54becf4 (bug 839650) for build failures 2013-03-07 09:10:47 +00:00
Randell Jesup
07aff4ee8e Bug 839650: Add debugs to MediaStreamGraph to ease investigation of issues in the future r=roc 2013-03-07 03:53:45 -05:00
Robert O'Callahan
d96eb1e910 Bug 843214. Make SourceMediaStream::AddTrack/AppendToTrack/HaveEnoughBuffered/DispatchWhenNotEnoughBuffered/EndTrack smoothly handle cases where track does not exist. r=jesup 2013-02-25 22:25:07 +13:00
Ed Morley
94361edb30 Backed out changeset dba7a059ed22 (bug 843214) 2013-02-27 12:49:26 +00:00
Robert O'Callahan
4dd110ae0a Bug 843214. Make SourceMediaStream::AddTrack/AppendToTrack/HaveEnoughBuffered/DispatchWhenNotEnoughBuffered/EndTrack smoothly handle cases where track does not exist. r=jesup
--HG--
extra : rebase_source : adcfa0e92b5e498c597e16e013fdcba2dae4b8e5
2013-02-25 22:25:07 +13:00
Robert O'Callahan
ca6fcfb8f3 Bug 837034. Part 1: Rename nsDOM(Local)MediaStream to DOM(Local)MediaStream and put them in the mozilla namespace. r=jesup
--HG--
rename : content/media/nsDOMMediaStream.cpp => content/media/DOMMediaStream.cpp
rename : content/media/nsDOMMediaStream.h => content/media/DOMMediaStream.h
extra : rebase_source : 6fd3f71779b4ecb9d3b053b6cd844c2ff0c25f80
2013-02-15 21:01:58 +13:00
Ehsan Akhgari
2d219bdba7 Bug 836599 - Part 2: Make MediaInputPort aware of its owner graph; r=roc
We need to make sure that MediaStream doesn't assume that it belongs
to the global graph so that we can have multiple graphs coexisting.
2013-02-01 14:49:58 -05:00
Ehsan Akhgari
8a790ac960 Bug 836599 - Part 1: Make MediaStream aware of its owner graph; r=roc
We need to make sure that MediaStream doesn't assume that it belongs
to the global graph so that we can have multiple graphs coexisting.
2013-02-01 14:43:36 -05:00
Robert O'Callahan
f76919f8a0 Bug 804387. Part 8: Create AudioNodeEngine and AudioNodeStream. r=jesup
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.

--HG--
extra : rebase_source : 99524b09edd4ac0e1bc6607f2ba14925bc2f11c2
2013-01-14 11:46:57 +13:00
Robert O'Callahan
e24fa5a4c9 Bug 804387. Part 6: ChangeExplicitBlockerCountImpl takes a GraphTime, not a StreamTime. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : c51cb893c9b6121e00a38f105f2efd2e8d70094d
2013-02-04 23:04:26 +13:00
Robert O'Callahan
32ddb352da Bug 804387. Part 5: Add MediaStream::GraphTimeToStreamTimeOptimistic and MediaStream::StreamTimeToGraphTime. r=jesup
--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
extra : rebase_source : 0e08f9bb0c544b44ab4953a0f00cae233cd488c7
2013-02-04 23:04:26 +13:00
Robert O'Callahan
1a0f7249d1 Bug 804387. Part 1.5: Clean up main-thread MediaStream event listeners. r=jesup
There is no need for these to be independent objects in general and we
don't need to addref/release them. We can just require the caller to
remove them before they die.
We can also save some refcount churn by having
DispatchToMainThreadAfterStreamStateUpdate take already_AddRefed.

--HG--
extra : rebase_source : 751114a1befd73b405dff3ee986496efb6f76201
2013-02-04 23:04:24 +13:00
Robert O'Callahan
96c21b198b Bug 804387. Part 1: Make AllocateInputPort addref the returned port. r=jesup
--HG--
extra : rebase_source : a0e4d7889598577a540f132f4190225ecf12fdfb
2012-11-23 11:25:05 +13:00
Ehsan Akhgari
631b308649 Backed out 14 changesets (bug 804387) because of Android M2 crashes
Backed out changeset 80e8530f06ea (bug 804387)
Backed out changeset 3de2271ad47f (bug 804387)
Backed out changeset 00f86870931c (bug 804837)
Backed out changeset 0e3f20927c50 (bug 804387)
Backed out changeset e6ef90038007 (bug 804387)
Backed out changeset 0ad6f67a95f9 (bug 804387)
Backed out changeset d0772aba503c (bug 804387)
Backed out changeset 5477b87ff03e (bug 804387)
Backed out changeset 1d7ec5adc49f (bug 804387)
Backed out changeset 11f4d740cd6c (bug 804387)
Backed out changeset e6254d8997ab (bug 804387)
Backed out changeset 372322f3264d (bug 804387)
Backed out changeset 53d5ed687612 (bug 804387)
Backed out changeset 000b88ac40a7 (bug 804387)
2013-02-05 01:29:28 -05:00
Robert O'Callahan
f4306b8a20 Bug 804387. Part 8: Create AudioNodeEngine and AudioNodeStream. r=jesup
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.
2013-01-14 11:46:57 +13:00
Robert O'Callahan
e68da80237 Bug 804387. Part 6: ChangeExplicitBlockerCountImpl takes a GraphTime, not a StreamTime. r=jesup 2013-02-04 23:04:26 +13:00
Robert O'Callahan
05be93cc6b Bug 804387. Part 5: Add MediaStream::GraphTimeToStreamTimeOptimistic and MediaStream::StreamTimeToGraphTime. r=jesup 2013-02-04 23:04:26 +13:00
Robert O'Callahan
e924eeca9a Bug 804387. Part 1.5: Clean up main-thread MediaStream event listeners. r=jesup
There is no need for these to be independent objects in general and we
don't need to addref/release them. We can just require the caller to
remove them before they die.
We can also save some refcount churn by having
DispatchToMainThreadAfterStreamStateUpdate take already_AddRefed.
2013-02-04 23:04:24 +13:00
Robert O'Callahan
11a2cb4a33 Bug 804387. Part 1: Make AllocateInputPort addref the returned port. r=jesup 2012-11-23 11:25:05 +13:00
Randell Jesup
307173aba3 Bug 827007: Implement Stop for UserMediaStreams; add NotifyRemoved for MediaStream listeners r=roc 2013-01-06 21:31:30 -05:00
Robert O'Callahan
6cd2aebe3a Bug 814718. Explicitly store the blocking state that we last delivered to MediaStreamListeners. r=jesup 2013-01-02 14:49:18 +01:00
Ms2ger
020367e2ed Backout bug 814718, bug 717178 for exceptions in test_text.html on Windows. 2013-01-01 13:34:34 +01:00
Robert O'Callahan
a4f7d11c72 Bug 814718. Explicitly store the blocking state that we last delivered to MediaStreamListeners. r=jesup 2013-01-01 16:45:43 +13:00
Matthew Gregan
173e3e502c Bug 814292 - Remove mAudioPlaybackThread and AudioStream refcounting. r=cpearce 2012-11-22 16:38:39 +13:00
Chris Pearce
9abb830db0 Bug 811381 - Remove ns prefix from media code. r=roc
--HG--
rename : content/media/nsAudioAvailableEventManager.cpp => content/media/AudioAvailableEventManager.cpp
rename : content/media/nsAudioAvailableEventManager.h => content/media/AudioAvailableEventManager.h
rename : content/media/nsAudioStream.cpp => content/media/AudioStream.cpp
rename : content/media/nsAudioStream.h => content/media/AudioStream.h
rename : content/media/nsMediaCache.cpp => content/media/MediaCache.cpp
rename : content/media/nsMediaCache.h => content/media/MediaCache.h
rename : content/media/nsBuiltinDecoder.cpp => content/media/MediaDecoder.cpp
rename : content/media/nsBuiltinDecoder.h => content/media/MediaDecoder.h
rename : content/media/nsBuiltinDecoderReader.cpp => content/media/MediaDecoderReader.cpp
rename : content/media/nsBuiltinDecoderReader.h => content/media/MediaDecoderReader.h
rename : content/media/nsBuiltinDecoderStateMachine.cpp => content/media/MediaDecoderStateMachine.cpp
rename : content/media/nsBuiltinDecoderStateMachine.h => content/media/MediaDecoderStateMachine.h
rename : content/media/dash/nsDASHDecoder.cpp => content/media/dash/DASHDecoder.cpp
rename : content/media/dash/nsDASHDecoder.h => content/media/dash/DASHDecoder.h
rename : content/media/dash/nsDASHReader.cpp => content/media/dash/DASHReader.cpp
rename : content/media/dash/nsDASHReader.h => content/media/dash/DASHReader.h
rename : content/media/dash/nsDASHRepDecoder.cpp => content/media/dash/DASHRepDecoder.cpp
rename : content/media/dash/nsDASHRepDecoder.h => content/media/dash/DASHRepDecoder.h
rename : content/media/gstreamer/nsGStreamerDecoder.cpp => content/media/gstreamer/GStreamerDecoder.cpp
rename : content/media/gstreamer/nsGStreamerDecoder.h => content/media/gstreamer/GStreamerDecoder.h
rename : content/media/gstreamer/nsGStreamerReader.cpp => content/media/gstreamer/GStreamerReader.cpp
rename : content/media/gstreamer/nsGStreamerReader.h => content/media/gstreamer/GStreamerReader.h
rename : content/media/ogg/nsOggCodecState.cpp => content/media/ogg/OggCodecState.cpp
rename : content/media/ogg/nsOggCodecState.h => content/media/ogg/OggCodecState.h
rename : content/media/ogg/nsOggDecoder.cpp => content/media/ogg/OggDecoder.cpp
rename : content/media/ogg/nsOggDecoder.h => content/media/ogg/OggDecoder.h
rename : content/media/ogg/nsOggReader.cpp => content/media/ogg/OggReader.cpp
rename : content/media/ogg/nsOggReader.h => content/media/ogg/OggReader.h
rename : content/media/omx/nsMediaOmxDecoder.cpp => content/media/omx/MediaOmxDecoder.cpp
rename : content/media/omx/nsMediaOmxDecoder.h => content/media/omx/MediaOmxDecoder.h
rename : content/media/omx/nsMediaOmxReader.cpp => content/media/omx/MediaOmxReader.cpp
rename : content/media/omx/nsMediaOmxReader.h => content/media/omx/MediaOmxReader.h
rename : content/media/plugins/nsMediaPluginDecoder.cpp => content/media/plugins/MediaPluginDecoder.cpp
rename : content/media/plugins/nsMediaPluginDecoder.h => content/media/plugins/MediaPluginDecoder.h
rename : content/media/plugins/nsMediaPluginHost.cpp => content/media/plugins/MediaPluginHost.cpp
rename : content/media/plugins/nsMediaPluginHost.h => content/media/plugins/MediaPluginHost.h
rename : content/media/plugins/nsMediaPluginReader.cpp => content/media/plugins/MediaPluginReader.cpp
rename : content/media/plugins/nsMediaPluginReader.h => content/media/plugins/MediaPluginReader.h
rename : content/media/raw/nsRawDecoder.cpp => content/media/raw/RawDecoder.cpp
rename : content/media/raw/nsRawDecoder.h => content/media/raw/RawDecoder.h
rename : content/media/raw/nsRawReader.cpp => content/media/raw/RawReader.cpp
rename : content/media/raw/nsRawReader.h => content/media/raw/RawReader.h
rename : content/media/raw/nsRawStructs.h => content/media/raw/RawStructs.h
rename : content/media/wave/nsWaveDecoder.cpp => content/media/wave/WaveDecoder.cpp
rename : content/media/wave/nsWaveDecoder.h => content/media/wave/WaveDecoder.h
rename : content/media/wave/nsWaveReader.cpp => content/media/wave/WaveReader.cpp
rename : content/media/wave/nsWaveReader.h => content/media/wave/WaveReader.h
rename : content/media/webm/nsWebMBufferedParser.cpp => content/media/webm/WebMBufferedParser.cpp
rename : content/media/webm/nsWebMBufferedParser.h => content/media/webm/WebMBufferedParser.h
rename : content/media/webm/nsWebMDecoder.cpp => content/media/webm/WebMDecoder.cpp
rename : content/media/webm/nsWebMDecoder.h => content/media/webm/WebMDecoder.h
rename : content/media/webm/nsWebMReader.cpp => content/media/webm/WebMReader.cpp
rename : content/media/webm/nsWebMReader.h => content/media/webm/WebMReader.h
2012-11-14 11:46:40 -08:00
Robert O'Callahan
8fe699d05c Bug 805703. Part 1: MediaStreamGraph::CreateInputStream -> CreateSourceStream. r=jesup
--HG--
extra : rebase_source : 3c327e9ead92508f12df4b95f2fd24fa2ba97ab5
2012-10-29 17:36:31 +13:00
Robert O'Callahan
91a7abe566 Bug 805721. Recursively mark streams as consumed starting at the consumption point and working backwards through the graph. r=jesup
--HG--
extra : rebase_source : ba2f2fd4755336bc429ba85cd7296c31fef8aabf
2012-10-29 17:34:17 +13:00
Randell Jesup
b7a4ba499c Bug 803976: Implementation of LocalMediaStreams for .stop() r=roc,anant 2012-10-24 19:21:32 -04:00
Ehsan Akhgari
cab6e9af53 Backed out changeset 165208ecd591 (bug 803976) 2012-10-24 20:29:32 -04:00
Randell Jesup
8865bcac96 Bug 803976: Implementation of LocalMediaStreams for .stop() r=roc,anant 2012-10-24 19:21:32 -04:00
Robert O'Callahan
402b08d6f4 Bug 778682. Part 1: Add NotifyHasCurrentData callback on StreamListener. r=jesup
--HG--
extra : rebase_source : a56fe8ba36639da7638eb590bd9a7a7e65efae95
2012-09-20 12:47:51 +12:00
Robert O'Callahan
e70e7093ce Bug 779715. Part 8: Make it safe to call MediaInputPort::Destroy after streams at both ends of the port have been destroyed. r=jesup
We had problems because we'd call Destroy on a port after calling Destroy on
its streams. This patch makes the port's Destroy ControlMessage not use a stream,
instead we get the stream from the port directly. It also makes us update the
graph's mPortCount only when the port is finally destroyed; this fixes a potential
bug where the current graph could shut down when all streams are removed, before
all ports have been completely destroyed.

--HG--
extra : rebase_source : 3245fa64b79fb8a75c17190f1a4a2af6d42a5012
2012-08-24 00:46:20 +12:00
Ehsan Akhgari
0fd9123eac Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
David Zbarsky
fbb04700b6 Bug 784004 - Don't include Layers.h everywhere Part 3 r=nical 2012-08-21 00:06:46 -04:00
Robert O'Callahan
93e5998248 Bug 779715. Part 4: Play all tracks of a media stream with multiple tracks. r=jesup
Until now we've identified the "first active track" of a stream and played only that. Instead,
it makes more sense to play all the tracks.
For video, we pick the last track that has a video frame for the current time, and display that.

--HG--
extra : rebase_source : 00ce3eb363df06c292232aa507e861639d10cff2
2012-08-01 00:17:22 +12:00
Robert O'Callahan
93fd59abf0 Bug 779715. Part 3: Add an API to get notifications of changes to the main-thread-visible state of a MediaStream. r=jesup
--HG--
extra : rebase_source : 24b7204d219612760b9d159fff5219c1960df51a
2012-08-20 16:20:44 +12:00
Robert O'Callahan
1bb17fbf04 Bug 779715. Part 2: Create TrackUnionStream. r=jesup
--HG--
extra : rebase_source : 29038fa1b93dcade3d762537bf510dc0901a9738
2012-08-01 00:17:21 +12:00
Robert O'Callahan
925835b996 Bug 779715. Part 1: Add basic support for ProcessedMediaStreams. r=jesup
The main thing this patch does is to add ProcessedMediaStream objects and
MediaInputPorts connecting streams. ProcessedMediaStreams are an abstract
class that doesn't constrain what processing is actually performed, except
that for now we assume a stream's processing depends only on its inputs
window of data between mCurrentTime and mStateComputedTime.
This patch reorganizes the way the blocking status of each stream is computed.
The streams are partitioned into groups so that every stream which can affect
the blocking status of another stream is in the same group as that other stream.
We also add a pass to order the streams by dependency so we can process the streams
in order of dependency; this pass also identifies the streams that form part of a
cycle.

--HG--
extra : rebase_source : c45c931a264e73f295642a934500bbeaa6448774
2012-08-01 00:17:21 +12:00
Robert O'Callahan
c686385674 Bug 779721. Part 6: Add a flag to track whether the main thread has called Destroy on a stream, and check that flag when sending a message to it. r=jesup 2012-08-09 23:30:09 +12:00
Robert O'Callahan
fd80974897 Bug 779721. Part 5: Add a comment explaining more about how MediaStream lifetimes are managed. r=jesup 2012-08-09 23:30:02 +12:00