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

Unified Diff: content/common/gpu/media/vt_video_decode_accelerator.h

Issue 491163002: Implement flushing in VTVideoDecodeAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: content/common/gpu/media/vt_video_decode_accelerator.h
diff --git a/content/common/gpu/media/vt_video_decode_accelerator.h b/content/common/gpu/media/vt_video_decode_accelerator.h
index 185d0fb1b77b039553a79feed89f3d5495f1163e..71748570a9fd9a8f1a78394a2548919fc03e9a52 100644
--- a/content/common/gpu/media/vt_video_decode_accelerator.h
+++ b/content/common/gpu/media/vt_video_decode_accelerator.h
@@ -64,16 +64,27 @@ class VTVideoDecodeAccelerator
base::ScopedCFTypeRef<CVImageBufferRef> image_buffer;
};
+ enum State {
+ // TODO(sandersd): Size changing state.
+ NORMAL,
+ FLUSHING,
+ RESETTING,
+ DESTROYING,
+ };
+
// Methods for interacting with VideoToolbox. Run on |decoder_thread_|.
void ConfigureDecoder(
const std::vector<const uint8_t*>& nalu_data_ptrs,
const std::vector<size_t>& nalu_data_sizes);
void DecodeTask(const media::BitstreamBuffer);
+ void FlushTask();
// Methods for interacting with |client_|. Run on |gpu_task_runner_|.
void OutputTask(DecodedFrame frame);
void SizeChangedTask(gfx::Size coded_size);
void SendPictures();
+ void FlushStart(State state);
+ void FlushDone();
//
// GPU thread state.
@@ -81,6 +92,8 @@ class VTVideoDecodeAccelerator
CGLContextObj cgl_context_;
media::VideoDecodeAccelerator::Client* client_;
gfx::Size texture_size_;
+ State state_;
+ int32_t frames_pending_decode_;
// Texture IDs of pictures.
// TODO(sandersd): A single map of structs holding picture data.

Powered by Google App Engine
This is Rietveld 408576698