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

Unified Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

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
Index: content/common/gpu/media/vaapi_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/vaapi_video_decode_accelerator.cc b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
index d54db04d18521171113f799347a0c520417c4a57..06b0823c10cbaf7fee5bbaa72ca75e5d0eceea0a 100644
--- a/content/common/gpu/media/vaapi_video_decode_accelerator.cc
+++ b/content/common/gpu/media/vaapi_video_decode_accelerator.cc
@@ -67,6 +67,10 @@ VaapiVideoDecodeAccelerator::VaapiVideoDecodeAccelerator(
client_(client_ptr_factory_.GetWeakPtr()),
decoder_thread_("VaapiDecoderThread") {
DCHECK(client);
+ static bool vaapi_functions_initialized = PostSandboxInitialization();
+ RETURN_AND_NOTIFY_ON_FAILURE(vaapi_functions_initialized,
+ "Failed to initialize VAAPI libs",
+ PLATFORM_FAILURE, );
}
VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() {
@@ -555,6 +559,16 @@ void VaapiVideoDecodeAccelerator::Destroy() {
delete this;
}
+// static
+void VaapiVideoDecodeAccelerator::PreSandboxInitialization() {
+ VaapiH264Decoder::PreSandboxInitialization();
+}
+
+// static
+bool VaapiVideoDecodeAccelerator::PostSandboxInitialization() {
+ return VaapiH264Decoder::PostSandboxInitialization();
+}
+
void VaapiVideoDecodeAccelerator::OutputPicCallback(int32 input_id,
int32 output_id) {
TRACE_EVENT2("Video Decoder", "VAVDA::OutputPicCallback",

Powered by Google App Engine
This is Rietveld 408576698