Index: content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc |
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc |
index eabae96a079bcb20da1e7fd23f1fa690ae00f859..e84b327ead72fb5319c3c538553876ea5df6abd2 100644 |
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc |
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc |
@@ -122,13 +122,12 @@ void VideoCaptureGpuJpegDecoder::DecodeCapturedData( |
// Mask against 30 bits, to avoid (undefined) wraparound on signed integer. |
next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x3FFFFFFF; |
- // The APIs of |decoder_| and |decode_done_cb_| require us to wrap the |
- // |out_buffer| in a VideoFrame. |
+ // The API of |decoder_| requires us to wrap the |out_buffer| in a VideoFrame. |
const gfx::Size dimensions = frame_format.frame_size; |
std::unique_ptr<media::VideoCaptureBufferHandle> out_buffer_access = |
- out_buffer.handle_provider()->GetHandleForInProcessAccess(); |
+ out_buffer.handle_provider->GetHandleForInProcessAccess(); |
base::SharedMemoryHandle out_handle = |
- out_buffer.handle_provider()->GetNonOwnedSharedMemoryHandleForLegacyIPC(); |
+ out_buffer.handle_provider->GetNonOwnedSharedMemoryHandleForLegacyIPC(); |
scoped_refptr<media::VideoFrame> out_frame = |
media::VideoFrame::WrapExternalSharedMemory( |
media::PIXEL_FORMAT_I420, // format |
@@ -152,10 +151,21 @@ void VideoCaptureGpuJpegDecoder::DecodeCapturedData( |
out_frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME, |
reference_time); |
+ media::mojom::VideoFrameInfoPtr out_frame_info = |
+ media::mojom::VideoFrameInfo::New(); |
+ out_frame_info->timestamp = timestamp; |
+ out_frame_info->pixel_format = media::PIXEL_FORMAT_I420; |
+ out_frame_info->storage_type = media::PIXEL_STORAGE_CPU; |
+ out_frame_info->coded_size = dimensions; |
+ out_frame_info->visible_rect = gfx::Rect(dimensions); |
+ out_frame_info->metadata = out_frame->metadata()->CopyInternalValues(); |
+ |
{ |
base::AutoLock lock(lock_); |
- decode_done_closure_ = |
- base::Bind(decode_done_cb_, base::Passed(&out_buffer), out_frame); |
+ decode_done_closure_ = base::Bind( |
+ decode_done_cb_, out_buffer.id(), out_buffer.frame_feedback_id(), |
+ base::Passed(&out_buffer.access_permission), |
+ base::Passed(&out_frame_info)); |
} |
decoder_->Decode(in_buffer, std::move(out_frame)); |
} |