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

Unified Diff: common_video/video_frame_buffer.cc

Issue 2951033003: [EXPERIMENTAL] Generic stereo codec with index header sending single frames
Patch Set: Rebase and add external codec support. Created 3 years, 3 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 | « common_video/video_frame.cc ('k') | media/base/codec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common_video/video_frame_buffer.cc
diff --git a/common_video/video_frame_buffer.cc b/common_video/video_frame_buffer.cc
index 19649cf68fa04d4da17fe4c3fd86c6e1ffc662d9..25c12e59e9a3bcf2890f14429a17f60f327eb383 100644
--- a/common_video/video_frame_buffer.cc
+++ b/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 | « common_video/video_frame.cc ('k') | media/base/codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698