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

Unified Diff: talk/app/webrtc/test/fakeaudiocapturemodule.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/peerconnectionendtoend_unittest.cc ('k') | talk/app/webrtc/test/fakeaudiocapturemodule.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/test/fakeaudiocapturemodule.h
diff --git a/talk/app/webrtc/test/fakeaudiocapturemodule.h b/talk/app/webrtc/test/fakeaudiocapturemodule.h
index 8ff4aa19e7552eea7a0520bf6f4907ce865a081c..be1df9a7bd7e48c249b8011256994d9757bb7cc7 100644
--- a/talk/app/webrtc/test/fakeaudiocapturemodule.h
+++ b/talk/app/webrtc/test/fakeaudiocapturemodule.h
@@ -40,14 +40,13 @@
#include "webrtc/base/basictypes.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/messagehandler.h"
+#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/scoped_ref_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_device/include/audio_device.h"
namespace rtc {
-
class Thread;
-
} // namespace rtc
class FakeAudioCaptureModule
@@ -62,10 +61,7 @@ class FakeAudioCaptureModule
static const int kNumberBytesPerSample = sizeof(Sample);
// Creates a FakeAudioCaptureModule or returns NULL on failure.
- // |process_thread| is used to push and pull audio frames to and from the
- // returned instance. Note: ownership of |process_thread| is not handed over.
- static rtc::scoped_refptr<FakeAudioCaptureModule> Create(
- rtc::Thread* process_thread);
+ static rtc::scoped_refptr<FakeAudioCaptureModule> Create();
// Returns the number of frames that have been successfully pulled by the
// instance. Note that correctly detecting success can only be done if the
@@ -206,7 +202,7 @@ class FakeAudioCaptureModule
// exposed in which case the burden of proper instantiation would be put on
// the creator of a FakeAudioCaptureModule instance. To create an instance of
// this class use the Create(..) API.
- explicit FakeAudioCaptureModule(rtc::Thread* process_thread);
+ explicit FakeAudioCaptureModule();
// The destructor is protected because it is reference counted and should not
// be deleted directly.
virtual ~FakeAudioCaptureModule();
@@ -239,8 +235,6 @@ class FakeAudioCaptureModule
void ReceiveFrameP();
// Pushes frames to the registered webrtc::AudioTransport.
void SendFrameP();
- // Stops the periodic calling of ProcessFrame() in a thread safe way.
- void StopProcessP();
// The time in milliseconds when Process() was last called or 0 if no call
// has been made.
@@ -266,8 +260,7 @@ class FakeAudioCaptureModule
bool started_;
uint32 next_frame_time_;
- // User provided thread context.
- rtc::Thread* process_thread_;
+ rtc::scoped_ptr<rtc::Thread> process_thread_;
// Buffer for storing samples received from the webrtc::AudioTransport.
char rec_buffer_[kNumberSamples * kNumberBytesPerSample];
« no previous file with comments | « talk/app/webrtc/peerconnectionendtoend_unittest.cc ('k') | talk/app/webrtc/test/fakeaudiocapturemodule.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698