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

Unified Diff: webrtc/common_video/video_frame_buffer.cc

Issue 1158273010: Re-land "Convert native handles to buffers before encoding." (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 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/modules/video_coding/main/source/generic_encoder.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 908c97272d829e0f90b7caf7ea901bee181c2afe..2cf427ce42de2c853a356f8fd2a4cdda1f0b3aa7 100644
--- a/webrtc/common_video/video_frame_buffer.cc
+++ b/webrtc/common_video/video_frame_buffer.cc
@@ -94,51 +94,47 @@ void* I420Buffer::native_handle() const {
return nullptr;
}
-TextureBuffer::TextureBuffer(void* native_handle,
- int width,
- int height,
- const rtc::Callback0<void>& no_longer_used)
- : native_handle_(native_handle),
- width_(width),
- height_(height),
- no_longer_used_cb_(no_longer_used) {
+rtc::scoped_refptr<VideoFrameBuffer> I420Buffer::NativeToI420Buffer() {
+ RTC_NOTREACHED();
+ return nullptr;
+}
+
+NativeHandleBuffer::NativeHandleBuffer(void* native_handle,
+ int width,
+ int height)
+ : native_handle_(native_handle), width_(width), height_(height) {
DCHECK(native_handle != nullptr);
DCHECK_GT(width, 0);
DCHECK_GT(height, 0);
}
-TextureBuffer::~TextureBuffer() {
- no_longer_used_cb_();
-}
-
-int TextureBuffer::width() const {
+int NativeHandleBuffer::width() const {
return width_;
}
-int TextureBuffer::height() const {
+int NativeHandleBuffer::height() const {
return height_;
}
-const uint8_t* TextureBuffer::data(PlaneType type) const {
+const uint8_t* NativeHandleBuffer::data(PlaneType type) const {
RTC_NOTREACHED(); // Should not be called.
return nullptr;
}
-uint8_t* TextureBuffer::data(PlaneType type) {
+uint8_t* NativeHandleBuffer::data(PlaneType type) {
RTC_NOTREACHED(); // Should not be called.
return nullptr;
}
-int TextureBuffer::stride(PlaneType type) const {
+int NativeHandleBuffer::stride(PlaneType type) const {
RTC_NOTREACHED(); // Should not be called.
return 0;
}
-void* TextureBuffer::native_handle() const {
+void* NativeHandleBuffer::native_handle() const {
return native_handle_;
}
-
WrappedI420Buffer::WrappedI420Buffer(int desired_width,
int desired_height,
int width,
@@ -220,4 +216,9 @@ void* WrappedI420Buffer::native_handle() const {
return nullptr;
}
+rtc::scoped_refptr<VideoFrameBuffer> WrappedI420Buffer::NativeToI420Buffer() {
+ RTC_NOTREACHED();
+ return nullptr;
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/common_video/video_frame.cc ('k') | webrtc/modules/video_coding/main/source/generic_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698