| Index: content/renderer/media/rtc_video_decoder.cc
|
| diff --git a/content/renderer/media/rtc_video_decoder.cc b/content/renderer/media/rtc_video_decoder.cc
|
| index 4a43f431395cbc78d898b61b2fb5784359575ae3..8753ab66d7f73564e83f7d9eed4e7dbcb36ea64c 100644
|
| --- a/content/renderer/media/rtc_video_decoder.cc
|
| +++ b/content/renderer/media/rtc_video_decoder.cc
|
| @@ -12,7 +12,9 @@
|
| #include "base/stl_util.h"
|
| #include "base/task_runner_util.h"
|
| #include "content/child/child_thread.h"
|
| +#include "content/renderer/media/native_handle_impl.h"
|
| #include "media/base/bind_to_loop.h"
|
| +#include "third_party/webrtc/common_video/interface/texture_video_frame.h"
|
| #include "third_party/webrtc/system_wrappers/interface/ref_count.h"
|
|
|
| namespace content {
|
| @@ -350,12 +352,10 @@ void RTCVideoDecoder::PictureReady(const media::Picture& picture) {
|
| DCHECK(inserted);
|
|
|
| // Create a WebRTC video frame.
|
| - // TODO(wuchengli): make media::VideoFrame an opaque native handle and put it
|
| - // into WebRTC frame.
|
| - webrtc::I420VideoFrame decoded_image;
|
| - decoded_image.CreateEmptyFrame(
|
| - width, height, width, (width + 1) / 2, (width + 1) / 2);
|
| - decoded_image.set_timestamp(timestamp);
|
| + webrtc::RefCountImpl<NativeHandleImpl>* handle =
|
| + new webrtc::RefCountImpl<NativeHandleImpl>();
|
| + handle->SetHandle(frame.get());
|
| + webrtc::TextureVideoFrame decoded_image(handle, width, height, timestamp, 0);
|
|
|
| // Invoke decode callback. WebRTC expects no frame callback after Release.
|
| {
|
|
|