Bug 1376873 - WebrtcGmpVideoCodec updates; r=pehrsons
authorDan Minor <dminor@mozilla.com>
Tue, 21 Aug 2018 13:40:26 -0400
changeset 504494 8b5e947a14080b50ce788d1d28b6dfd711d739f1
parent 504493 756ab3fad62b76b33aadfc298cf3c31621b2b614
child 504495 2fb84f9968af4251c97bb112ec18081e57c2a93f
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspehrsons
bugs1376873
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1376873 - WebrtcGmpVideoCodec updates; r=pehrsons Differential Revision: https://phabricator.services.mozilla.com/D7432
media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.cpp
@@ -19,17 +19,17 @@
 #include "GMPVideoDecoderProxy.h"
 #include "GMPVideoEncoderProxy.h"
 #include "MainThreadUtils.h"
 
 #include "gmp-video-host.h"
 #include "gmp-video-frame-i420.h"
 #include "gmp-video-frame-encoded.h"
 #include "webrtc/common_video/include/video_frame_buffer.h"
-#include "webrtc/base/bind.h"
+#include "webrtc/rtc_base/bind.h"
 
 namespace mozilla {
 
 #ifdef LOG
 #undef LOG
 #endif
 
 extern mozilla::LogModule* GetGMPLog();
@@ -402,17 +402,17 @@ WebrtcGmpVideoEncoder::Encode_g(RefPtr<W
 
   GMPVideoFrame* ftmp = nullptr;
   GMPErr err = aEncoder->mHost->CreateFrame(kGMPI420VideoFrame, &ftmp);
   if (err != GMPNoErr) {
     LOGD(("GMP Encode: failed to create frame on host"));
     return;
   }
   GMPUniquePtr<GMPVideoi420Frame> frame(static_cast<GMPVideoi420Frame*>(ftmp));
-  rtc::scoped_refptr<webrtc::VideoFrameBuffer> input_image = aInputImage.video_frame_buffer();
+  rtc::scoped_refptr<webrtc::I420BufferInterface> input_image = aInputImage.video_frame_buffer()->GetI420();
   // check for overflow of stride * height
   CheckedInt32 ysize = CheckedInt32(input_image->StrideY()) * input_image->height();
   MOZ_RELEASE_ASSERT(ysize.isValid());
   // I will assume that if that doesn't overflow, the others case - YUV
   // 4:2:0 has U/V widths <= Y, even with alignment issues.
   err = frame->CreateFrame(ysize.value(),
                            input_image->DataY(),
                            input_image->StrideU() * ((input_image->height()+1)/2),
@@ -1027,17 +1027,16 @@ WebrtcGmpVideoDecoder::Decoded(GMPVideoi
           buffer_y, aDecodedFrame->Stride(kGMPYPlane),
           buffer_u, aDecodedFrame->Stride(kGMPUPlane),
           buffer_v, aDecodedFrame->Stride(kGMPVPlane),
           rtc::Bind(&DeleteBuffer, buffer.release())));
 
       webrtc::VideoFrame image(video_frame_buffer, 0, 0,
                                webrtc::kVideoRotation_0);
       image.set_timestamp((aDecodedFrame->Timestamp() * 90ll + 999)/1000); // round up
-      image.set_render_time_ms(0);
 
       LOGD(("GMP Decoded: %" PRIu64, aDecodedFrame->Timestamp()));
       mCallback->Decoded(image);
     }
   }
   aDecodedFrame->Destroy();
 }