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

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

Issue 9284020: Enabling usage of native PeerConnection v2 in libjingle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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_impl.cc
diff --git a/content/renderer/media/mock_media_stream_impl.cc b/content/renderer/media/mock_media_stream_impl.cc
index 910998952ea709bb35c6ac318aeac2010f6fab6d..0b2853584da19ea2686b845de896ea9d14c2a22f 100644
--- a/content/renderer/media/mock_media_stream_impl.cc
+++ b/content/renderer/media/mock_media_stream_impl.cc
@@ -4,6 +4,8 @@
#include "content/renderer/media/mock_media_stream_impl.h"
+#include <utility>
+
#include "content/renderer/media/rtc_video_decoder.h"
MockMediaStreamImpl::MockMediaStreamImpl()
@@ -20,12 +22,16 @@ MockMediaStreamImpl::CreatePeerConnectionHandler(
}
void MockMediaStreamImpl::ClosePeerConnection() {
- video_label_.clear();
+ get_track_label_.clear();
}
-bool MockMediaStreamImpl::SetVideoCaptureModule(const std::string& label) {
- video_label_ = label;
- return true;
+webrtc::MediaStreamTrackInterface*
+MockMediaStreamImpl::GetLocalMediaStreamTrack(std::string label) {
+ MockMediaStreamTrackPtrMap::iterator it = mock_local_tracks_.find(label);
+ if (it == mock_local_tracks_.end())
+ return NULL;
+ webrtc::MediaStreamTrackInterface* stream = it->second;
+ return stream;
}
scoped_refptr<media::VideoDecoder> MockMediaStreamImpl::GetVideoDecoder(
@@ -58,3 +64,10 @@ void MockMediaStreamImpl::OnAudioDeviceFailed(
int index) {
NOTIMPLEMENTED();
}
+
+void MockMediaStreamImpl::AddTrack(
+ std::string label,
+ webrtc::MediaStreamTrackInterface* track) {
+ mock_local_tracks_.insert(
+ std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track));
+}

Powered by Google App Engine
This is Rietveld 408576698