| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/renderer/media/mock_media_stream_registry.h" | 5 #include "content/renderer/media/mock_media_stream_registry.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/renderer/media/media_stream.h" | 10 #include "content/renderer/media/media_stream.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 MockCDQualityAudioSource() : MediaStreamAudioSource(true) { | 27 MockCDQualityAudioSource() : MediaStreamAudioSource(true) { |
| 28 MediaStreamAudioSource::SetFormat(media::AudioParameters( | 28 MediaStreamAudioSource::SetFormat(media::AudioParameters( |
| 29 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, | 29 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, |
| 30 media::CHANNEL_LAYOUT_STEREO, | 30 media::CHANNEL_LAYOUT_STEREO, |
| 31 media::AudioParameters::kAudioCDSampleRate, | 31 media::AudioParameters::kAudioCDSampleRate, |
| 32 16, | 32 16, |
| 33 media::AudioParameters::kAudioCDSampleRate / 100)); | 33 media::AudioParameters::kAudioCDSampleRate / 100)); |
| 34 MediaStreamAudioSource::SetDeviceInfo(StreamDeviceInfo( | 34 MediaStreamAudioSource::SetDeviceInfo(StreamDeviceInfo( |
| 35 MEDIA_DEVICE_AUDIO_CAPTURE, "Mock audio device", "mock_audio_device_id", | 35 MEDIA_DEVICE_AUDIO_CAPTURE, "Mock audio device", "mock_audio_device_id", |
| 36 "mock_group_id", media::AudioParameters::kAudioCDSampleRate, | 36 media::AudioParameters::kAudioCDSampleRate, |
| 37 media::CHANNEL_LAYOUT_STEREO, | 37 media::CHANNEL_LAYOUT_STEREO, |
| 38 media::AudioParameters::kAudioCDSampleRate / 100)); | 38 media::AudioParameters::kAudioCDSampleRate / 100)); |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(MockCDQualityAudioSource); | 42 DISALLOW_COPY_AND_ASSIGN(MockCDQualityAudioSource); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 | 96 |
| 97 test_stream_.addTrack(blink_track); | 97 test_stream_.addTrack(blink_track); |
| 98 } | 98 } |
| 99 | 99 |
| 100 blink::WebMediaStream MockMediaStreamRegistry::GetMediaStream( | 100 blink::WebMediaStream MockMediaStreamRegistry::GetMediaStream( |
| 101 const std::string& url) { | 101 const std::string& url) { |
| 102 return (url != stream_url_) ? blink::WebMediaStream() : test_stream_; | 102 return (url != stream_url_) ? blink::WebMediaStream() : test_stream_; |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace content | 105 } // namespace content |
| OLD | NEW |