Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1770)

Unified Diff: content/renderer/media/user_media_client_impl.h

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reworked unit tests around structural changes, and added exhaustive media_stream_audio_unittest.cc. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/user_media_client_impl.h
diff --git a/content/renderer/media/user_media_client_impl.h b/content/renderer/media/user_media_client_impl.h
index 2a11c2d22b68be47563de0ab2ca377e84e0118c1..1177df5444c252038553a0e2601d53ab84847b3c 100644
--- a/content/renderer/media/user_media_client_impl.h
+++ b/content/renderer/media/user_media_client_impl.h
@@ -30,6 +30,7 @@
namespace content {
class PeerConnectionDependencyFactory;
+class MediaStreamAudioSource;
class MediaStreamDispatcher;
class MediaStreamVideoSource;
class VideoCapturerDelegate;
@@ -115,8 +116,12 @@ class CONTENT_EXPORT UserMediaClientImpl
virtual void EnumerateSourcesSucceded(
blink::WebMediaStreamTrackSourcesRequest* request,
blink::WebVector<blink::WebSourceInfo>& sources);
- // Creates a MediaStreamVideoSource object.
- // This is virtual for test purposes.
+
+ // Creates a MediaStreamAudioSource/MediaStreamVideoSource objects.
+ // These are virtual for test purposes.
+ virtual MediaStreamAudioSource* CreateAudioSource(
+ const StreamDeviceInfo& device,
+ const blink::WebMediaConstraints& constraints);
virtual MediaStreamVideoSource* CreateVideoSource(
const StreamDeviceInfo& device,
const MediaStreamSource::SourceStoppedCallback& stop_callback);
@@ -143,8 +148,7 @@ class CONTENT_EXPORT UserMediaClientImpl
blink::WebMediaStream web_stream;
blink::WebUserMediaRequest request;
- void StartAudioTrack(const blink::WebMediaStreamTrack& track,
- const blink::WebMediaConstraints& constraints);
+ void StartAudioTrack(const blink::WebMediaStreamTrack& track);
blink::WebMediaStreamTrack CreateAndStartVideoTrack(
const blink::WebMediaStreamSource& source,

Powered by Google App Engine
This is Rietveld 408576698