Index: chrome/gpu/arc_gpu_video_decode_accelerator.h |
diff --git a/chrome/gpu/arc_gpu_video_decode_accelerator.h b/chrome/gpu/arc_gpu_video_decode_accelerator.h |
index e29f9aaa69344014aa6a94692a838ac119e410b8..187b83c8d1ef41583d6c9624380ddc8bd210bb33 100644 |
--- a/chrome/gpu/arc_gpu_video_decode_accelerator.h |
+++ b/chrome/gpu/arc_gpu_video_decode_accelerator.h |
@@ -42,7 +42,8 @@ class ArcGpuVideoDecodeAccelerator |
size_t length) override; |
void BindDmabuf(PortType port, |
uint32_t index, |
- base::ScopedFD dmabuf_fd) override; |
+ base::ScopedFD dmabuf_fd, |
+ int32_t stride) override; |
void UseBuffer(PortType port, |
uint32_t index, |
const BufferMetadata& metadata) override; |
@@ -78,14 +79,24 @@ class ArcGpuVideoDecodeAccelerator |
// The file handle to access the buffer. It is owned by this class and |
// should be closed after use. |
base::ScopedFD handle; |
- off_t offset; |
- size_t length; |
+ off_t offset = 0; |
+ size_t length = 0; |
InputBufferInfo(); |
InputBufferInfo(InputBufferInfo&& other); |
~InputBufferInfo(); |
}; |
+ // The information about the Dmabuf used as an output buffer. |
+ struct OutputBufferInfo { |
+ base::ScopedFD handle; |
+ int32_t stride = 0; |
+ |
+ OutputBufferInfo(); |
+ OutputBufferInfo(OutputBufferInfo&& other); |
+ ~OutputBufferInfo(); |
+ }; |
+ |
// Helper function to Send the end-of-stream output buffer if |
// |pending_eos_output_buffer_| is true, or reuse the picture in ArcVDA. |
void SendEosIfNeededOrReusePicture(uint32_t index); |
@@ -136,7 +147,7 @@ class ArcGpuVideoDecodeAccelerator |
// To keep those output buffers which have been bound by bindDmabuf() but not |
// be used yet. Will call VDA::ImportBufferForPicture() when those buffers are |
// used for the first time. |
- std::vector<base::ScopedFD> buffers_pending_import_; |
+ std::vector<OutputBufferInfo> buffers_pending_import_; |
base::ThreadChecker thread_checker_; |
size_t output_buffer_size_; |