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

Unified Diff: media/gpu/vaapi_video_decode_accelerator.h

Issue 2642623002: Fix Vaapi VDA flush handling during resolution change (Closed)
Patch Set: queue a dummy flush buffer 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..b4f306bff0802d897041ae22fe17932b34b9bbeb 100644
--- a/media/gpu/vaapi_video_decode_accelerator.h
+++ b/media/gpu/vaapi_video_decode_accelerator.h
@@ -93,7 +93,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
// Map the received input buffer into this process' address space and
// queue it for decode.
- void MapAndQueueNewInputBuffer(const BitstreamBuffer& bitstream_buffer);
+ bool MapAndQueueNewInputBuffer(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
@@ -110,6 +110,8 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
// reset/flush/destroy).
bool WaitForSurfaces_Locked();
+ bool IsFlushPending_Locked();
+
// Continue decoding given input buffers and sleep waiting for input/output
// as needed. Will exit if a new set of surfaces or reset/flush/destroy
// is requested.
@@ -196,8 +198,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.
@@ -214,7 +214,11 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
InputBuffer();
Owen Lin 2017/01/19 07:39:16 Remove both ctor and dtor?
kcwu 2017/01/20 07:49:03 Done.
~InputBuffer();
- int32_t id;
+ // Indicates this is a dummy buffer for flush request.
+ // If |dummy_flush| is true, |id| and |shm| are not used.
+ bool dummy_flush = false;
+
+ int32_t id = 0;
std::unique_ptr<SharedMemoryRegion> shm;
Owen Lin 2017/01/19 07:39:16 Why not just use "shm == null" to indicate an empt
kcwu 2017/01/19 08:26:10 Do you mean "shm = null" to assign a default value
Owen Lin 2017/01/20 02:20:06 No, I mean we don't really need a new member dummy
kcwu 2017/01/20 07:49:03 Done.
};
« 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