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

Unified Diff: media/mojo/clients/mojo_video_decoder.h

Issue 2429723006: MojoVideoDecoder: Plumb metadata methods. (Closed)
Patch Set: Actually early return. 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/base/video_decoder.h ('k') | media/mojo/clients/mojo_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..78d36c324d81a619718d5ee3f7f9ddff83be968b 100644
--- a/media/mojo/clients/mojo_video_decoder.h
+++ b/media/mojo/clients/mojo_video_decoder.h
@@ -50,12 +50,16 @@ 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);
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 +70,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 +80,10 @@ class MojoVideoDecoder final : public VideoDecoder,
bool has_connection_error_ = false;
mojo::AssociatedBinding<VideoDecoderClient> client_binding_;
+ bool initialized_ = false;
+ bool needs_bitstream_conversion_ = false;
+ int32_t max_decode_requests_ = 1;
+
DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder);
};
« no previous file with comments | « media/base/video_decoder.h ('k') | media/mojo/clients/mojo_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698