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

Unified Diff: content/renderer/media/mock_media_stream_registry.cc

Issue 1721273002: MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests broken by recent MSAudioTrack::Stop() reworking. Created 4 years, 10 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/mock_media_stream_registry.cc
diff --git a/content/renderer/media/mock_media_stream_registry.cc b/content/renderer/media/mock_media_stream_registry.cc
index a37ca33b751f3b213dc710599ee66dbf3a2ac909..128024ee3645bfecfa144d1ab3ffe00a9de2d3b6 100644
--- a/content/renderer/media/mock_media_stream_registry.cc
+++ b/content/renderer/media/mock_media_stream_registry.cc
@@ -10,7 +10,6 @@
#include "content/renderer/media/media_stream.h"
#include "content/renderer/media/media_stream_audio_source.h"
#include "content/renderer/media/media_stream_video_track.h"
-#include "content/renderer/media/mock_media_constraint_factory.h"
#include "content/renderer/media/mock_media_stream_video_source.h"
#include "content/renderer/media/webrtc/webrtc_local_audio_track_adapter.h"
#include "content/renderer/media/webrtc_local_audio_track.h"
@@ -63,21 +62,11 @@ void MockMediaStreamRegistry::AddAudioTrack(const std::string& track_id) {
audio_source.setExtraData(new MediaStreamAudioSource());
blink::WebMediaStreamTrack blink_track;
blink_track.initialize(audio_source);
- const StreamDeviceInfo device_info(
- MEDIA_DEVICE_AUDIO_CAPTURE, "Mock audio device", "mock_audio_device_id");
- const MockMediaConstraintFactory constraint_factory;
- const blink::WebMediaConstraints constraints =
- constraint_factory.CreateWebMediaConstraints();
- const scoped_refptr<WebRtcAudioCapturer> capturer(
- WebRtcAudioCapturer::CreateCapturer(-1, /* render frame id */
- device_info, constraints,
- nullptr, /* audio device */
- nullptr /* audio source */));
const scoped_refptr<WebRtcLocalAudioTrackAdapter> adapter(
WebRtcLocalAudioTrackAdapter::Create(track_id,
nullptr /* track source */));
- scoped_ptr<WebRtcLocalAudioTrack> native_track(new WebRtcLocalAudioTrack(
- adapter.get(), capturer, nullptr /* webaudio source */));
+ scoped_ptr<WebRtcLocalAudioTrack> native_track(
+ new WebRtcLocalAudioTrack(adapter.get()));
blink_track.setExtraData(native_track.release());
test_stream_.addTrack(blink_track);
}

Powered by Google App Engine
This is Rietveld 408576698