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

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

Issue 10829182: 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: . 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 065f8e49d9d624fc88e1c2ccd9196e81c43eeea4..38889d98201a3488c98b7eddf019b880b263d523 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() {
@@ -537,6 +541,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