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 <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 audio_tracks[0].initialize(blink_audio_source.id(), blink_audio_source); | 324 audio_tracks[0].initialize(blink_audio_source.id(), blink_audio_source); |
325 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), | 325 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), |
326 Initialize(_, _, -1)); | 326 Initialize(_, _, -1)); |
327 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), | 327 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), |
328 SetAutomaticGainControl(true)); | 328 SetAutomaticGainControl(true)); |
329 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), Start()); | 329 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), Start()); |
330 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), Stop()); | 330 EXPECT_CALL(*mock_audio_device_factory_.mock_capturer_source(), Stop()); |
331 CHECK(audio_source->ConnectToTrack(audio_tracks[0])); | 331 CHECK(audio_source->ConnectToTrack(audio_tracks[0])); |
332 blink::WebVector<blink::WebMediaStreamTrack> video_tracks( | 332 blink::WebVector<blink::WebMediaStreamTrack> video_tracks( |
333 static_cast<size_t>(1)); | 333 static_cast<size_t>(1)); |
334 blink::WebMediaConstraints video_constraints; | |
335 video_constraints.initialize(); | |
336 video_tracks[0] = MediaStreamVideoTrack::CreateVideoTrack( | 334 video_tracks[0] = MediaStreamVideoTrack::CreateVideoTrack( |
337 native_video_source, video_constraints, | 335 native_video_source, MediaStreamVideoSource::ConstraintsCallback(), |
338 MediaStreamVideoSource::ConstraintsCallback(), true); | 336 true); |
339 | 337 |
340 blink::WebMediaStream local_stream; | 338 blink::WebMediaStream local_stream; |
341 local_stream.initialize(blink::WebString::fromUTF8(stream_label), | 339 local_stream.initialize(blink::WebString::fromUTF8(stream_label), |
342 audio_tracks, video_tracks); | 340 audio_tracks, video_tracks); |
343 local_stream.setExtraData(new MediaStream()); | 341 local_stream.setExtraData(new MediaStream()); |
344 return local_stream; | 342 return local_stream; |
345 } | 343 } |
346 | 344 |
347 // Creates a remote MediaStream and adds it to the mocked native | 345 // Creates a remote MediaStream and adds it to the mocked native |
348 // peer connection. | 346 // peer connection. |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 testing::Ref(tracks[0]))); | 1359 testing::Ref(tracks[0]))); |
1362 | 1360 |
1363 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( | 1361 std::unique_ptr<blink::WebRTCDTMFSenderHandler> sender( |
1364 pc_handler_->createDTMFSender(tracks[0])); | 1362 pc_handler_->createDTMFSender(tracks[0])); |
1365 EXPECT_TRUE(sender.get()); | 1363 EXPECT_TRUE(sender.get()); |
1366 | 1364 |
1367 StopAllTracks(local_stream); | 1365 StopAllTracks(local_stream); |
1368 } | 1366 } |
1369 | 1367 |
1370 } // namespace content | 1368 } // namespace content |
OLD | NEW |