[pkg-nvidia-devel] r637 - in /packages/libvdpau/trunk: ./ debian/ doc/ include/vdpau/ src/ trace/

ceros-guest at users.alioth.debian.org ceros-guest at users.alioth.debian.org
Fri Nov 20 21:07:03 UTC 2009


Author: ceros-guest
Date: Fri Nov 20 21:07:03 2009
New Revision: 637

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=637
Log:
Update packaging for libvdpau 0.3.

Added:
    packages/libvdpau/trunk/.gitignore
      - copied unchanged from r636, packages/libvdpau/branches/upstream/current/.gitignore
    packages/libvdpau/trunk/doc/
      - copied from r636, packages/libvdpau/branches/upstream/current/doc/
Removed:
    packages/libvdpau/trunk/ChangeLog
    packages/libvdpau/trunk/Makefile.in
    packages/libvdpau/trunk/aclocal.m4
    packages/libvdpau/trunk/config.guess
    packages/libvdpau/trunk/config.h.in
    packages/libvdpau/trunk/config.sub
    packages/libvdpau/trunk/configure
    packages/libvdpau/trunk/depcomp
    packages/libvdpau/trunk/install-sh
    packages/libvdpau/trunk/ltmain.sh
    packages/libvdpau/trunk/missing
    packages/libvdpau/trunk/src/Makefile.in
    packages/libvdpau/trunk/trace/Makefile.in
Modified:
    packages/libvdpau/trunk/Makefile.am
    packages/libvdpau/trunk/configure.ac
    packages/libvdpau/trunk/debian/changelog
    packages/libvdpau/trunk/include/vdpau/vdpau.h
    packages/libvdpau/trunk/include/vdpau/vdpau_x11.h
    packages/libvdpau/trunk/src/Makefile.am
    packages/libvdpau/trunk/src/vdpau_wrapper.c
    packages/libvdpau/trunk/trace/Makefile.am
    packages/libvdpau/trunk/vdpau.pc.in

Modified: packages/libvdpau/trunk/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/Makefile.am?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/Makefile.am (original)
+++ packages/libvdpau/trunk/Makefile.am Fri Nov 20 21:07:03 2009
@@ -1,4 +1,4 @@
-SUBDIRS = src trace
+SUBDIRS = doc src trace
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = vdpau.pc

Modified: packages/libvdpau/trunk/configure.ac
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/configure.ac?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/configure.ac (original)
+++ packages/libvdpau/trunk/configure.ac Fri Nov 20 21:07:03 2009
@@ -1,6 +1,6 @@
 AC_PREREQ(2.57)
 
-AC_INIT(libvdpau, 0.2, [xorg at lists.freedesktop.org], libvdpau)
+AC_INIT(libvdpau, 0.3, [xorg at lists.freedesktop.org], libvdpau)
 AM_INIT_AUTOMAKE([dist-bzip2 foreign])
 AM_MAINTAINER_MODE
 
@@ -26,9 +26,43 @@
         AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
 AC_SUBST([DLOPEN_LIBS])
 
+# Check for Doxygen.
+AC_ARG_ENABLE(documentation, AS_HELP_STRING([--disable-documentation], [Disable Doxygen documentation (default: auto)]), [DOCS=$enableval], [DOCS=auto])
+if test "x$DOCS" != xno; then
+    AC_CHECK_TOOL([DOXYGEN], [doxygen], [no])
+    AC_CHECK_TOOL([DOT], [dot], [no])
+    AC_CHECK_TOOL([PDFTEX], [pdftex], [no])
+else
+    DOXYGEN=no
+    DOT=no
+    PDFTEX=no
+fi
+if test "x$DOCS" = xyes; then
+    if test "x$DOXYGEN" = xno; then
+        AC_ERROR([Documentation enabled but doxygen was not found in your path])
+    fi
+    if test "x$DOT" = xno; then
+        AC_ERROR([Documentation enabled but dot was not found in your path.  Please install graphviz])
+    fi
+    if test "x$PDFTEX" = xno; then
+        AC_ERROR([Documentation enabled but pdftex was not found in your path])
+    fi
+fi
+AM_CONDITIONAL([ENABLE_DOCS], [test "x$DOXYGEN" != xno -a "x$DOT" != xno -a "x$PDFTEX" != xno])
+AC_SUBST(DOXYGEN)
+
+# Options
+AC_ARG_WITH(module-dir,
+            AC_HELP_STRING([--with-module-dir=DIR],
+                           [Default module directory [[default=LIBDIR/vdpau]]]),
+            [moduledir="$withval"],
+            [moduledir="$libdir/vdpau"])
+AC_SUBST(moduledir)
+
 XORG_CHANGELOG
 
 AC_OUTPUT([Makefile
+           doc/Makefile
            src/Makefile
            trace/Makefile
            vdpau.pc])

Modified: packages/libvdpau/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/debian/changelog?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/debian/changelog (original)
+++ packages/libvdpau/trunk/debian/changelog Fri Nov 20 21:07:03 2009
@@ -1,6 +1,6 @@
-libvdpau (0.2-1) UNRELEASED; urgency=low
+libvdpau (0.3-1) unstable; urgency=low
 
   * Initial release.
     (Closes: #549626)
 
- -- Andres Mejia <mcitadel at gmail.com>  Fri, 16 Oct 2009 00:22:29 -0400
+ -- Andres Mejia <mcitadel at gmail.com>  Fri, 20 Nov 2009 16:06:04 -0500

Modified: packages/libvdpau/trunk/include/vdpau/vdpau.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/include/vdpau/vdpau.h?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/include/vdpau/vdpau.h (original)
+++ packages/libvdpau/trunk/include/vdpau/vdpau.h Fri Nov 20 21:07:03 2009
@@ -1233,13 +1233,34 @@
  */
 
 /**
+ * \brief The VDPAU interface version described by this header file.
+ *
+ * This version will only increase if a major incompatible change is made.
+ * For example, if the parameters passed to an existing function are modified,
+ * rather than simply adding new functions/enumerations), or if the mechanism
+ * used to load the backend driver is modified incompatibly. Such changes are
+ * unlikely.
+ *
+ * This value also represents the DSO version of VDPAU-related
+ * shared-libraries.
+ *
+ * VDPAU version numbers are simple integers that increase monotonically
+ * (typically by value 1).
+ */
+#define VDPAU_INTERFACE_VERSION 1
+
+/**
  * \brief The VDPAU version described by this header file.
  *
- * Note that VDPAU version numbers are simple integers that
- * increase monotonically (typically by value 1) with each VDPAU
- * header revision.
- */
-#define VDPAU_VERSION 0
+ * This version will increase whenever any non-documentation change is made to
+ * vdpau.h, or related header files such as vdpau_x11.h. Such changes
+ * typically involve the addition of new functions, constants, or features.
+ * Such changes are expected to be completely backwards-compatible.
+ *
+ * VDPAU version numbers are simple integers that increase monotonically
+ * (typically by value 1).
+ */
+#define VDPAU_VERSION 1
 
 /**
  * \brief Retrieve the VDPAU version implemented by the backend.
@@ -1501,6 +1522,37 @@
  * creation. Applications are expected to initialize any region
  * that they use, via \ref VdpDecoderRender or \ref
  * VdpVideoSurfacePutBitsYCbCr.
+ *
+ * Note that certain widths/heights are impossible for specific values of
+ * chroma_type. For example, the definition of VDP_CHROMA_TYPE_420 implies
+ * that the width must be even, since each single chroma sample covers two
+ * luma samples horizontally. A similar argument applies to surface heights,
+ * although doubly so, since interlaced pictures must be supported; each
+ * field's height must itself be a multiple of 2. Hence the overall surface's
+ * height must be a multiple of 4.
+ *
+ * Similar rules apply to other chroma_type values.
+ *
+ * Implementations may also impose additional restrictions on the surface
+ * sizes they support, potentially requiring additional rounding of actual
+ * surface sizes.
+ *
+ * In most cases, this is not an issue, since:
+ * - Video streams are encoded as an array of macro-blocks, which typically
+ *   have larger size alignment requirements than video surfaces do.
+ * - APIs such as \ref VdpVideoMixerRender allow specification of a sub-region
+ *   of the surface to read, which allows the padding data to be clipped away.
+ *
+ * However, other APIs such as \ref VdpVideoSurfaceGetBitsYCbCr and
+ * \ref VdpVideoSurfacePutBitsYCbCr do not allow a sub-region to be specified,
+ * and always operate on surface size that was actually allocated, rather
+ * than the surface size that was requested. In this case, applications need
+ * to be aware of the actual surface size, in order to allocate appropriately
+ * sized buffers for the get-/put-bits operations.
+ *
+ * For this reason, applications may need to call
+ * \ref VdpVideoSurfaceGetParameters after creation, in order to retrieve the
+ * actual surface size.
  */
 typedef VdpStatus VdpVideoSurfaceCreate(
     VdpDevice         device,
@@ -2164,7 +2216,7 @@
  *       \ref VdpDevice "VdpDevice".
  * \param[in] source_rect The sub-rectangle of the source
  *       surface to read from. If NULL, the entire
- *       source_surface will be read. Left/right ot top/bottom
+ *       source_surface will be read. Left/right and/or top/bottom
  *       co-ordinates may be swapped to flip the source. Any
  *       flip occurs prior to any requested rotation. Values
  *       from outside the source surface are valid and samples
@@ -2209,7 +2261,7 @@
  * -# Extract source_rect from source_surface.
  *
  * -# The extracted source is rotated 0, 90, 180 or 270 degrees
- *   according to the flags.
+ *    according to the flags.
  *
  * -# The rotated source is component-wise multiplied by a
  *    smooth-shaded quad with a (potentially) different color at
@@ -3129,13 +3181,61 @@
  * algorithms, the highest level enabled scaling algorithm will be used.
  */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1      (VdpVideoMixerFeature)11
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L2      (VdpVideoMixerFeature)12
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L3      (VdpVideoMixerFeature)13
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L4      (VdpVideoMixerFeature)14
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L5      (VdpVideoMixerFeature)15
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L6      (VdpVideoMixerFeature)16
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L7      (VdpVideoMixerFeature)17
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L8      (VdpVideoMixerFeature)18
+/**
+ * \hideinitializer
+ * \brief A VdpVideoMixerFeature.
+ *
+ * See \ref VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L1 for details.
+ */
 #define VDP_VIDEO_MIXER_FEATURE_HIGH_QUALITY_SCALING_L9      (VdpVideoMixerFeature)19
 
 /**
@@ -3675,7 +3775,10 @@
  *       VDP_INVALID_HANDLE.
  * \param[in] video_source_rect The sub-rectangle of the source
  *       video surface to extract and process. If NULL, the
- *       entire surface will be used.
+ *       entire surface will be used. Left/right and/or top/bottom
+ *       co-ordinates may be swapped to flip the source. Values
+ *       from outside the video surface are valid and samples
+ *       at those locations will be taken from the nearest edge.
  * \param[in] destination_surface
  * \param[in] destination_rect The sub-rectangle of the
  *       destination surface to modify. Note that rectangle clips

Modified: packages/libvdpau/trunk/include/vdpau/vdpau_x11.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/include/vdpau/vdpau_x11.h?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/include/vdpau/vdpau_x11.h (original)
+++ packages/libvdpau/trunk/include/vdpau/vdpau_x11.h Fri Nov 20 21:07:03 2009
@@ -6,7 +6,7 @@
 /*
  * This copyright notice applies to this header file:
  *
- * Copyright (c) 2008 NVIDIA Corporation
+ * Copyright (c) 2008-2009 NVIDIA Corporation
  *
  * Permission is hereby granted, free of charge, to any person
  * obtaining a copy of this software and associated documentation
@@ -72,13 +72,15 @@
  *   standard system (possibly X11-specific) library path.
  *   - \c libvdpau.so.1 (runtime)
  *   - \c libvdpau.so (development)
- * - Back-end driver files. These files are located in the
- *   standard system (possibly X11-specific) library path.
- *   - \c libvdpau_\%s.so
+ * - Back-end driver files. These files are located in a
+ *   system-defined library path, which is configurable at compile
+ *   time but is typically /usr/lib/vdpau.  Use `pkg-config
+ *   --variable=moduledir vdpau` to locate the driver install path.
+ *   - \c $moduledir/libvdpau_\%s.so.1
  *   For example:
- *   - \c libvdpau_nvidia.so
- *   - \c libvdpau_intel.so
- *   - \c libvdpau_ati.so
+ *   - \c /usr/lib/vdpau/libvdpau_nvidia.so.1
+ *   - \c /usr/lib/vdpau/libvdpau_intel.so.1
+ *   - \c /usr/lib/vdpau/libvdpau_ati.so.1
  *
  * The VDPAU wrapper library implements just one function; \ref
  * vdp_device_create_x11. The wrapper will implement this function

Modified: packages/libvdpau/trunk/src/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/Makefile.am?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/src/Makefile.am (original)
+++ packages/libvdpau/trunk/src/Makefile.am Fri Nov 20 21:07:03 2009
@@ -1,5 +1,6 @@
 AM_CFLAGS = \
     -I$(top_srcdir)/include \
+    -DVDPAU_MODULEDIR="\"$(moduledir)\"" \
     $(X11_CFLAGS)
 
 lib_LTLIBRARIES = libvdpau.la

Modified: packages/libvdpau/trunk/src/vdpau_wrapper.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/vdpau_wrapper.c?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/src/vdpau_wrapper.c (original)
+++ packages/libvdpau/trunk/src/vdpau_wrapper.c Fri Nov 20 21:07:03 2009
@@ -22,6 +22,7 @@
  */
 
 #include <dlfcn.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -46,7 +47,7 @@
 
 #endif
 
-#define DRIVER_LIB_FORMAT "libvdpau_%s.so"
+#define DRIVER_LIB_FORMAT "%slibvdpau_%s.so%s"
 
 VdpStatus vdp_device_create_x11(
     Display *             display,
@@ -57,7 +58,7 @@
 )
 {
     char const * vdpau_driver;
-    char *       vdpau_driver_lib;
+    char         vdpau_driver_lib[PATH_MAX];
     void *       backend_dll;
     char const * vdpau_trace;
     char const * func_name;
@@ -70,15 +71,23 @@
         vdpau_driver = "nvidia";
     }
 
-    vdpau_driver_lib = malloc(strlen(DRIVER_LIB_FORMAT) + strlen(vdpau_driver) + 1);
-    if (!vdpau_driver_lib) {
+    if (snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
+                 VDPAU_MODULEDIR "/", vdpau_driver, ".1") >=
+            sizeof(vdpau_driver_lib)) {
+        fprintf(stderr, "Failed to construct driver path: path too long\n");
         _VDP_ERROR_BREAKPOINT();
-        return VDP_STATUS_RESOURCES;
+        return VDP_STATUS_NO_IMPLEMENTATION;
     }
-    sprintf(vdpau_driver_lib, DRIVER_LIB_FORMAT, vdpau_driver);
 
     backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
-    free(vdpau_driver_lib);
+    if (!backend_dll) {
+        /* Try again using the old path, which is guaranteed to fit in PATH_MAX
+         * if the complete path fit above. */
+        snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
+                 "", vdpau_driver, "");
+        backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+    }
+
     if (!backend_dll) {
         fprintf(stderr, "Failed to open VDPAU backend %s\n", dlerror());
         _VDP_ERROR_BREAKPOINT();
@@ -90,7 +99,7 @@
         void *         trace_dll;
         SetDllHandle * set_dll_handle;
 
-        trace_dll = dlopen("libvdpau_trace.so", RTLD_NOW | RTLD_GLOBAL);
+        trace_dll = dlopen(VDPAU_MODULEDIR "/libvdpau_trace.so.1", RTLD_NOW | RTLD_GLOBAL);
         if (!trace_dll) {
             fprintf(stderr, "Failed to open VDPAU trace library %s\n", dlerror());
             _VDP_ERROR_BREAKPOINT();
@@ -134,4 +143,3 @@
         get_proc_address
     );
 }
-

Modified: packages/libvdpau/trunk/trace/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/trace/Makefile.am?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/trace/Makefile.am (original)
+++ packages/libvdpau/trunk/trace/Makefile.am Fri Nov 20 21:07:03 2009
@@ -2,7 +2,7 @@
     -I$(top_srcdir)/include \
     $(X11_CFLAGS)
 
-lib_LTLIBRARIES = libvdpau_trace.la
+module_LTLIBRARIES = libvdpau_trace.la
 
 libvdpau_trace_la_SOURCES = \
     vdpau_trace.cpp
@@ -10,7 +10,7 @@
 libvdpau_trace_la_LIBADD = \
     $(DLOPEN_LIBS)
 
-libvdpau_trace_la_LDFLAGS = -avoid-version -module -no-undefined
+libvdpau_trace_la_LDFLAGS = -version-info 1:0:0 -module -no-undefined
 
 libvdpau_traceincludedir = $(includedir)/vdpau
 libvdpau_traceinclude_HEADERS = \

Modified: packages/libvdpau/trunk/vdpau.pc.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/vdpau.pc.in?rev=637&op=diff
==============================================================================
--- packages/libvdpau/trunk/vdpau.pc.in (original)
+++ packages/libvdpau/trunk/vdpau.pc.in Fri Nov 20 21:07:03 2009
@@ -2,6 +2,7 @@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+moduledir=@moduledir@
 
 Name: VDPAU
 Description: The Video Decode and Presentation API for UNIX




More information about the Pkg-nvidia-devel mailing list