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

Unified Diff: talk/app/webrtc/objc/avfoundationvideocapturer.h

Issue 1838933004: Improve iOS frame capture threading. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix * Created 4 years, 9 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 | « no previous file | talk/app/webrtc/objc/avfoundationvideocapturer.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/objc/avfoundationvideocapturer.h
diff --git a/talk/app/webrtc/objc/avfoundationvideocapturer.h b/talk/app/webrtc/objc/avfoundationvideocapturer.h
index 69ade5f1e01221ebc9fda19c74b5d9e850d47b2e..8bc128dd42d76ad984f49d796083b41bad59bf16 100644
--- a/talk/app/webrtc/objc/avfoundationvideocapturer.h
+++ b/talk/app/webrtc/objc/avfoundationvideocapturer.h
@@ -41,7 +41,8 @@ class Thread;
namespace webrtc {
-class AVFoundationVideoCapturer : public cricket::VideoCapturer {
+class AVFoundationVideoCapturer : public cricket::VideoCapturer,
+ public rtc::MessageHandler {
public:
AVFoundationVideoCapturer();
~AVFoundationVideoCapturer();
@@ -57,7 +58,8 @@ class AVFoundationVideoCapturer : public cricket::VideoCapturer {
return true;
}
- // Returns the active capture session.
+ // Returns the active capture session. Calls to the capture session should
+ // occur on the RTCDispatcherTypeCaptureSession queue in RTCDispatcher.
AVCaptureSession* GetCaptureSession();
// Returns whether the rear-facing camera can be used.
@@ -72,9 +74,11 @@ class AVFoundationVideoCapturer : public cricket::VideoCapturer {
// frame for capture.
void CaptureSampleBuffer(CMSampleBufferRef sampleBuffer);
+ // Handles messages from posts.
+ void OnMessage(rtc::Message *msg) override;
+
private:
- // Used to signal frame capture on the thread that capturer was started on.
- void SignalFrameCapturedOnStartThread(const cricket::CapturedFrame* frame);
+ void OnFrameMessage(CVImageBufferRef image_buffer, int64_t capture_time);
RTCAVFoundationVideoCapturerInternal* _capturer;
rtc::Thread* _startThread; // Set in Start(), unset in Stop().
« no previous file with comments | « no previous file | talk/app/webrtc/objc/avfoundationvideocapturer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698