- Update libva to 2.0.0

- Update libva-intel-driver to 2.0.0
- Update libva-utils to 2.0.0
- Bump dependent ports due to shlib bump
- Import upstream patch to fix multimedia/mpv [1]
- Import upstream patch to fix multimedia/gstreamer1-vaapi [2]

Approved by:	cpm [1], multimedia (timeout) [2]
Obtained from:	2ecf240b1c [1]
		https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/commit/gst-libs/gst/vaapi/gstvaapiutils.c?id=777bba473e3ed1c7b8b7f7f0322892851c70dfd9 [2]
Differential Revision:	https://reviews.freebsd.org/D12761
This commit is contained in:
Guido Falsi 2017-12-12 21:29:57 +00:00
parent 66f1e80dee
commit c26152ae1a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=456184
34 changed files with 286 additions and 95 deletions

View File

@ -4,7 +4,7 @@
PORTNAME= stepmania
PORTVERSION= 5.0.11
DISTVERSIONPREFIX= v
PORTREVISION= 4
PORTREVISION= 5
PORTEPOCH= 1
CATEGORIES= games
PKGNAMESUFFIX= -devel

View File

@ -3,7 +3,7 @@
PORTNAME= gnash
PORTVERSION= 0.8.10
PORTREVISION= 31
PORTREVISION= 32
CATEGORIES= graphics
MASTER_SITES= http://git.savannah.gnu.org/cgit/gnash.git/snapshot/
DISTNAME= gnash-2b3bdede0305c4fc3ad21a0a4197330606c9b880

View File

@ -3,6 +3,7 @@
PORTNAME= mesa-dri
PORTVERSION= ${MESAVERSION}
PORTREVISION= 1
CATEGORIES= graphics
COMMENT= OpenGL hardware acceleration drivers for DRI2+

View File

@ -3,7 +3,7 @@
PORTNAME= QtAV
PORTVERSION= 1.12.0
DISTVERSIONPREFIX= v
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia
DIST_SUBDIR= KDE

View File

@ -6,7 +6,7 @@
PORTNAME= avidemux
PORTVERSION= ${AVIDEMUX_VERSION}
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= multimedia
MAINTAINER= multimedia@FreeBSD.org

View File

@ -1,6 +1,6 @@
# $FreeBSD$
PORTREVISION?= 2
PORTREVISION?= 3
AVIDEMUX_VERSION= 2.6.11
MASTER_SITES= \
SF/avidemux/avidemux/${PORTVERSION}

View File

@ -3,6 +3,7 @@
PORTNAME= ccextractor
DISTVERSIONPREFIX= v
DISTVERSION= 0.85
PORTREVISION= 1
CATEGORIES= multimedia
MAINTAINER= oz@nixil.net

View File

@ -3,6 +3,7 @@
PORTNAME= ffmpeg
PORTVERSION= 3.4.1
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= http://ffmpeg.org/releases/

View File

@ -3,7 +3,7 @@
PORTNAME= ffmpeg
PORTVERSION= 0.7.17
PORTREVISION= 10
PORTREVISION= 11
PORTEPOCH= 1
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= http://ffmpeg.org/releases/

View File

@ -3,6 +3,7 @@
PORTNAME= gstreamer1-vaapi
PORTVERSION= 1.12.3
PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= https://gstreamer.freedesktop.org/src/gstreamer-vaapi/
DISTNAME= gstreamer-vaapi-${PORTVERSION}

View File

@ -0,0 +1,52 @@
--- configure.orig 2017-09-18 12:23:59 UTC
+++ configure
@@ -18008,12 +18008,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_LIBVA_CFLAGS="$LIBVA_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libva >= \$VAAPI_REQ libva < 0.99.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libva >= $VAAPI_REQ libva < 0.99.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libva >= \$VAAPI_REQ libva <= 1.0.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libva >= $VAAPI_REQ libva <= 1.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBVA_CFLAGS=`$PKG_CONFIG --cflags "libva >= $VAAPI_REQ libva < 0.99.0" 2>/dev/null`
+ pkg_cv_LIBVA_CFLAGS=`$PKG_CONFIG --cflags "libva >= $VAAPI_REQ libva <= 1.0.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -18026,12 +18026,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_LIBVA_LIBS="$LIBVA_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libva >= \$VAAPI_REQ libva < 0.99.0\""; } >&5
- ($PKG_CONFIG --exists --print-errors "libva >= $VAAPI_REQ libva < 0.99.0") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libva >= \$VAAPI_REQ libva < 1.00.0\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "libva >= $VAAPI_REQ libva <= 1.0.0") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_LIBVA_LIBS=`$PKG_CONFIG --libs "libva >= $VAAPI_REQ libva < 0.99.0" 2>/dev/null`
+ pkg_cv_LIBVA_LIBS=`$PKG_CONFIG --libs "libva >= $VAAPI_REQ libva <= 1.0.0" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -18050,14 +18050,14 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- LIBVA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libva >= $VAAPI_REQ libva < 0.99.0"`
+ LIBVA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libva >= $VAAPI_REQ libva <= 1.0.0"`
else
- LIBVA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libva >= $VAAPI_REQ libva < 0.99.0"`
+ LIBVA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libva >= $VAAPI_REQ libva <= 1.0.0"`
fi
# Put the nasty error message in config.log where it belongs
echo "$LIBVA_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (libva >= $VAAPI_REQ libva < 0.99.0) were not met:
+ as_fn_error $? "Package requirements (libva >= $VAAPI_REQ libva <= 1.0.0) were not met:
$LIBVA_PKG_ERRORS

View File

@ -0,0 +1,77 @@
From 777bba473e3ed1c7b8b7f7f0322892851c70dfd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?=
<vjaquez@igalia.com>
Date: Tue, 11 Jul 2017 17:29:13 +0200
Subject: libs: utils: libva 1.0 changed the logging
The logging mechanism in libva has changed it's functions
signatures. This patch updates that for libva versions >= 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=784398
diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c b/gst-libs/gst/vaapi/gstvaapiutils.c
index 0ed1efe..c24bed7 100644
--- gst-libs/gst/vaapi/gstvaapiutils.c
+++ gst-libs/gst/vaapi/gstvaapiutils.c
@@ -46,15 +46,43 @@
#define STRCASE(x) case x: return STRINGIFY(x)
#if VA_CHECK_VERSION (0,40,0)
-static void
-gst_vaapi_log (const char *message)
+static gchar *
+strip_msg (const char *message)
{
gchar *msg;
msg = g_strdup (message);
if (!msg)
+ return NULL;
+ return g_strstrip (msg);
+}
+
+#if VA_CHECK_VERSION (1,0,0)
+static void
+gst_vaapi_err (void *data, const char *message)
+{
+ gchar *msg;
+
+ msg = strip_msg (message);
+ if (!msg)
+ return;
+ GST_ERROR ("%s", msg);
+ g_free (msg);
+}
+#endif
+
+static void
+gst_vaapi_log (
+#if VA_CHECK_VERSION (1,0,0)
+ void *data,
+#endif
+ const char *message)
+{
+ gchar *msg;
+
+ msg = strip_msg (message);
+ if (!msg)
return;
- g_strchomp (msg);
GST_INFO ("%s", msg);
g_free (msg);
}
@@ -66,7 +94,10 @@ vaapi_initialize (VADisplay dpy)
gint major_version, minor_version;
VAStatus status;
-#if VA_CHECK_VERSION (0,40,0)
+#if VA_CHECK_VERSION (1,0,0)
+ vaSetErrorCallback (dpy, gst_vaapi_err, NULL);
+ vaSetInfoCallback (dpy, gst_vaapi_log, NULL);
+#elif VA_CHECK_VERSION (0,40,0)
vaSetInfoCallback (gst_vaapi_log);
#endif
--
cgit v0.10.2

View File

@ -2,7 +2,7 @@
PORTNAME= kodi
DISTVERSION= 17.3
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= multimedia java
MAINTAINER= mickael.maillot@gmail.com

View File

@ -2,7 +2,7 @@
PORTNAME= libav
PORTVERSION= 12.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia audio ipv6 net
MASTER_SITES= http://libav.org/releases/

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= libva-intel-driver
PORTVERSION= 1.8.3
PORTREVISION= 1
PORTVERSION= 2.0.0
CATEGORIES= multimedia
MAINTAINER= madpilot@FreeBSD.org

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1498657772
SHA256 (01org-intel-vaapi-driver-1.8.3_GH0.tar.gz) = e837b6c704ce4bffa0e6d530431061d99e42d4e4df990092937af522ca04f000
SIZE (01org-intel-vaapi-driver-1.8.3_GH0.tar.gz) = 2591242
TIMESTAMP = 1508576498
SHA256 (01org-intel-vaapi-driver-2.0.0_GH0.tar.gz) = 19acdace87fb0e167202cecd593028ccf0b90900f48319c3241403abde9fda12
SIZE (01org-intel-vaapi-driver-2.0.0_GH0.tar.gz) = 2831508

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= libva-utils
PORTVERSION= 1.8.3
PORTVERSION= 2.0.0
CATEGORIES= multimedia
MAINTAINER= madpilot@FreeBSD.org
@ -16,6 +16,7 @@ USES= autoreconf gmake libtool pkgconfig tar:bzip2
#USE_XORG= glproto pciaccess xext xfixes
#USE_GL= gl
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
USE_GITHUB= yes
GH_ACCOUNT= 01org
@ -26,19 +27,8 @@ GH_ACCOUNT= 01org
OPTIONS_DEFINE= DEBUG
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -D_DEBUG
.else
CFLAGS+= -DNDEBUG
.endif
.include <bsd.port.pre.mk>
.if defined(STRIP) && ${STRIP} != ""
INSTALL_TARGET= install-strip
.endif
DEBUG_CFLAGS= -D_DEBUG
DEBUG_CFLAGS_OFF= -DNDEBUG
#post-patch: .SILENT
# ${REINPLACE_CMD} -e 's|\($$libdir\)/dri|\1/va|' \
@ -50,4 +40,4 @@ INSTALL_TARGET= install-strip
# ${WRKSRC}/doc/Makefile.am
# ${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1498657885
SHA256 (01org-libva-utils-1.8.3_GH0.tar.gz) = db5df4ae6f6cc572de9ebb2be995f1577226fdd182545793d8de98592c9f7a88
SIZE (01org-libva-utils-1.8.3_GH0.tar.gz) = 1012261
TIMESTAMP = 1508576446
SHA256 (01org-libva-utils-2.0.0_GH0.tar.gz) = 9488ebbcd44decace43696c5e00b37c858ca6376dcccbaf0f255e77d6fefd858
SIZE (01org-libva-utils-2.0.0_GH0.tar.gz) = 1033292

View File

@ -1,8 +1,10 @@
bin/avcenc
bin/h264encode
bin/vainfo
bin/jpegenc
bin/loadjpeg
bin/mpeg2vaenc
bin/mpeg2vldemo
bin/putsurface
bin/vainfo
bin/vavpp
bin/vp9enc

View File

@ -2,7 +2,7 @@
PORTNAME= libva-vdpau-driver
PORTVERSION= 0.7.4
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= multimedia
MASTER_SITES= http://www.freedesktop.org/software/vaapi/releases/${PORTNAME}/
@ -21,22 +21,18 @@ USES= libtool gmake localbase pkgconfig tar:bzip2
USE_GL= gl
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
PLIST_FILES= lib/va/nvidia_drv_video.so lib/va/s3g_drv_video.so lib/va/vdpau_drv_video.so
OPTIONS_DEFINE= DEBUG
DEBUG_CONFIGURE_ENABLE= debug
.include <bsd.port.pre.mk>
.if defined(STRIP) && ${STRIP} != ""
INSTALL_TARGET= install-strip
.endif
post-patch: .SILENT
${REINPLACE_CMD} -e '/LIBS/{ s/-ldl//; s/-lrt//; }' \
-e 's|driverdir|& --define-variable prefix=${PREFIX}|' \
-e '/\^vdpau_version/s|$$CC -E|& ${CPPFLAGS}|' \
${WRKSRC}/configure
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= libva
PORTVERSION= 1.8.3
PORTVERSION= 2.0.0
CATEGORIES= multimedia
MAINTAINER= madpilot@FreeBSD.org
@ -20,6 +20,7 @@ USE_GL= gl
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-prefix=va
USE_LDCONFIG= yes
INSTALL_TARGET= install-strip
USE_GITHUB= yes
GH_ACCOUNT= 01org
@ -30,19 +31,8 @@ CFLAGS+= -DHAVE_LINUX_INTEGER_TYPES
OPTIONS_DEFINE= DEBUG
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEBUG}
CFLAGS+= -D_DEBUG
.else
CFLAGS+= -DNDEBUG
.endif
.include <bsd.port.pre.mk>
.if defined(STRIP) && ${STRIP} != ""
INSTALL_TARGET= install-strip
.endif
DEBUG_CFLAGS= -D_DEBUG
DEBUG_CFLAGS_OFF= -DNDEBUG
post-patch: .SILENT
${REINPLACE_CMD} -e 's|\($$libdir\)/dri|\1/va|' \
@ -52,4 +42,4 @@ post-patch: .SILENT
${WRKSRC}/doc/Makefile.am
${REINPLACE_CMD} 's/-ldl//' ${WRKSRC}/va/Makefile.am
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1498657745
SHA256 (01org-libva-1.8.3_GH0.tar.gz) = 5ac4b0156c39cbca78913ebc0ff823b1abd5faa41121204c0707d62c27f07285
SIZE (01org-libva-1.8.3_GH0.tar.gz) = 186915
TIMESTAMP = 1508575075
SHA256 (01org-libva-2.0.0_GH0.tar.gz) = dce5e21ffe6083a230814493e806f9e622d11570d633d48ca2f6bd103f6afe3e
SIZE (01org-libva-2.0.0_GH0.tar.gz) = 191311

View File

@ -1,6 +1,6 @@
--- va/glx/va_glx_private.h.orig 2015-07-01 07:54:24 UTC
--- va/glx/va_glx_private.h.orig 2017-10-21 04:49:28 UTC
+++ va/glx/va_glx_private.h
@@ -38,7 +38,7 @@ typedef void (*PFNGLXBINDTEXIMAGEEXTPROC
@@ -38,7 +38,7 @@ typedef void (*PFNGLXBINDTEXIMAGEEXTPROC)(Display *, G
typedef void (*PFNGLXRELEASETEXIMAGEEXTPROC)(Display *, GLXDrawable, int);
#endif

View File

@ -1,9 +1,9 @@
--- va/va.c.orig 2014-09-30 01:48:34 UTC
--- va/va.c.orig 2017-10-21 04:49:28 UTC
+++ va/va.c
@@ -227,7 +227,7 @@
@@ -350,7 +350,7 @@ static VAStatus va_openDriver(VADisplay dpy, char *dri
strncat( driver_path, DRIVER_EXTENSION, strlen(DRIVER_EXTENSION) );
va_infoMessage("Trying to open %s\n", driver_path);
va_infoMessage(dpy, "Trying to open %s\n", driver_path);
-#ifndef ANDROID
+#if !defined(ANDROID) && defined(RTLD_NODELETE)
handle = dlopen( driver_path, RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE );

View File

@ -1,6 +1,6 @@
--- va/va_trace.c.orig 2016-06-21 01:29:25 UTC
--- va/va_trace.c.orig 2017-10-21 04:49:28 UTC
+++ va/va_trace.c
@@ -48,6 +48,9 @@
@@ -50,6 +50,9 @@
#include <sys/stat.h>
#include <sys/syscall.h>
#include <pthread.h>
@ -10,7 +10,7 @@
#include <unistd.h>
#include <time.h>
#include <errno.h>
@@ -294,7 +297,13 @@ static void add_trace_config_info(
@@ -291,7 +294,13 @@ static void add_trace_config_info(
{
struct trace_config_info *pconfig_info;
int idx = 0;
@ -24,7 +24,7 @@
LOCK_RESOURCE(pva_trace);
@@ -318,7 +327,13 @@ static void delete_trace_config_info(
@@ -315,7 +324,13 @@ static void delete_trace_config_info(
{
struct trace_config_info *pconfig_info;
int idx = 0;
@ -38,7 +38,7 @@
LOCK_RESOURCE(pva_trace);
@@ -663,7 +678,13 @@ static struct trace_log_file *start_trac
@@ -662,7 +677,13 @@ static struct trace_log_file *start_tracing2log_file(
{
struct trace_log_files_manager *plog_files_mgr = NULL;
struct trace_log_file *plog_file = NULL;
@ -52,7 +52,7 @@
int i = 0;
LOCK_RESOURCE(pva_trace);
@@ -702,7 +723,13 @@ static void refresh_log_file(
@@ -701,7 +722,13 @@ static void refresh_log_file(
struct trace_context *ptra_ctx)
{
struct trace_log_file *plog_file = NULL;
@ -66,7 +66,7 @@
int i = 0;
plog_file = ptra_ctx->plog_file;
@@ -1226,7 +1253,13 @@ static void internal_TraceUpdateContext
@@ -1224,7 +1251,13 @@ static void internal_TraceUpdateContext (
{
struct trace_context *trace_ctx = NULL;
int i = 0, delete = 1;

View File

@ -1,8 +1,6 @@
include/va/va.h
include/va/va_backend.h
include/va/va_backend_egl.h
include/va/va_backend_glx.h
include/va/va_backend_tpi.h
include/va/va_backend_vpp.h
include/va/va_compat.h
include/va/va_dec_hevc.h
@ -20,32 +18,27 @@ include/va/va_enc_jpeg.h
include/va/va_enc_mpeg2.h
include/va/va_enc_vp8.h
include/va/va_enc_vp9.h
include/va/va_fei_h264.h
include/va/va_fei.h
include/va/va_glx.h
include/va/va_str.h
include/va/va_tpi.h
include/va/va_version.h
include/va/va_vpp.h
include/va/va_x11.h
lib/libva-drm.so
lib/libva-drm.so.1
lib/libva-drm.so.1.4000.0
lib/libva-egl.so
lib/libva-egl.so.1
lib/libva-egl.so.1.4000.0
lib/libva-drm.so.2
lib/libva-drm.so.2.0.0
lib/libva-glx.so
lib/libva-glx.so.1
lib/libva-glx.so.1.4000.0
lib/libva-tpi.so
lib/libva-tpi.so.1
lib/libva-tpi.so.1.4000.0
lib/libva-glx.so.2
lib/libva-glx.so.2.0.0
lib/libva-x11.so
lib/libva-x11.so.1
lib/libva-x11.so.1.4000.0
lib/libva-x11.so.2
lib/libva-x11.so.2.0.0
lib/libva.so
lib/libva.so.1
lib/libva.so.1.4000.0
lib/libva.so.2
lib/libva.so.2.0.0
libdata/pkgconfig/libva-drm.pc
libdata/pkgconfig/libva-egl.pc
libdata/pkgconfig/libva-glx.pc
libdata/pkgconfig/libva-tpi.pc
libdata/pkgconfig/libva-x11.pc
libdata/pkgconfig/libva.pc

View File

@ -2,7 +2,7 @@
PORTNAME= libvdpau-va-gl
PORTVERSION= 0.4.2
PORTREVISION= 1
PORTREVISION= 2
DISTVERSIONPREFIX= v
CATEGORIES= multimedia

View File

@ -3,7 +3,7 @@
PORTNAME= xine
PORTVERSION= 1.2.6
PORTREVISION= 13
PORTREVISION= 14
CATEGORIES= multimedia ipv6
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION}
PKGNAMEPREFIX= lib

View File

@ -4,7 +4,7 @@
PORTNAME= mpv
PORTVERSION= 0.27.0
DISTVERSIONPREFIX= v
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= multimedia audio

View File

@ -0,0 +1,88 @@
From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
From: Mark Thompson <sw@jkqxz.net>
Date: Mon, 9 Oct 2017 20:10:26 +0100
Subject: [PATCH] vaapi: Use libva2 message callbacks
They are no longer global, so they work vaguely sensibly.
---
video/vaapi.c | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/video/vaapi.c b/video/vaapi.c
index 6bedbbaa18..3b1cb9cc41 100644
--- video/vaapi.c
+++ video/vaapi.c
@@ -40,9 +40,27 @@ int va_get_colorspace_flag(enum mp_csp csp)
return 0;
}
-// VA message callbacks are global and do not have a context parameter, so it's
-// impossible to know from which VADisplay they originate. Try to route them
-// to existing mpv/libmpv instances within this process.
+#if VA_CHECK_VERSION(1, 0, 0)
+static void va_message_callback(void *context, const char *msg, int mp_level)
+{
+ struct mp_vaapi_ctx *res = context;
+ mp_msg(res->log, mp_level, "libva: %s", msg);
+}
+
+static void va_error_callback(void *context, const char *msg)
+{
+ va_message_callback(context, msg, MSGL_ERR);
+}
+
+static void va_info_callback(void *context, const char *msg)
+{
+ va_message_callback(context, msg, MSGL_V);
+}
+#else
+// Pre-libva2 VA message callbacks are global and do not have a context
+// parameter, so it's impossible to know from which VADisplay they
+// originate. Try to route them to existing mpv/libmpv instances within
+// this process.
static pthread_mutex_t va_log_mutex = PTHREAD_MUTEX_INITIALIZER;
static struct mp_vaapi_ctx **va_mpv_clients;
static int num_va_mpv_clients;
@@ -77,6 +95,7 @@ static void va_info_callback(const char *msg)
{
va_message_callback(msg, MSGL_V);
}
+#endif
static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
{
@@ -108,6 +127,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
},
};
+#if VA_CHECK_VERSION(1, 0, 0)
+ vaSetErrorCallback(display, va_error_callback, res);
+ vaSetInfoCallback(display, va_info_callback, res);
+#else
pthread_mutex_lock(&va_log_mutex);
MP_TARRAY_APPEND(NULL, va_mpv_clients, num_va_mpv_clients, res);
pthread_mutex_unlock(&va_log_mutex);
@@ -118,6 +141,7 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
vaSetErrorCallback(va_error_callback);
vaSetInfoCallback(va_info_callback);
#endif
+#endif
int major, minor;
int status = vaInitialize(display, &major, &minor);
@@ -154,6 +178,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
if (ctx->destroy_native_ctx)
ctx->destroy_native_ctx(ctx->native_ctx);
+#if !VA_CHECK_VERSION(1, 0, 0)
pthread_mutex_lock(&va_log_mutex);
for (int n = 0; n < num_va_mpv_clients; n++) {
if (va_mpv_clients[n] == ctx) {
@@ -164,6 +189,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
if (num_va_mpv_clients == 0)
TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
pthread_mutex_unlock(&va_log_mutex);
+#endif
talloc_free(ctx);
}

View File

@ -3,7 +3,7 @@
PORTNAME= mythtv
PORTVERSION= 0.28.7
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= multimedia
MAINTAINER= ports@FreeBSD.org

View File

@ -3,7 +3,7 @@
PORTNAME= vdr-plugin-softhddevice
PORTVERSION= 0.5.1
PORTREVISION= 9
PORTREVISION= 10
CATEGORIES= multimedia
MASTER_SITES= http://projects.vdr-developer.org/attachments/download/1000/
DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}

View File

@ -3,7 +3,7 @@
PORTNAME= vlc
DISTVERSION= 2.2.6
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 4
CATEGORIES= multimedia audio ipv6 net www
MASTER_SITES= http://download.videolan.org/pub/videolan/${PORTNAME}/${DISTVERSION:S/a$//}/ \

View File

@ -3,7 +3,7 @@
PORTNAME= libvncserver
PORTVERSION= 0.9.11
PORTREVISION= 1
PORTREVISION= 2
DISTVERSIONPREFIX= LibVNCServer-
CATEGORIES= net devel