| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 std::string audio_track_label("audio-label"); | 249 std::string audio_track_label("audio-label"); |
| 250 blink::WebMediaStreamSource blink_audio_source; | 250 blink::WebMediaStreamSource blink_audio_source; |
| 251 blink_audio_source.initialize(blink::WebString::fromUTF8(audio_track_label), | 251 blink_audio_source.initialize(blink::WebString::fromUTF8(audio_track_label), |
| 252 blink::WebMediaStreamSource::TypeAudio, | 252 blink::WebMediaStreamSource::TypeAudio, |
| 253 blink::WebString::fromUTF8("audio_track"), | 253 blink::WebString::fromUTF8("audio_track"), |
| 254 false /* remote */); | 254 false /* remote */); |
| 255 ProcessedLocalAudioSource* const audio_source = | 255 ProcessedLocalAudioSource* const audio_source = |
| 256 new ProcessedLocalAudioSource( | 256 new ProcessedLocalAudioSource( |
| 257 -1 /* consumer_render_frame_id is N/A for non-browser tests */, | 257 -1 /* consumer_render_frame_id is N/A for non-browser tests */, |
| 258 StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "Mock device", | 258 StreamDeviceInfo(MEDIA_DEVICE_AUDIO_CAPTURE, "Mock device", |
| 259 "mock_device_id", | 259 "mock_device_id", "mock_group_id", |
| 260 media::AudioParameters::kAudioCDSampleRate, | 260 media::AudioParameters::kAudioCDSampleRate, |
| 261 media::CHANNEL_LAYOUT_STEREO, | 261 media::CHANNEL_LAYOUT_STEREO, |
| 262 media::AudioParameters::kAudioCDSampleRate / 100), | 262 media::AudioParameters::kAudioCDSampleRate / 100), |
| 263 mock_dependency_factory_.get()); | 263 mock_dependency_factory_.get()); |
| 264 audio_source->SetAllowInvalidRenderFrameIdForTesting(true); | 264 audio_source->SetAllowInvalidRenderFrameIdForTesting(true); |
| 265 audio_source->SetSourceConstraints( | 265 audio_source->SetSourceConstraints( |
| 266 MockConstraintFactory().CreateWebMediaConstraints()); | 266 MockConstraintFactory().CreateWebMediaConstraints()); |
| 267 blink_audio_source.setExtraData(audio_source); // Takes ownership. | 267 blink_audio_source.setExtraData(audio_source); // Takes ownership. |
| 268 | 268 |
| 269 blink::WebMediaStreamSource video_source; | 269 blink::WebMediaStreamSource video_source; |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 testing::Ref(tracks[0]))); | 1058 testing::Ref(tracks[0]))); |
| 1059 | 1059 |
| 1060 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( | 1060 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( |
| 1061 pc_handler_->createDTMFSender(tracks[0])); | 1061 pc_handler_->createDTMFSender(tracks[0])); |
| 1062 EXPECT_TRUE(sender.get()); | 1062 EXPECT_TRUE(sender.get()); |
| 1063 | 1063 |
| 1064 StopAllTracks(local_stream); | 1064 StopAllTracks(local_stream); |
| 1065 } | 1065 } |
| 1066 | 1066 |
| 1067 } // namespace content | 1067 } // namespace content |
| OLD | NEW |