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

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

Issue 10824051: VAVDA: Go back to using vaTerminate now that the bug in the driver is fixed. (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Created 8 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/vaapi_h264_decoder.cc
diff --git a/content/common/gpu/media/vaapi_h264_decoder.cc b/content/common/gpu/media/vaapi_h264_decoder.cc
index 64d2441440188711a443c238b6e74d744a19d414..d65c5758acb2723262462c7ad0449630b18aa7be 100644
--- a/content/common/gpu/media/vaapi_h264_decoder.cc
+++ b/content/common/gpu/media/vaapi_h264_decoder.cc
@@ -34,9 +34,8 @@ namespace content {
void *vaapi_handle = dlopen("libva.so", RTLD_NOW);
void *vaapi_x11_handle = dlopen("libva-x11.so", RTLD_NOW);
-void *vaapi_glx_handle = dlopen("libva-glx.so", RTLD_NOW);
-typedef VADisplay (*VaapiGetDisplayGLX)(Display *dpy);
+typedef VADisplay (*VaapiGetDisplay)(Display *dpy);
typedef int (*VaapiDisplayIsValid)(VADisplay dpy);
typedef VAStatus (*VaapiInitialize)(VADisplay dpy,
int *major_version,
@@ -109,7 +108,7 @@ typedef const char* (*VaapiErrorStr)(VAStatus error_status);
Vaapi##name VAAPI_##name = \
reinterpret_cast<Vaapi##name>(dlsym((handle), "va"#name))
-VAAPI_DLSYM(GetDisplayGLX, vaapi_glx_handle);
+VAAPI_DLSYM(GetDisplay, vaapi_x11_handle);
VAAPI_DLSYM(DisplayIsValid, vaapi_handle);
VAAPI_DLSYM(Initialize, vaapi_handle);
VAAPI_DLSYM(Terminate, vaapi_handle);
@@ -130,7 +129,7 @@ VAAPI_DLSYM(DestroyBuffer, vaapi_handle);
VAAPI_DLSYM(ErrorStr, vaapi_handle);
static bool AreVaapiFunctionPointersInitialized() {
- return VAAPI_GetDisplayGLX &&
+ return VAAPI_GetDisplay &&
VAAPI_DisplayIsValid &&
VAAPI_Initialize &&
VAAPI_Terminate &&
@@ -419,10 +418,8 @@ void VaapiH264Decoder::Destroy() {
DestroyVASurfaces();
va_res = VAAPI_DestroyConfig(va_display_, va_config_id_);
VA_LOG_ON_ERROR(va_res, "vaDestroyConfig failed");
- // TODO(fischman,posciak): call vaTerminate when we figure out why it
- // crashes.
- // va_res = VAAPI_Terminate(va_display_);
- // VA_LOG_ON_ERROR(va_res, "vaTerminate failed");
+ va_res = VAAPI_Terminate(va_display_);
+ VA_LOG_ON_ERROR(va_res, "vaTerminate failed");
// fallthrough
case kUninitialized:
break;
@@ -509,7 +506,7 @@ bool VaapiH264Decoder::Initialize(
return false;
}
- va_display_ = VAAPI_GetDisplayGLX(x_display_);
+ va_display_ = VAAPI_GetDisplay(x_display_);
if (!VAAPI_DisplayIsValid(va_display_)) {
DVLOG(1) << "Could not get a valid VA display";
return false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698