blob: 4996e957f72bf533077568b78fc7ee2807abd93f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/mock_media_stream_impl.h"
#include <utility>
#include "content/renderer/media/rtc_video_decoder.h"
MockMediaStreamImpl::MockMediaStreamImpl()
: MediaStreamImpl(NULL, NULL, NULL, NULL) {
}
MockMediaStreamImpl::~MockMediaStreamImpl() {}
WebKit::WebPeerConnectionHandler*
MockMediaStreamImpl::CreatePeerConnectionHandler(
WebKit::WebPeerConnectionHandlerClient* client) {
NOTIMPLEMENTED();
return NULL;
}
void MockMediaStreamImpl::ClosePeerConnection() {
}
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(
const GURL& url,
media::MessageLoopFactory* message_loop_factory) {
NOTIMPLEMENTED();
return NULL;
}
void MockMediaStreamImpl::OnStreamGenerated(
int request_id,
const std::string& label,
const media_stream::StreamDeviceInfoArray& audio_array,
const media_stream::StreamDeviceInfoArray& video_array) {
NOTIMPLEMENTED();
}
void MockMediaStreamImpl::OnStreamGenerationFailed(int request_id) {
NOTIMPLEMENTED();
}
void MockMediaStreamImpl::OnVideoDeviceFailed(
const std::string& label,
int index) {
NOTIMPLEMENTED();
}
void MockMediaStreamImpl::OnAudioDeviceFailed(
const std::string& label,
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));
}
|