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

Unified Diff: media/gpu/android_video_decode_accelerator.h

Issue 1993833002: Serialize usage of SurfaceView between AVDA instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments. Created 4 years, 7 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: media/gpu/android_video_decode_accelerator.h
diff --git a/media/gpu/android_video_decode_accelerator.h b/media/gpu/android_video_decode_accelerator.h
index 60ecff06e0c85f9892aafa2d2531bbb1d4150d3f..ac19026b20fa8c3d638d52ed71ec3159d56c2ee1 100644
--- a/media/gpu/android_video_decode_accelerator.h
+++ b/media/gpu/android_video_decode_accelerator.h
@@ -210,6 +210,18 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
DISALLOW_COPY_AND_ASSIGN(CodecConfig);
};
+ // Callback that is called when the SurfaceView becomes available, if it's
+ // not during Initialize. |success| is true if it is now available, false
+ // if initialization should stop.
+ void OnSurfaceAvailable(bool success);
+
+ // Finish initialization of the strategy. This is to be called when the
+ // SurfaceView in |surface_id_|, if any, is no longer busy. It will return
+ // false on failure, and true if initialization was successful. This includes
+ // synchronous and asynchronous init; the AVDA might not yet have a codec on
+ // success, but async init will at least be in progress.
+ bool InitializeStrategy();
watk 2016/05/18 20:38:18 Header order doesn't match cc order
liberato (no reviews please) 2016/05/18 21:13:13 not sure that i follow -- OnSurfaceAvailable prece
watk 2016/05/18 21:21:14 Sorry, I just noticed that InitializeStrategy is f
+
// A part of destruction process that is sometimes postponed after the drain.
void ActualDestroy();
@@ -263,7 +275,7 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
void DecodeBuffer(const media::BitstreamBuffer& bitstream_buffer);
// Called during Initialize() for encrypted streams to set up the CDM.
- void InitializeCdm(int cdm_id);
+ void InitializeCdm();
// Called after the CDM obtains a MediaCrypto object.
void OnMediaCryptoReady(
@@ -425,6 +437,9 @@ class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
// called NotifyInitializationComplete.
bool deferred_initialization_pending_;
+ // Cdm id that we will use in InitializeCdm().
+ int cdm_id_;
+
int surface_id_;
OnDestroyingSurfaceCallback on_destroying_surface_cb_;
« no previous file with comments | « no previous file | media/gpu/android_video_decode_accelerator.cc » ('j') | media/gpu/android_video_decode_accelerator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698