Chromium Code Reviews| 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 cd56db2cc81d861e8e7cdb630df5b6719a4ffe10..5820dbf3ca84e1f430ab0d1b76c811c2eff61929 100644 |
| --- a/content/common/gpu/media/vt_video_decode_accelerator.h |
| +++ b/content/common/gpu/media/vt_video_decode_accelerator.h |
| @@ -94,13 +94,18 @@ class VTVideoDecodeAccelerator |
| // Methods for interacting with |client_|. Run on |gpu_task_runner_|. |
| void OutputTask(DecodedFrame frame); |
| - void SizeChangedTask(gfx::Size coded_size); |
| void NotifyError(Error error); |
| // Send decoded frames up to and including |up_to_bitstream_id|, and return |
| // the last sent |bitstream_id|. |
| int32_t SendPictures(int32_t up_to_bitstream_id); |
| + // Internal helpers for SendPictures(). |
| + int32_t ProcessDroppedFrames( |
|
Pawel Osciak
2014/10/30 11:02:52
Please document.
sandersd (OOO until July 31)
2014/10/30 22:54:40
Done.
|
| + int32_t last_sent_bitstream_id, |
| + int32_t up_to_bitstream_id); |
| + void ProcessSizeChange(); |
| + |
| // Since VideoToolbox has no reset feature (only flush), and the VDA API |
| // allows Decode() and Flush() calls during a reset operation, it's possible |
| // to have multiple pending actions at once. We handle the fully general case |
| @@ -128,16 +133,17 @@ class VTVideoDecodeAccelerator |
| base::Callback<bool(void)> make_context_current_; |
| media::VideoDecodeAccelerator::Client* client_; |
| bool has_error_; // client_->NotifyError() called. |
| - gfx::Size texture_size_; |
| + gfx::Size picture_size_; |
| std::queue<PendingAction> pending_actions_; |
| std::queue<int32_t> pending_bitstream_ids_; |
|
Pawel Osciak
2014/10/30 11:02:52
Could we please add documentation for members?
sandersd (OOO until July 31)
2014/10/30 22:54:40
Done.
|
| + std::set<int32_t> assigned_picture_ids_; |
| // Texture IDs of pictures. |
| // TODO(sandersd): A single map of structs holding picture data. |
|
Pawel Osciak
2014/11/02 23:09:52
This would still be great to have...
sandersd (OOO until July 31)
2014/11/03 21:14:25
Acknowledged.
|
| std::map<int32_t, uint32_t> texture_ids_; |
| // Pictures ready to be rendered to. |
| - std::queue<int32_t> available_picture_ids_; |
| + std::vector<int32_t> available_picture_ids_; |
| // Decoded frames ready to render. |
| std::queue<DecodedFrame> decoded_frames_; |
| @@ -152,7 +158,10 @@ class VTVideoDecodeAccelerator |
| base::ScopedCFTypeRef<CMFormatDescriptionRef> format_; |
| base::ScopedCFTypeRef<VTDecompressionSessionRef> session_; |
| media::H264Parser parser_; |
| - gfx::Size coded_size_; |
| + |
| + std::vector<uint8_t> last_sps_; |
| + std::vector<uint8_t> last_spsext_; |
| + std::vector<uint8_t> last_pps_; |
| // |
| // Shared state (set up and torn down on GPU thread). |