diff options
Diffstat (limited to 'content/renderer/media/capture_video_decoder.cc')
-rw-r--r-- | content/renderer/media/capture_video_decoder.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/content/renderer/media/capture_video_decoder.cc b/content/renderer/media/capture_video_decoder.cc index 0ceb1ac..74652f3 100644 --- a/content/renderer/media/capture_video_decoder.cc +++ b/content/renderer/media/capture_video_decoder.cc @@ -50,12 +50,8 @@ void CaptureVideoDecoder::ProduceVideoFrame( &CaptureVideoDecoder::ProduceVideoFrameOnDecoderThread, video_frame)); } -int CaptureVideoDecoder::width() { - return capability_.width; -} - -int CaptureVideoDecoder::height() { - return capability_.height; +gfx::Size CaptureVideoDecoder::natural_size() { + return gfx::Size(capability_.width, capability_.height); } void CaptureVideoDecoder::Play(media::FilterCallback* callback) { @@ -223,7 +219,8 @@ void CaptureVideoDecoder::OnBufferReadyOnDecoderThread( if (buf->width != capability_.width || buf->height != capability_.height) { capability_.width = buf->width; capability_.height = buf->height; - host()->SetVideoSize(capability_.width, capability_.height); + host()->SetNaturalVideoSize( + gfx::Size(capability_.width, capability_.height)); } // Check if there's a size change. @@ -242,6 +239,9 @@ void CaptureVideoDecoder::OnBufferReadyOnDecoderThread( uint8* buffer = buf->memory_pointer; + // Assume YV12 format. + // TODO(vrk): This DCHECK fails in content_unittests ... it should not! + // DCHECK(capability_.raw_type == media::VideoFrame::YV12); int y_width = capability_.width; int y_height = capability_.height; int uv_width = capability_.width / 2; |