summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-video/hwdecode-demos
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-video/hwdecode-demos')
-rw-r--r--media-video/hwdecode-demos/Manifest1
-rw-r--r--media-video/hwdecode-demos/files/avutil.patch15
-rw-r--r--media-video/hwdecode-demos/files/dl.patch31
-rw-r--r--media-video/hwdecode-demos/files/ffmpeg-1.patch73
-rw-r--r--media-video/hwdecode-demos/files/ffmpeg.patch33
-rw-r--r--media-video/hwdecode-demos/files/libav9.patch42
-rw-r--r--media-video/hwdecode-demos/files/vaapi.patch38
-rw-r--r--media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild52
-rw-r--r--media-video/hwdecode-demos/metadata.xml8
9 files changed, 293 insertions, 0 deletions
diff --git a/media-video/hwdecode-demos/Manifest b/media-video/hwdecode-demos/Manifest
new file mode 100644
index 000000000000..f416605aa5ef
--- /dev/null
+++ b/media-video/hwdecode-demos/Manifest
@@ -0,0 +1 @@
+DIST hwdecode-demos-0.9.5.tar.gz 642660 SHA256 35ef7bac5b95c61920ab6bae825060755051659c610c095739d9ae33b3d39d07 SHA512 2596949a6027c7d9a4053911501febaca319a4593cad23fc854d5f366e8be914fdbb7ecd08aac784fc9798dcf46147de249bf848a5a3fa513d06585c1f9f6748 WHIRLPOOL d494537d25dc17d0d8c4c058625898ea5be28522d2b7b8a30eea01662a053795fe0065d75db12a6babdeb081642689300123196d8a27ba9bb38d970cfbde614c
diff --git a/media-video/hwdecode-demos/files/avutil.patch b/media-video/hwdecode-demos/files/avutil.patch
new file mode 100644
index 000000000000..6c518d9a2ef8
--- /dev/null
+++ b/media-video/hwdecode-demos/files/avutil.patch
@@ -0,0 +1,15 @@
+Index: hwdecode-demos-0.9.5/src/Makefile.am
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/Makefile.am
++++ hwdecode-demos-0.9.5/src/Makefile.am
+@@ -93,8 +93,8 @@ endif
+ if USE_FFMPEG
+ ffmpeg_PROGS = ffmpeg_h264 ffmpeg_vc1 ffmpeg_mpeg2 ffmpeg_mpeg4
+ ffmpeg_source_c = ffmpeg.c ffmpeg_video.c
+-ffmpeg_CFLAGS = -DUSE_FFMPEG $(LIBAVCODEC_CFLAGS) $(LIBAVFORMAT_CFLAGS) $(LIBSWSCALE_CFLAGS)
+-ffmpeg_LIBS = $(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS) $(LIBSWSCALE_LIBS)
++ffmpeg_CFLAGS = -DUSE_FFMPEG $(LIBAVCODEC_CFLAGS) $(LIBAVFORMAT_CFLAGS) $(LIBSWSCALE_CFLAGS) $(LIBAVUTIL_CFLAGS)
++ffmpeg_LIBS = $(LIBAVCODEC_LIBS) $(LIBAVFORMAT_LIBS) $(LIBSWSCALE_LIBS) $(LIBAVUTIL_LIBS)
+ if USE_VAAPI
+ ffmpeg_source_c += $(vaapi_source_c)
+ ffmpeg_CFLAGS += $(vaapi_CFLAGS)
diff --git a/media-video/hwdecode-demos/files/dl.patch b/media-video/hwdecode-demos/files/dl.patch
new file mode 100644
index 000000000000..d46789452ec7
--- /dev/null
+++ b/media-video/hwdecode-demos/files/dl.patch
@@ -0,0 +1,31 @@
+From c00dd0bd93d961bc2dfaea3406c59b672741fd26 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= <vjaquez@igalia.com>
+Date: Fri, 1 Feb 2013 15:14:57 +0100
+Subject: [PATCH] Fix missing linking depenendency on -ldl
+
+Recent versions of GCC ship with a linker that doesn't add the deps of the
+DSOs of the linking process. This behavior is also found in GNU gold. This
+change fixes building with those linkers.
+
+Some references
+
+http://wiki.debian.org/ToolChain/DSOLinking
+https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
+---
+ configure.ac | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+Index: hwdecode-demos-0.9.5/configure.ac
+===================================================================
+--- hwdecode-demos-0.9.5.orig/configure.ac
++++ hwdecode-demos-0.9.5/configure.ac
+@@ -69,6 +69,9 @@ fi
+ dnl Checks for libraries.
+ AC_CHECK_LIB(rt, timer_create)
+
++dnl Checks if dl() comes from the C library or -ldl
++AC_SEARCH_LIBS([dlopen], [dl])
++
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(clock_gettime)
+
diff --git a/media-video/hwdecode-demos/files/ffmpeg-1.patch b/media-video/hwdecode-demos/files/ffmpeg-1.patch
new file mode 100644
index 000000000000..f0b223e1401c
--- /dev/null
+++ b/media-video/hwdecode-demos/files/ffmpeg-1.patch
@@ -0,0 +1,73 @@
+Index: hwdecode-demos-0.9.5/src/ffmpeg.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c
++++ hwdecode-demos-0.9.5/src/ffmpeg.c
+@@ -53,7 +53,6 @@ static int ffmpeg_init(void)
+ return -1;
+ }
+
+- avcodec_init();
+ avcodec_register_all();
+
+ ffmpeg_context = ffmpeg;
+@@ -148,7 +147,6 @@ static int get_buffer(struct AVCodecCont
+ void *surface = (void *)(uintptr_t)vaapi->surface_id;
+
+ pic->type = FF_BUFFER_TYPE_USER;
+- pic->age = 1;
+ pic->data[0] = surface;
+ pic->data[1] = NULL;
+ pic->data[2] = NULL;
+Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c
++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c
+@@ -23,6 +23,7 @@
+
+ #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
+ # include <libavformat/avformat.h>
++# include <libavformat/avio.h>
+ #endif
+ #ifdef HAVE_FFMPEG_AVFORMAT_H
+ # include <ffmpeg/avformat.h>
+@@ -59,7 +60,7 @@
+ int decode(void)
+ {
+ AVProbeData pd;
+- ByteIOContext ioctx;
++ AVIOContext *ioctx;
+ AVInputFormat *format = NULL;
+ AVFormatContext *ic = NULL;
+ AVCodec *codec;
+@@ -84,15 +85,20 @@ int decode(void)
+ goto end;
+ format->flags |= AVFMT_NOFILE;
+
+- if (init_put_byte(&ioctx, (uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL) < 0)
++ ioctx = avio_alloc_context((uint8_t *)video_data, video_data_size, 0, NULL, NULL, NULL, NULL);
++ if (!ioctx)
+ goto end;
+
+- if (av_open_input_stream(&ic, &ioctx, "", format, NULL) < 0)
++ ic = avformat_alloc_context();
++ if(!ic)
++ goto end;
++ ic->pb = ioctx;
++ if (avformat_open_input(&ic, "", format, NULL) < 0)
+ goto end;
+
+ if (av_find_stream_info(ic) < 0)
+ goto end;
+- dump_format(ic, 0, "", 0);
++ av_dump_format(ic, 0, "", 0);
+
+ video_stream = NULL;
+ for (i = 0; i < ic->nb_streams; i++) {
+@@ -135,6 +141,6 @@ end:
+ if (avctx)
+ avcodec_close(avctx);
+ if (ic)
+- av_close_input_stream(ic);
++ avformat_close_input(&ic);
+ return error;
+ }
diff --git a/media-video/hwdecode-demos/files/ffmpeg.patch b/media-video/hwdecode-demos/files/ffmpeg.patch
new file mode 100644
index 000000000000..fa8bdaf2cd4d
--- /dev/null
+++ b/media-video/hwdecode-demos/files/ffmpeg.patch
@@ -0,0 +1,33 @@
+Index: hwdecode-demos-0.9.5/src/ffmpeg.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c
++++ hwdecode-demos-0.9.5/src/ffmpeg.c
+@@ -193,10 +193,14 @@ int ffmpeg_decode(AVCodecContext *avctx,
+ {
+ CommonContext * const common = common_get_context();
+ FFmpegContext * const ffmpeg = ffmpeg_get_context();
++ AVPacket pkt;
+ int got_picture;
+
+ got_picture = 0;
+- if (avcodec_decode_video(avctx, ffmpeg->frame, &got_picture, (uint8_t *)buf, buf_size) < 0)
++ av_init_packet( &pkt );
++ pkt.data = buf;
++ pkt.size = buf_size;
++ if (avcodec_decode_video2(avctx, ffmpeg->frame, &got_picture, &pkt) < 0)
+ return -1;
+
+ if (got_picture && hwaccel_type() == HWACCEL_NONE) {
+Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c
++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c
+@@ -96,7 +96,7 @@ int decode(void)
+
+ video_stream = NULL;
+ for (i = 0; i < ic->nb_streams; i++) {
+- if (ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO && !video_stream)
++ if (ic->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO && !video_stream)
+ video_stream = ic->streams[i];
+ else
+ ic->streams[i]->discard = AVDISCARD_ALL;
diff --git a/media-video/hwdecode-demos/files/libav9.patch b/media-video/hwdecode-demos/files/libav9.patch
new file mode 100644
index 000000000000..df5dbdf03be1
--- /dev/null
+++ b/media-video/hwdecode-demos/files/libav9.patch
@@ -0,0 +1,42 @@
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: config.h
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: .deps
+diff -ur /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/ffmpeg_video.c /tmp/hwdecode-demos-0.9.5/src/ffmpeg_video.c
+--- /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/ffmpeg_video.c 2013-06-22 19:45:54.776768969 +0200
++++ /tmp/hwdecode-demos-0.9.5/src/ffmpeg_video.c 2013-06-22 19:45:44.720769327 +0200
+@@ -96,7 +96,7 @@
+ if (avformat_open_input(&ic, "", format, NULL) < 0)
+ goto end;
+
+- if (av_find_stream_info(ic) < 0)
++ if (avformat_find_stream_info(ic, NULL) < 0)
+ goto end;
+ av_dump_format(ic, 0, "", 0);
+
+@@ -115,7 +115,7 @@
+
+ if ((codec = avcodec_find_decoder(avctx->codec_id)) == NULL)
+ goto end;
+- if (avcodec_open(avctx, codec) < 0)
++ if (avcodec_open2(avctx, codec, NULL) < 0)
+ goto end;
+
+ got_picture = 0;
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: Makefile
+Pouze v /tmp/hwdecode-demos-0.9.5/src/: stamp-h1
+diff -ur /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/utils_glx.h /tmp/hwdecode-demos-0.9.5/src/utils_glx.h
+--- /var/tmp/portage/media-video/hwdecode-demos-0.9.5/work/hwdecode-demos-0.9.5/src/utils_glx.h 2011-01-06 09:15:35.000000000 +0100
++++ /tmp/hwdecode-demos-0.9.5/src/utils_glx.h 2013-06-22 19:45:44.720769327 +0200
+@@ -28,6 +28,13 @@
+ #include <GL/glx.h>
+ #include <GL/glxext.h>
+
++#if GL_GLEXT_VERSION >= 85
++ /* XXX: PFNGLMULTITEXCOORD2FPROC got out of the GL_VERSION_1_3_DEPRECATED
++ block and is not defined if GL_VERSION_1_3 is defined in <GL/gl.h>
++ Redefine the type here as an interim solution */
++ typedef void (*PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
++#endif
++
+ const char *
+ gl_get_error_string(GLenum error);
+
diff --git a/media-video/hwdecode-demos/files/vaapi.patch b/media-video/hwdecode-demos/files/vaapi.patch
new file mode 100644
index 000000000000..a6d3e902a9a8
--- /dev/null
+++ b/media-video/hwdecode-demos/files/vaapi.patch
@@ -0,0 +1,38 @@
+From 5afe6345d8ca1c673cbddcf8c7bc3af7709d5454 Mon Sep 17 00:00:00 2001
+From: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+Date: Tue, 10 Jul 2012 14:43:37 +0200
+Subject: [PATCH] vaapi: fix build with recent VA-API versions.
+
+---
+ src/vaapi.c | 2 ++
+ src/vaapi_compat.h | 5 +++++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+Index: hwdecode-demos-0.9.5/src/vaapi.c
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/vaapi.c
++++ hwdecode-demos-0.9.5/src/vaapi.c
+@@ -92,7 +92,9 @@ static const char *string_of_VADisplayAt
+ TYPE(Hue);
+ TYPE(Saturation);
+ TYPE(BackgroundColor);
++#if !VA_CHECK_VERSION(0,34,0)
+ TYPE(DirectSurface);
++#endif
+ #undef TYPE
+ default: break;
+ }
+Index: hwdecode-demos-0.9.5/src/vaapi_compat.h
+===================================================================
+--- hwdecode-demos-0.9.5.orig/src/vaapi_compat.h
++++ hwdecode-demos-0.9.5/src/vaapi_compat.h
+@@ -91,4 +91,9 @@ typedef struct _VASliceParameterBufferBa
+ (VA_MINOR_VERSION == 31 && \
+ VA_MICRO_VERSION == 0 && VA_SDS_VERSION < 5)))
+
++#if VA_CHECK_VERSION(0,34,0)
++/* New vaCreateSurfaces() API with surface attributes */
++# include <va/va_compat.h>
++#endif
++
+ #endif /* VAAPI_COMPAT_H */
diff --git a/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild
new file mode 100644
index 000000000000..b824c55ce17b
--- /dev/null
+++ b/media-video/hwdecode-demos/hwdecode-demos-0.9.5.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit base autotools
+
+DESCRIPTION="Standalone programs showing off various HW acceleration APIs"
+HOMEPAGE="http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos/"
+SRC_URI="http://www.splitted-desktop.com/~gbeauchesne/hwdecode-demos/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="opengl vaapi vdpau"
+
+RDEPEND="virtual/ffmpeg
+ x11-libs/libX11
+ opengl? ( virtual/opengl virtual/glu )
+ vaapi? ( x11-libs/libva )
+ vdpau? ( x11-libs/libvdpau )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/ffmpeg.patch"
+ "${FILESDIR}/ffmpeg-1.patch"
+ "${FILESDIR}/libav9.patch"
+ "${FILESDIR}/vaapi.patch"
+ "${FILESDIR}/dl.patch"
+ "${FILESDIR}/avutil.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-crystalhd \
+ $(use_enable opengl glx) \
+ $(use_enable vaapi) \
+ $(use_enable vdpau) \
+ --disable-xvba
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc NEWS README
+}
diff --git a/media-video/hwdecode-demos/metadata.xml b/media-video/hwdecode-demos/metadata.xml
new file mode 100644
index 000000000000..c572c7d9b478
--- /dev/null
+++ b/media-video/hwdecode-demos/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>