Package: libva
Version: 1.0.8-1
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: kfreebsd


Hi,

the current version fails to build on GNU/kFreeBSD.

Please find attached patch with tweaks.

Petr
--- libva-1.0.8.orig/va/va_backend_tpi.h
+++ libva-1.0.8/va/va_backend_tpi.h
@@ -32,7 +32,9 @@
 #include <va/va.h>
 #include <va/va_backend.h>
 
+#ifdef __linux__
 #include <linux/videodev2.h>
+#endif
 
 struct VADriverVTableTPI
 {
@@ -43,6 +45,8 @@ struct VADriverVTableTPI
 		VASurfaceID *surface		/* out */
 	);
     
+#ifdef __linux__
+
         VAStatus (*vaCreateSurfaceFromV4L2Buf) (
 		VADriverContextP ctx,
                 int v4l2_fd,         /* file descriptor of V4L2 device */
@@ -51,6 +55,8 @@ struct VADriverVTableTPI
                 VASurfaceID *surface	           /* out */
         );
 
+#endif 
+
         VAStatus (*vaCreateSurfacesForUserPtr)(
                 VADisplay dpy,
                 int width,
--- libva-1.0.8.orig/va/va_tpi.c
+++ libva-1.0.8/va/va_tpi.c
@@ -66,6 +66,8 @@ VAStatus vaCreateSurfaceFromCIFrame (
   
 }
 
+#ifdef __linux__
+
 /* Wrap a V4L2 buffer as a VA surface, so that V4L2 camera, VA encode
  * can share the data without copy
  * The VA driver should query the camera device from v4l2_fd to see
@@ -98,6 +100,7 @@ VAStatus vaCreateSurfaceFromV4L2Buf(
       return VA_STATUS_ERROR_UNIMPLEMENTED;
 }
 
+#endif
 
 /*
  * The surfaces could be shared and accessed with extern devices
--- libva-1.0.8.orig/va/va_backend.h
+++ libva-1.0.8/va/va_backend.h
@@ -33,7 +33,10 @@
 #ifndef ANDROID
 #include <X11/Xlib.h>
 #endif
+
+#ifdef __linux__
 #include <linux/videodev2.h>
+#endif
 
 typedef struct VADriverContext *VADriverContextP;
 typedef struct VADisplayContext *VADisplayContextP;

Reply via email to