Bug 1617915 - Expose output device id when MediaTrackGraph is created. r=padenot
In order to be able to change the audio output device, the device id is exposed to the constructor of MediaStreamGraph. Any component that gets/creates an MTG will be able to provide the device id in order to determine the desired output device. If the provided device id is null the default device will be used. Differential Revision: https://phabricator.services.mozilla.com/D64133
This commit is contained in:
@@ -3768,7 +3768,8 @@ already_AddRefed<DOMMediaStream> HTMLMediaElement::MozCaptureStream(
|
||||
}
|
||||
|
||||
MediaTrackGraph* graph = MediaTrackGraph::GetInstance(
|
||||
graphDriverType, window, MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE);
|
||||
graphDriverType, window, MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE,
|
||||
MediaTrackGraph::DEFAULT_OUTPUT_DEVICE);
|
||||
|
||||
RefPtr<DOMMediaStream> stream =
|
||||
CaptureStreamInternal(StreamCaptureBehavior::CONTINUE_WHEN_ENDED,
|
||||
@@ -3799,7 +3800,8 @@ already_AddRefed<DOMMediaStream> HTMLMediaElement::MozCaptureStreamUntilEnded(
|
||||
}
|
||||
|
||||
MediaTrackGraph* graph = MediaTrackGraph::GetInstance(
|
||||
graphDriverType, window, MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE);
|
||||
graphDriverType, window, MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE,
|
||||
MediaTrackGraph::DEFAULT_OUTPUT_DEVICE);
|
||||
|
||||
RefPtr<DOMMediaStream> stream =
|
||||
CaptureStreamInternal(StreamCaptureBehavior::FINISH_WHEN_ENDED,
|
||||
@@ -7265,7 +7267,8 @@ void HTMLMediaElement::AudioCaptureTrackChange(bool aCapture) {
|
||||
|
||||
MediaTrackGraph* mtg = MediaTrackGraph::GetInstance(
|
||||
MediaTrackGraph::AUDIO_THREAD_DRIVER, window,
|
||||
MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE);
|
||||
MediaTrackGraph::REQUEST_DEFAULT_SAMPLE_RATE,
|
||||
MediaTrackGraph::DEFAULT_OUTPUT_DEVICE);
|
||||
RefPtr<DOMMediaStream> stream =
|
||||
CaptureStreamInternal(StreamCaptureBehavior::CONTINUE_WHEN_ENDED,
|
||||
StreamCaptureType::CAPTURE_AUDIO, mtg);
|
||||
|
||||
Reference in New Issue
Block a user