Chromium Code Reviews| Index: media/gpu/vaapi_video_decode_accelerator.h |
| diff --git a/media/gpu/vaapi_video_decode_accelerator.h b/media/gpu/vaapi_video_decode_accelerator.h |
| index 8228a928cfdbc5d756982351abd39a408bf34a65..1e888ebda82d830797e5cda166f30e552b8fcacc 100644 |
| --- a/media/gpu/vaapi_video_decode_accelerator.h |
| +++ b/media/gpu/vaapi_video_decode_accelerator.h |
| @@ -91,9 +91,8 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator |
| // Notify the client that an error has occurred and decoding cannot continue. |
| void NotifyError(Error error); |
| - // Map the received input buffer into this process' address space and |
| - // queue it for decode. |
| - void MapAndQueueNewInputBuffer(const BitstreamBuffer& bitstream_buffer); |
| + // Queue a input buffer for decode. |
| + void QueueInputBuffer(const BitstreamBuffer& bitstream_buffer); |
| // Get a new input buffer from the queue and set it up in decoder. This will |
| // sleep if no input buffers are available. Return true if a new buffer has |
| @@ -196,8 +195,6 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator |
| kDecoding, |
| // Resetting, waiting for decoder to finish current task and cleanup. |
| kResetting, |
| - // Flushing, waiting for decoder to finish current task and cleanup. |
| - kFlushing, |
| // Idle, decoder in state ready to start/resume decoding. |
| kIdle, |
| // Destroying, waiting for the decoder to finish current task. |
| @@ -211,10 +208,10 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator |
| // An input buffer awaiting consumption, provided by the client. |
| struct InputBuffer { |
| - InputBuffer(); |
| - ~InputBuffer(); |
| + // Indicates this is a dummy buffer for flush request. |
| + bool is_flush() const { return shm == nullptr; } |
| - int32_t id; |
| + int32_t id = 0; |
|
Pawel Osciak
2017/01/24 07:10:33
I think we start from 0 normally, so perhaps -1?
kcwu
2017/01/24 07:54:23
Done.
|
| std::unique_ptr<SharedMemoryRegion> shm; |
| }; |