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

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

Issue 2640153004: Add mailbox-based Mojo VideoFrame variant. (Closed)
Patch Set: Rebase. Created 3 years, 10 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_frame.cc ('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 bb13271206bedef4e8e009d72848cdd327a994eb..86e575035128f779de58f5bc5eb30aad8bb91fd2 100644
--- a/media/mojo/clients/mojo_video_decoder.h
+++ b/media/mojo/clients/mojo_video_decoder.h
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "media/base/video_decoder.h"
#include "media/mojo/interfaces/video_decoder.mojom.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
@@ -47,7 +48,9 @@ class MojoVideoDecoder final : public VideoDecoder,
int GetMaxDecodeRequests() const final;
// mojom::VideoDecoderClient implementation.
- void OnVideoFrameDecoded(mojom::VideoFramePtr frame) final;
+ void OnVideoFrameDecoded(
+ mojom::VideoFramePtr frame,
+ const base::Optional<base::UnguessableToken>& release_token) final;
private:
void OnInitializeDone(bool status,
@@ -58,6 +61,9 @@ class MojoVideoDecoder final : public VideoDecoder,
void BindRemoteDecoder();
+ void OnReleaseMailbox(const base::UnguessableToken& release_token,
+ const gpu::SyncToken& release_sync_token);
+
// Cleans up callbacks and blocks future calls.
void Stop();
@@ -86,6 +92,9 @@ class MojoVideoDecoder final : public VideoDecoder,
bool needs_bitstream_conversion_ = false;
int32_t max_decode_requests_ = 1;
+ base::WeakPtr<MojoVideoDecoder> weak_this_;
+ base::WeakPtrFactory<MojoVideoDecoder> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder);
};
« no previous file with comments | « media/base/video_frame.cc ('k') | media/mojo/clients/mojo_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698