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

Unified Diff: content/common/gpu/media/omx_video_decode_accelerator.h

Issue 10827173: Only dlopen() OMX/VAAPI libs in the GPU process, and only lazily dlsym() their symbols. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add include_dirs for new gpu_main.cc deps. Created 8 years, 4 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 | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/omx_video_decode_accelerator.h
diff --git a/content/common/gpu/media/omx_video_decode_accelerator.h b/content/common/gpu/media/omx_video_decode_accelerator.h
index 60fc63845a2e2b90edcae9ce8e5779e1569e9478..2a846ec41b4a7ea95beff848151ac2953ae16d5e 100644
--- a/content/common/gpu/media/omx_video_decode_accelerator.h
+++ b/content/common/gpu/media/omx_video_decode_accelerator.h
@@ -54,6 +54,9 @@ class CONTENT_EXPORT OmxVideoDecodeAccelerator :
base::WeakPtr<OmxVideoDecodeAccelerator> weak_this() { return weak_this_; }
+ // Do any necessary initialization before the sandbox is enabled.
+ static void PreSandboxInitialization();
+
private:
// Because OMX state-transitions are described solely by the "state reached"
// (3.1.2.9.1, table 3-7 of the spec), we track what transition was requested
@@ -143,6 +146,10 @@ class CONTENT_EXPORT OmxVideoDecodeAccelerator :
// Decode bitstream buffers that were queued (see queued_bitstream_buffers_).
void DecodeQueuedBitstreamBuffers();
+ // Lazily initialize static data after sandbox is enabled. Return false on
+ // init failure.
+ static bool PostSandboxInitialization();
+
// Weak pointer to |this|; used to safely trampoline calls from the OMX thread
// to the ChildThread. Since |this| is kept alive until OMX is fully shut
// down, only the OMX->Child thread direction needs to be guarded this way.
@@ -207,6 +214,9 @@ class CONTENT_EXPORT OmxVideoDecodeAccelerator :
uint32 h264_profile_; // OMX_AVCProfile requested during Initialization.
bool component_name_is_nvidia_h264ext_;
+ // Has static initialization of pre-sandbox components completed successfully?
+ static bool pre_sandbox_init_done_;
+
// Method to handle events
void EventHandlerCompleteTask(OMX_EVENTTYPE event,
OMX_U32 data1,
« no previous file with comments | « no previous file | content/common/gpu/media/omx_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698