Re-land "Convert native handles to buffers before encoding."

This reverts commit a67675506c9057bd9ffd4d76aae8b743343d434d.

BUG=webrtc:4081
TBR=magjed@webrtc.org

Review URL: https://codereview.webrtc.org/1158273010

Cr-Commit-Position: refs/heads/master@{#9381}
This commit is contained in:
Peter Boström
2015-06-05 11:08:03 +02:00
parent 3fbf3f8841
commit eb66e800d1
19 changed files with 211 additions and 143 deletions

View File

@ -25,13 +25,6 @@ class VideoFrame {
uint32_t timestamp,
int64_t render_time_ms,
VideoRotation rotation);
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);
// TODO(pbos): Make all create/copy functions void, they should not be able to
// fail (which should be DCHECK/CHECKed instead).
@ -160,6 +153,10 @@ class VideoFrame {
void set_video_frame_buffer(
const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer);
// Convert native-handle frame to memory-backed I420 frame. Should not be
// called on a non-native-handle frame.
VideoFrame ConvertNativeToI420Frame() const;
private:
// An opaque reference counted handle that stores the pixel data.
rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer_;