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

Unified Diff: media/gpu/v4l2_video_decode_accelerator.h

Issue 2408703002: V4L2VideoDecodeAccelerator: implement flush by VIDIOC_DECODER_CMD. (Closed)
Patch Set: address Pawel and Kuang-che's comments Created 4 years, 2 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
« no previous file with comments | « media/gpu/v4l2_device.h ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/v4l2_video_decode_accelerator.h
diff --git a/media/gpu/v4l2_video_decode_accelerator.h b/media/gpu/v4l2_video_decode_accelerator.h
index fe15d6f0b69d1b72115f1970cabb9c30e81c7d28..09cb1d6d249f361c58bd5d142fb2a8d63ecf1587 100644
--- a/media/gpu/v4l2_video_decode_accelerator.h
+++ b/media/gpu/v4l2_video_decode_accelerator.h
@@ -290,6 +290,10 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
// called any time a relevant queue could potentially be emptied: see
// function definition.
void NotifyFlushDoneIfNeeded();
+ // Returns true if VIDIOC_DECODER_CMD is supported.
+ bool IsDecoderCmdSupported();
+ // Send V4L2_DEC_CMD_START to the driver. Return true if success.
+ bool SendDecoderCmdStop();
// Reset() task. Drop all input buffers. If V4L2VDA is not doing resolution
// change or waiting picture buffers, call FinishReset.
@@ -449,8 +453,18 @@ class MEDIA_GPU_EXPORT V4L2VideoDecodeAccelerator
int decoder_decode_buffer_tasks_scheduled_;
// Picture buffers held by the client.
int decoder_frames_at_client_;
+
// Are we flushing?
bool decoder_flushing_;
+ // True if VIDIOC_DECODER_CMD is supported.
+ bool decoder_cmd_supported_;
+ // True if flushing is waiting for last output buffer. After
+ // VIDIOC_DECODER_CMD is sent to the driver, this flag will be set to true to
+ // wait for the last output buffer. When this flag is true, flush done will
+ // not be sent. After an output buffer that has the flag V4L2_BUF_FLAG_LAST is
+ // received, this is set to false.
+ bool flush_awaiting_last_output_buffer_;
+
// Got a reset request while we were performing resolution change or waiting
// picture buffers.
bool reset_pending_;
« no previous file with comments | « media/gpu/v4l2_device.h ('k') | media/gpu/v4l2_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698