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

Unified Diff: webrtc/common_video/video_frame_buffer.cc

Issue 2990463002: [EXPERIMENTAL] Generic stereo codec with index header sending merged frames
Patch Set: Created 3 years, 5 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 | « webrtc/common_video/video_frame.cc ('k') | webrtc/media/base/codec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame_buffer.cc
diff --git a/webrtc/common_video/video_frame_buffer.cc b/webrtc/common_video/video_frame_buffer.cc
index f26e627786e270abcc865ad04e72f4fb6ca9666f..764c1f46fcac9ffce16f72b13974d27576a5f73a 100644
--- a/webrtc/common_video/video_frame_buffer.cc
+++ b/webrtc/common_video/video_frame_buffer.cc
@@ -128,6 +128,54 @@ class WrappedYuvBuffer : public Base {
rtc::Callback0<void> no_longer_used_cb_;
};
+WrappedI420ABuffer::WrappedI420ABuffer(
+ rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer,
+ const uint8_t* a_plane,
+ int a_stride,
+ const rtc::Callback0<void>& alpha_no_longer_used_cb)
+ : buffer_(buffer),
+ i420_buffer_(buffer->ToI420()),
+ a_plane_(a_plane),
+ a_stride_(a_stride),
+ alpha_no_longer_used_cb_(alpha_no_longer_used_cb) {}
+
+WrappedI420ABuffer::~WrappedI420ABuffer() {
+ alpha_no_longer_used_cb_();
+}
+
+int WrappedI420ABuffer::width() const {
+ return buffer_->width();
+}
+int WrappedI420ABuffer::height() const {
+ return buffer_->height();
+}
+
+const uint8_t* WrappedI420ABuffer::DataY() const {
+ return i420_buffer_->DataY();
+}
+const uint8_t* WrappedI420ABuffer::DataU() const {
+ return i420_buffer_->DataU();
+}
+const uint8_t* WrappedI420ABuffer::DataV() const {
+ return i420_buffer_->DataV();
+}
+const uint8_t* WrappedI420ABuffer::DataA() const {
+ return a_plane_;
+}
+
+int WrappedI420ABuffer::StrideY() const {
+ return i420_buffer_->StrideY();
+}
+int WrappedI420ABuffer::StrideU() const {
+ return i420_buffer_->StrideU();
+}
+int WrappedI420ABuffer::StrideV() const {
+ return i420_buffer_->StrideV();
+}
+int WrappedI420ABuffer::StrideA() const {
+ return a_stride_;
+}
+
rtc::scoped_refptr<I420BufferInterface> WrapI420Buffer(
int width,
int height,
« no previous file with comments | « webrtc/common_video/video_frame.cc ('k') | webrtc/media/base/codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698