AVFoundation Video Capturer: Remove thread jump when delivering frames
WebRTC no longer has any restriction on what thread frames should be
delivered on. One possible problem with this CL is that NV21->I420
conversion and scaling is done on the thread that delivers frames, which
might cause fps regressions.
R=nisse@webrtc.org, perkj@webrtc.org, tkchin@webrtc.org
Review URL: https://codereview.webrtc.org/2137503003 .
Cr-Commit-Position: refs/heads/master@{#14021}
diff --git a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
index 5ce0462..ebabb8c 100644
--- a/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
+++ b/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.h
@@ -25,8 +25,7 @@
namespace webrtc {
-class AVFoundationVideoCapturer : public cricket::VideoCapturer,
- public rtc::MessageHandler {
+class AVFoundationVideoCapturer : public cricket::VideoCapturer {
public:
AVFoundationVideoCapturer();
~AVFoundationVideoCapturer();
@@ -59,16 +58,8 @@
void CaptureSampleBuffer(CMSampleBufferRef sample_buffer,
webrtc::VideoRotation rotation);
- // Handles messages from posts.
- void OnMessage(rtc::Message *msg) override;
-
private:
- void OnFrameMessage(CVImageBufferRef image_buffer,
- webrtc::VideoRotation rotation,
- int64_t capture_time_ns);
-
RTCAVFoundationVideoCapturerInternal *_capturer;
- rtc::Thread *_startThread; // Set in Start(), unset in Stop().
webrtc::I420BufferPool _buffer_pool;
}; // AVFoundationVideoCapturer