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

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: Rebase 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
« no previous file with comments | « content/renderer/media/mock_media_stream_impl.h ('k') | content/renderer/media/mock_peer_connection_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4996e957f72bf533077568b78fc7ee2807abd93f 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,15 @@ MockMediaStreamImpl::CreatePeerConnectionHandler(
}
void MockMediaStreamImpl::ClosePeerConnection() {
- video_label_.clear();
}
-bool MockMediaStreamImpl::SetVideoCaptureModule(const std::string& label) {
- video_label_ = label;
- return true;
+webrtc::MediaStreamTrackInterface*
+MockMediaStreamImpl::GetLocalMediaStreamTrack(const 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 +63,10 @@ void MockMediaStreamImpl::OnAudioDeviceFailed(
int index) {
NOTIMPLEMENTED();
}
+
+void MockMediaStreamImpl::AddTrack(
+ const std::string& label,
+ webrtc::MediaStreamTrackInterface* track) {
+ mock_local_tracks_.insert(
+ std::pair<std::string, webrtc::MediaStreamTrackInterface*>(label, track));
+}
« no previous file with comments | « content/renderer/media/mock_media_stream_impl.h ('k') | content/renderer/media/mock_peer_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698