Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: media/gpu/vaapi_video_decode_accelerator.h

Issue 2642623002: Fix Vaapi VDA flush handling during resolution change (Closed)
Patch Set: address owen's comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
};
« no previous file with comments | « no previous file | media/gpu/vaapi_video_decode_accelerator.cc » ('j') | media/gpu/vaapi_video_decode_accelerator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698