gecko/dom/media
Paul Adenot f5c2676219 Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup
On OSX, when the audio output device changes, the OS will call the audio
callbacks in weird patterns, if at all, during a period of ~1s. If
real-time SourceMediaStreams are present in the MediaStreamGraph, this means
buffering will occur, and the overall latency between the MediaStreamGraph
insertion time, and the actual output time will grow.

To fix this, we detect when the output device changes, and we switch temporarily
to a SystemClockDriver, that will pull from the SourceMediaStream, and simply
discard all input data. Then, when we get audio callbacks called reliably
(basically, when OSX is done switching to the other output), we switch back to
the previous AudioCallbackDriver.

We keep the previous AudioCallbackDriver alive using a self-reference. If an
AudioCallbackDriver has a self-reference, that means it's in a state when a
device is switching, so it's not linked to an MSG per se.
2014-10-22 16:12:29 +02:00
..
android Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00
apple Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
bridge Bug 994912 - Add support for event-based notifications to media streams. r=roc, r=bz 2014-10-03 04:18:00 -04:00
compiledtest Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
directshow Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
eme Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
encoder Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
fmp4 Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
gmp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
gmp-plugin Bug 1055395 - gTests for GMPAsyncShutdown. r=edwin 2014-10-23 20:37:55 +13:00
gstreamer Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00
gtest Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
imagecapture Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
mediasource Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
ogg Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
omx Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00
raw Bug 946065 - Part 12: Move content/base/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:25:22 +03:00
systemservices Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
test Bug 946065 - Part 11: Move content/html/ to dom/ and flatten subdirectories. r=peterv 2014-10-25 20:24:55 +03:00
tests Bug 1085208 - Move dom/media/tests/ipc into dom/media/tests/mochitest to force it to run with the other Mochitests. r=jib 2014-10-25 20:29:19 +03:00
wave Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
webaudio Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup 2014-10-22 16:12:29 +02:00
webm Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
webrtc Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
webspeech Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
webvtt Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
wmf Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AbstractMediaDecoder.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioBufferUtils.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioChannelFormat.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioChannelFormat.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioCompactor.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioCompactor.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioMixer.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioSampleFormat.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioSegment.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioSegment.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioSink.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioSink.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioStream.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioStream.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioStreamTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioStreamTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioTrackList.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
AudioTrackList.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
BufferMediaResource.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
CubebUtils.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
CubebUtils.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
DecoderTraits.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
DecoderTraits.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
DOMMediaStream.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
DOMMediaStream.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
EncodedBufferCache.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
EncodedBufferCache.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
FileBlockCache.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
FileBlockCache.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
GetUserMediaRequest.cpp Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz. 2014-10-07 11:44:49 +02:00
GetUserMediaRequest.h
GraphDriver.cpp Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup 2014-10-22 16:12:29 +02:00
GraphDriver.h Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup 2014-10-22 16:12:29 +02:00
IdpProxy.jsm
Latency.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
Latency.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaCache.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaCache.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaData.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaData.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDataDecodedListener.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoder.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoder.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderOwner.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderReader.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderReader.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderStateMachine.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderStateMachine.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderStateMachineScheduler.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaDecoderStateMachineScheduler.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaInfo.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaManager.cpp Bug 1003274 - Part 2 - clue camera selection in to width/height code. r=jesup 2014-09-24 19:00:02 -04:00
MediaManager.h Bug 1003274 - Part 2 - clue camera selection in to width/height code. r=jesup 2014-09-24 19:00:02 -04:00
MediaMetadataManager.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaPermissionGonk.cpp Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 18:47:15 -07:00
MediaPermissionGonk.h Bug 1028588 - Fix dangerous public destructors in Gonk-specific dom/media code - r=ehsan 2014-07-07 14:27:29 -04:00
MediaQueue.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaRecorder.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaRecorder.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaResource.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaResource.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaSegment.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaShutdownManager.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaShutdownManager.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaStreamGraph.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaStreamGraph.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaStreamGraphImpl.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaStreamTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaStreamTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTaskQueue.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTaskQueue.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTrackList.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MediaTrackList.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
moz.build Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup 2014-10-22 16:12:29 +02:00
MP3FrameParser.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
MP3FrameParser.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
nsIDocumentActivity.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
nsIDOMNavigatorUserMedia.idl Bug 994912 - Add support for event-based notifications to media streams. r=roc, r=bz 2014-10-03 04:18:00 -04:00
nsIMediaManager.idl Bug 1057006: split window and app sharing reports so the UI can handle them separately, r=jib. 2014-08-25 11:01:19 -04:00
PeerConnection.js Bug 786419 - Part 5 - Check app offline status in PeerConnection.js r=rjesup 2014-08-23 02:16:51 +03:00
PeerConnection.manifest Bug 1032835 - RTCRtpSender webidl. r=smaug 2014-08-13 21:40:41 -04:00
PeerConnectionIdp.jsm
RTCStatsReport.jsm Bug 998989 - upload telemetry logs on Loop ICE failure. r=smaug, r=abr 2014-06-09 18:14:14 -04:00
RtspMediaResource.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
RtspMediaResource.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
SelfRef.h Bug 1085356 - Better handling of OSX audio output devices switching when SourceMediaStream are present in the MSG. r=jesup 2014-10-22 16:12:29 +02:00
SharedBuffer.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
SharedThreadPool.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
SharedThreadPool.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
StreamBuffer.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
StreamBuffer.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackCue.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackCue.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackCueList.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackCueList.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackList.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackList.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackRegion.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TextTrackRegion.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
ThreadPoolCOMListener.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
ThreadPoolCOMListener.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TimeVarying.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TrackUnionStream.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
TrackUnionStream.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoFrameContainer.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoFrameContainer.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoPlaybackQuality.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoPlaybackQuality.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoSegment.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoSegment.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoStreamTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoStreamTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoTrack.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoTrack.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoTrackList.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoTrackList.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoUtils.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VideoUtils.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
VorbisUtils.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
WebVTTListener.cpp Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00
WebVTTListener.h Bug 946065 - Part 10: Move content/media/ to dom/. r=peterv 2014-10-25 20:24:36 +03:00