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

Unified Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 1853503003: Add CoreVideoFrameBuffer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add guards 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
Index: webrtc/common_video/include/video_frame_buffer.h
diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h
index 9cf57a43591b1da66f82ed9d59ffde5794fdc212..6973bb7ddc13dcc7bcf6fe4580d0882767f41581 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -13,6 +13,9 @@
#include <stdint.h>
+#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+#include <CoreVideo/CoreVideo.h>
+#endif
#include <memory>
#include "webrtc/base/callback.h"
@@ -160,6 +163,21 @@ rtc::scoped_refptr<VideoFrameBuffer> ShallowCenterCrop(
int cropped_width,
int cropped_height);
+#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
pbos-webrtc 2016/04/01 11:56:10 This class should go into a separate header I thin
tkchin_webrtc 2016/04/01 16:09:29 Done.
+
+class CoreVideoFrameBuffer : public NativeHandleBuffer {
+ public:
+ explicit CoreVideoFrameBuffer(CVPixelBufferRef pixel_buffer);
+ virtual ~CoreVideoFrameBuffer();
+
+ rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override;
+
+ private:
+ CVPixelBufferRef pixel_buffer_;
+};
+
+#endif // defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+
} // namespace webrtc
#endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_

Powered by Google App Engine
This is Rietveld 408576698