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(); |
+ |
// 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_; |