Commit e2a24f01 authored by Gwenole Beauchesne's avatar Gwenole Beauchesne Committed by Austin Yuan

Split libva DSO into core (libva.so) and display-dependent parts (libva-x11.so).

Signed-off-by: default avatarAustin Yuan <shengquan.yuan@intel.com>
parent 4e71a2dd
......@@ -31,11 +31,16 @@ SUBDIRS += i965_drv_video
endif
pcfiles = \
libva.pc
libva.pc \
libva-$(LIBVA_DISPLAY).pc
# libva-<display>.pc - for display-specific dependencies
libva-$(LIBVA_DISPLAY).pc: libva_display.pc
@cp $< $@
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = $(pcfiles)
EXTRA_DIST = libva.pc.in
EXTRA_DIST = libva.pc.in libva_display.pc.in
CLEANFILES = $(pcfiles)
......@@ -114,8 +114,12 @@ AC_SUBST(LIBVA_LIBS)
pkgconfigdir=${libdir}/pkgconfig
AC_SUBST(pkgconfigdir)
libvabackendlib=libva.la
LIBVA_DISPLAY=x11
libvacorelib=libva.la
libvabackendlib=libva-$LIBVA_DISPLAY.la
AC_SUBST([libvacorelib])
AC_SUBST([libvabackendlib])
AC_SUBST(LIBVA_DISPLAY)
AC_OUTPUT([
Makefile
......@@ -130,5 +134,6 @@ AC_OUTPUT([
i965_drv_video/shaders/render/Makefile
test/Makefile
libva.pc
libva_display.pc
])
......@@ -27,7 +27,7 @@ AM_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_srcdir)/src/x11 @DRM_CFLAGS@ -DIN_
i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
i965_drv_video_la_LDFLAGS = -module -avoid-version -no-undefined -Wl,--no-undefined @DRM_LIBS@ -ldrm_intel
i965_drv_video_la_LIBADD = ../src/libva.la -lpthread
i965_drv_video_la_LIBADD = ../src/libva-x11.la -lpthread
i965_drv_video_la_SOURCES = \
object_heap.c \
......
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
display=@LIBVA_DISPLAY@
Name: libva-${display}
Description: Userspace Video Acceleration (VA) ${display} interface
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lva-${display}
Cflags: -I${includedir}
......@@ -28,10 +28,18 @@ INCLUDES = \
LDADD = \
$(LIBVA_LT_LDFLAGS)
libva_la_LTLIBRARIES = libva.la
lib_LTLIBRARIES = \
libva.la \
libva-x11.la
libva_ladir = $(libdir)
libva_la_LDFLAGS = $(LDADD) -no-undefined
libva_la_LIBADD = $(LIBVA_LIBS) -ldl -lX11 -lXext x11/libva_x11.la -ldrm -lXfixes
libva_la_LIBADD = $(LIBVA_LIBS) -ldl
libva_x11_la_SOURCES =
libva_x11_la_LIBADD = $(libvacorelib) x11/libva_x11.la $(LIBVA_LIBS) $(X11_LIBS) $(XEXT_LIBS) $(DRM_LIBS) $(XFIXES_LIBS)
libva_x11_la_LDFLAGS = $(LDADD)
libva_x11_la_DEPENDENCIES = $(libvacorelib)
SUBDIRS = x11
......
......@@ -56,7 +56,11 @@
static int va_debug_trace = 0;
int vaDisplayIsValid(VADisplay dpy);
static int vaDisplayIsValid(VADisplay dpy)
{
VADisplayContextP pDisplayContext = (VADisplayContextP)dpy;
return pDisplayContext && pDisplayContext->vaIsValid(pDisplayContext);
}
static void va_errorMessage(const char *msg, ...)
{
......
......@@ -205,27 +205,6 @@ static VAStatus va_DisplayContextGetDriverName (
return vaStatus;
}
int vaDisplayIsValid(VADisplay dpy)
{
VADisplayContextP tmp=NULL;
VADisplayContextP pDisplayContext = pDisplayContexts;
while (pDisplayContext)
{
if (pDisplayContext == (VADisplayContextP)dpy)
{
tmp = (VADisplay)pDisplayContext;
break;
}
pDisplayContext = pDisplayContext->pNext;
}
if (!tmp)
return 0;
return tmp->vaIsValid(pDisplayContext);
}
VADisplay vaGetDisplay (
Display *native_dpy /* implementation specific */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment