Chromium Code Reviews| Index: media/mojo/clients/mojo_video_decoder.h |
| diff --git a/media/mojo/clients/mojo_video_decoder.h b/media/mojo/clients/mojo_video_decoder.h |
| index 1c0facc01bdb1fae37ec737a704c897ba7d0e321..9a19a000f6cb895dc47409d6f4b61d13f61271ed 100644 |
| --- a/media/mojo/clients/mojo_video_decoder.h |
| +++ b/media/mojo/clients/mojo_video_decoder.h |
| @@ -50,12 +50,18 @@ class MojoVideoDecoder final : public VideoDecoder, |
| void OnVideoFrameDecoded(mojom::VideoFramePtr frame) final; |
| private: |
| - void OnInitializeDone(bool status); |
| - void OnDecodeDone(DecodeStatus status); |
| + void OnInitializeDone(bool status, |
| + bool needs_bitstream_conversion, |
| + int32_t max_decode_requests); |
| + void OnDecodeDone(uint64_t decode_id, |
| + DecodeStatus status, |
| + bool can_read_without_stalling); |
| void OnResetDone(); |
| void BindRemoteDecoder(); |
| - void OnConnectionError(); |
| + |
| + // Cleans up callbacks and blocks future calls. |
| + void Stop(); |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| GpuVideoAcceleratorFactories* gpu_factories_; |
| @@ -66,7 +72,8 @@ class MojoVideoDecoder final : public VideoDecoder, |
| InitCB init_cb_; |
| OutputCB output_cb_; |
| - DecodeCB decode_cb_; |
| + uint64_t decode_counter_ = 0; |
| + std::map<uint64_t, DecodeCB> pending_decodes_; |
| base::Closure reset_cb_; |
| mojom::VideoDecoderPtr remote_decoder_; |
| @@ -75,6 +82,11 @@ class MojoVideoDecoder final : public VideoDecoder, |
| bool has_connection_error_ = false; |
| mojo::AssociatedBinding<VideoDecoderClient> client_binding_; |
| + bool initialized_ = false; |
| + bool needs_bitstream_conversion_ = false; |
| + bool max_decode_requests_ = 1; |
|
dcheng
2016/10/18 20:39:05
bool?
sandersd (OOO until July 31)
2016/10/19 18:28:30
Done.
|
| + bool can_read_without_stalling_ = true; |
| + |
| DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder); |
| }; |