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

Unified Diff: media/filters/gpu_video_decoder.h

Issue 2461073002: Use MediaCodec.setOutputSurface() for fullscreen transitions on M. (Closed)
Patch Set: Address comments. Created 4 years, 1 month 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/blink/webmediaplayer_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.h
diff --git a/media/filters/gpu_video_decoder.h b/media/filters/gpu_video_decoder.h
index 478a35703c028d87fd66be1be7b2745061f783dc..ff7ce85f447819865e44a0b6bc4f6f7d2a958756 100644
--- a/media/filters/gpu_video_decoder.h
+++ b/media/filters/gpu_video_decoder.h
@@ -58,7 +58,6 @@ class MEDIA_EXPORT GpuVideoDecoder
CdmContext* cdm_context,
const InitCB& init_cb,
const OutputCB& output_cb) override;
- void CompleteInitialization(int cdm_id, int surface_id);
void Decode(const scoped_refptr<DecoderBuffer>& buffer,
const DecodeCB& decode_cb) override;
void Reset(const base::Closure& closure) override;
@@ -156,6 +155,16 @@ class MEDIA_EXPORT GpuVideoDecoder
// Assert the contract that this class is operated on the right thread.
void DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() const;
+ // Provided to the |request_surface_cb_| callback given during construction;
+ // sets or changes the output surface.
+ void OnSurfaceAvailable(int surface_id);
+
+ // If the VDA supports external surfaces, we must wait for the surface before
+ // completing initialization. This will be called by OnSurfaceAvailable() once
+ // the surface is known or immediately by Initialize() if external surfaces
+ // are unsupported.
+ void CompleteInitialization();
+
bool needs_bitstream_conversion_;
GpuVideoAcceleratorFactories* factories_;
@@ -243,6 +252,10 @@ class MEDIA_EXPORT GpuVideoDecoder
// This flag translates to COPY_REQUIRED flag for each frame.
bool requires_texture_copy_;
+ // Set during Initialize(); given to the VDA for purposes for handling
+ // encrypted content.
+ int cdm_id_;
+
// Bound to factories_->GetMessageLoop().
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<GpuVideoDecoder> weak_factory_;
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698