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

Side by Side Diff: talk/app/webrtc/test/peerconnectiontestwrapper.cc

Issue 1236023010: In PeerConnectionTestWrapper, put audio input on a separate thread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: resolving patch conflicts due to splitting this CL Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/test/peerconnectiontestwrapper.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {} 69 PeerConnectionTestWrapper::~PeerConnectionTestWrapper() {}
70 70
71 bool PeerConnectionTestWrapper::CreatePc( 71 bool PeerConnectionTestWrapper::CreatePc(
72 const MediaConstraintsInterface* constraints) { 72 const MediaConstraintsInterface* constraints) {
73 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create(); 73 allocator_factory_ = webrtc::FakePortAllocatorFactory::Create();
74 if (!allocator_factory_) { 74 if (!allocator_factory_) {
75 return false; 75 return false;
76 } 76 }
77 77
78 fake_audio_capture_module_ = FakeAudioCaptureModule::Create( 78 fake_audio_capture_module_ = FakeAudioCaptureModule::Create();
79 rtc::Thread::Current());
80 if (fake_audio_capture_module_ == NULL) { 79 if (fake_audio_capture_module_ == NULL) {
81 return false; 80 return false;
82 } 81 }
83 82
84 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory( 83 peer_connection_factory_ = webrtc::CreatePeerConnectionFactory(
85 rtc::Thread::Current(), rtc::Thread::Current(), 84 rtc::Thread::Current(), rtc::Thread::Current(),
86 fake_audio_capture_module_, NULL, NULL); 85 fake_audio_capture_module_, NULL, NULL);
87 if (!peer_connection_factory_) { 86 if (!peer_connection_factory_) {
88 return false; 87 return false;
89 } 88 }
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 peer_connection_factory_->CreateVideoSource( 288 peer_connection_factory_->CreateVideoSource(
290 new webrtc::FakePeriodicVideoCapturer(), &constraints); 289 new webrtc::FakePeriodicVideoCapturer(), &constraints);
291 std::string videotrack_label = label + kVideoTrackLabelBase; 290 std::string videotrack_label = label + kVideoTrackLabelBase;
292 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track( 291 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
293 peer_connection_factory_->CreateVideoTrack(videotrack_label, source)); 292 peer_connection_factory_->CreateVideoTrack(videotrack_label, source));
294 293
295 stream->AddTrack(video_track); 294 stream->AddTrack(video_track);
296 } 295 }
297 return stream; 296 return stream;
298 } 297 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/test/peerconnectiontestwrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698