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

Unified Diff: webrtc/common_video/video_frame.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/interface/video_frame_buffer.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame.cc
diff --git a/webrtc/common_video/video_frame.cc b/webrtc/common_video/video_frame.cc
index 9c127602df0b08a0ea98ff66dbbd23a30ba29101..208a31b618f1b52f3d941c844246994d1432b106 100644
--- a/webrtc/common_video/video_frame.cc
+++ b/webrtc/common_video/video_frame.cc
@@ -36,22 +36,6 @@ VideoFrame::VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
rotation_(rotation) {
}
-VideoFrame::VideoFrame(void* native_handle,
- int width,
- int height,
- uint32_t timestamp,
- int64_t render_time_ms,
- VideoRotation rotation,
- const rtc::Callback0<void>& no_longer_used)
- : VideoFrame(new rtc::RefCountedObject<TextureBuffer>(native_handle,
- width,
- height,
- no_longer_used),
- timestamp,
- render_time_ms,
- rotation) {
-}
-
int VideoFrame::CreateEmptyFrame(int width,
int height,
int stride_y,
@@ -211,4 +195,12 @@ void VideoFrame::set_video_frame_buffer(
video_frame_buffer_ = buffer;
}
+VideoFrame VideoFrame::ConvertNativeToI420Frame() const {
+ DCHECK(native_handle());
+ VideoFrame frame;
+ frame.ShallowCopy(*this);
+ frame.set_video_frame_buffer(video_frame_buffer_->NativeToI420Buffer());
+ return frame;
+}
+
} // namespace webrtc
« no previous file with comments | « webrtc/common_video/interface/video_frame_buffer.h ('k') | webrtc/common_video/video_frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698