[packages/xine-lib] - updated to 1.2.3 (note: new plugins ABI) - added vdpau-hooks patch from DirectFB - added missing p

qboosh qboosh at pld-linux.org
Sat Jul 20 20:54:52 CEST 2013


commit 2ff197262cfcd31fd40e368be9681cc61030f6f3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Jul 20 20:54:59 2013 +0200

    - updated to 1.2.3 (note: new plugins ABI)
    - added vdpau-hooks patch from DirectFB
    - added missing patch (missing file from xine-lib git; needed to build vaapi vo plugin)

 xine-lib-missing.patch     | 138 +++++++++++++++++++++++++++++++++++++++++
 xine-lib-vdpau-hooks.patch | 150 +++++++++++++++++++++++++++++++++++++++++++++
 xine-lib.spec              |  61 +++++++++++++++---
 3 files changed, 340 insertions(+), 9 deletions(-)
---
diff --git a/xine-lib.spec b/xine-lib.spec
index 1ec522f..c255826 100644
--- a/xine-lib.spec
+++ b/xine-lib.spec
@@ -39,23 +39,26 @@ Summary(ko.UTF-8):	공개 동영상 플레이어
 Summary(pl.UTF-8):	Odtwarzacz filmów
 Summary(pt_BR.UTF-8):	Xine, um player de video
 Name:		xine-lib
-Version:	1.2.2
-Release:	5
+Version:	1.2.3
+Release:	1
 Epoch:		2
 License:	GPL v2+
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/xine/%{name}-%{version}.tar.xz
-# Source0-md5:	6fa70fa336f708452ce9bf311b401de2
+# Source0-md5:	011def012e9db3dee06808b4580ccede
 Patch0:		%{name}-nolibs.patch
 Patch1:		%{name}-win32-path.patch
 Patch2:		%{name}-sh.patch
 Patch3:		%{name}-ac.patch
+# from DirectFB 1.7.0
+Patch4:		%{name}-vdpau-hooks.patch
+Patch5:		%{name}-missing.patch
 URL:		http://xine.sourceforge.net/
 %{?with_directfb:BuildRequires:	DirectFB-devel >= 0.9.22}
 %{?with_fusionsound:BuildRequires:	FusionSound-devel >= 0.9.23}
 BuildRequires:	ImageMagick-devel >= 1:6.0.0
+%{?with_opengl:BuildRequires:	OpenGL-devel >= 2.0}
 %{?with_opengl:BuildRequires:	OpenGL-GLU-devel}
-%{?with_opengl:BuildRequires:	OpenGL-glut-devel}
 %{?with_sdl:BuildRequires:	SDL-devel >= 1.2.11}
 BuildRequires:	a52dec-libs-devel
 %{?with_aalib:BuildRequires:	aalib-devel >= 1.4}
@@ -75,8 +78,10 @@ BuildRequires:	libbluray-devel >= 0.2.1
 %{?with_caca:BuildRequires:	libcaca-devel >= 0.99-0.beta14}
 BuildRequires:	libcdio-devel >= 0.72
 %{?with_dvd:BuildRequires:	libdvdnav-devel >= 0.1.9}
+%{?with_dvd:BuildRequires:	libdvdread-devel}
 BuildRequires:	libdts-devel >= 0.0.5
 %{?with_dxr3:BuildRequires:	libfame-devel >= 0.8.10}
+BuildRequires:	libjpeg-devel
 BuildRequires:	libmad-devel
 BuildRequires:	libmng-devel
 BuildRequires:	libmodplug-devel >= 0.7
@@ -88,6 +93,7 @@ BuildRequires:	librsvg
 %{?with_stk:BuildRequires:	libstk-devel >= 0.2.0}
 BuildRequires:	libtheora-devel
 BuildRequires:	libtool >= 0:1.4.2-9
+BuildRequires:	libva-devel
 BuildRequires:	libvdpau-devel
 BuildRequires:	libv4l-devel
 BuildRequires:	libvorbis-devel
@@ -95,7 +101,7 @@ BuildRequires:	libxcb-devel >= 1.0
 BuildRequires:	libxdg-basedir-devel >= 1
 BuildRequires:	optipng
 BuildRequires:	pkgconfig
-%{?with_pulseaudio:BuildRequires:	pulseaudio-devel >= 0.9}
+%{?with_pulseaudio:BuildRequires:	pulseaudio-devel >= 0.9.7}
 #%{?with_dxr3:BuildRequires:	rte-devel} # only 0.4 supported
 BuildRequires:	speex-devel >= 1:1.1.6
 BuildRequires:	vcdimager-devel >= 0.7.23
@@ -120,7 +126,7 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		_noautoreqdep	libGL.so.1 libGLU.so.1
 
 # based on libtool numbers
-%define		xine_pluginsdir	%{_libdir}/xine/plugins/2.2
+%define		xine_pluginsdir	%{_libdir}/xine/plugins/2.3
 
 %define		specflags	-fomit-frame-pointer
 
@@ -274,6 +280,18 @@ XINE - ImageMagick based image decoder plugin.
 %description -n xine-decode-image -l pl.UTF-8
 XINE - wtyczka dekodera obrazów opartego na ImageMagick.
 
+%package -n xine-decode-libjpeg
+Summary:	XINE - libjpeg based JPEG image decoder plugin
+Summary(pl.UTF-8):	XINE - wtyczka dekodera obrazów JPEG opartego na libjpeg
+Group:		Libraries
+Requires:	%{name} = %{epoch}:%{version}-%{release}
+
+%description -n xine-decode-libjpeg
+XINE - libjpeg based JPEG image decoder plugin.
+
+%description -n xine-decode-libjpeg -l pl.UTF-8
+XINE - wtyczka dekodera obrazów JPEG opartego na libjpeg.
+
 %package -n xine-decode-mad
 Summary:	XINE - MAD-based MP3 audio decoder plugin
 Summary(pl.UTF-8):	XINE - wtyczka dekodera dźwięku MP3 oparta na bibliotece MAD
@@ -537,7 +555,7 @@ Summary(pl.UTF-8):	XINE - obsługa pulseaudio
 Summary(pt_BR.UTF-8):	XINE - suporte a pulseaudio
 Group:		Libraries
 Requires:	%{name} = %{epoch}:%{version}-%{release}
-Requires:	pulseaudio >= 0.9
+Requires:	pulseaudio >= 0.9.7
 Provides:	xine-plugin-audio = %{epoch}:%{version}-%{release}
 Obsoletes:	xine-output-audio-polypaudio
 
@@ -675,6 +693,19 @@ XINE video output plugin using libstk library.
 Wtyczka wyjścia obrazu do XINE wyświetlająca poprzez bibliotekę
 libstk.
 
+%package -n xine-output-video-vaapi
+Summary:	XINE - VAAPI video output support
+Summary(pl.UTF-8):	XINE - obsługa wyjścia obrazu VAAPI
+Group:		Libraries
+Requires:	%{name} = %{epoch}:%{version}-%{release}
+Provides:	xine-plugin-video = %{epoch}:%{version}-%{release}
+
+%description -n xine-output-video-vaapi
+XINE video output plugin using VAAPI.
+
+%description -n xine-output-video-vaapi -l pl.UTF-8
+Wtyczka wyjścia obrazu do XINE wykorzystująca VAAPI.
+
 %package -n xine-output-video-vdpau
 Summary:	XINE - VDPAU video output and acceleration support
 Summary(pl.UTF-8):	XINE - obsługa wyjścia obrazu oraz akceleracji VDPAU
@@ -686,8 +717,8 @@ Provides:	xine-plugin-video = %{epoch}:%{version}-%{release}
 XINE video output plugin and accelerated decoders using VDPAU.
 
 %description -n xine-output-video-vdpau -l pl.UTF-8
-Wtyczka wyjścia oraz akcelerowanych dekoderów obrazu do XINE wykorzystujących
-VDPAU.
+Wtyczka wyjścia oraz akcelerowanych dekoderów obrazu do XINE
+wykorzystujących VDPAU.
 
 %package -n xine-output-video-vidix
 Summary:	XINE - VIDIX video output plugin
@@ -919,6 +950,8 @@ XINE - wtyczka postprocessingu oparta na libpostproc z pakietu FFmpeg.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %{__gettextize}
@@ -1011,6 +1044,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_inp_rtp.so
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_inp_rtsp.so
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_inp_stdin_fifo.so
+%attr(755,root,root) %{xine_pluginsdir}/xineplug_inp_test.so
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_inp_vcdo.so
 
 # demuxer plugins
@@ -1103,6 +1137,10 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_decode_image.so
 
+%files -n xine-decode-libjpeg
+%defattr(644,root,root,755)
+%attr(755,root,root) %{xine_pluginsdir}/xineplug_decode_libjpeg.so
+
 %files -n xine-decode-mad
 %defattr(644,root,root,755)
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_decode_mad.so
@@ -1237,6 +1275,7 @@ rm -rf $RPM_BUILD_ROOT
 %files -n xine-output-video-opengl
 %defattr(644,root,root,755)
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_vo_out_opengl.so
+%attr(755,root,root) %{xine_pluginsdir}/xineplug_vo_out_opengl2.so
 %endif
 
 %if %{with sdl}
@@ -1251,6 +1290,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_vo_out_stk.so
 %endif
 
+%files -n xine-output-video-vaapi
+%defattr(644,root,root,755)
+%attr(755,root,root) %{xine_pluginsdir}/xineplug_vo_out_vaapi.so
+
 %files -n xine-output-video-vdpau
 %defattr(644,root,root,755)
 %attr(755,root,root) %{xine_pluginsdir}/xineplug_decode_vdpau_h264.so
diff --git a/xine-lib-missing.patch b/xine-lib-missing.patch
new file mode 100644
index 0000000..83a15ab
--- /dev/null
+++ b/xine-lib-missing.patch
@@ -0,0 +1,138 @@
+--- xine-lib-1.2.3/src/xine-engine/accel_vaapi.h.orig	1970-01-01 01:00:00.000000000 +0100
++++ xine-lib-1.2.3/src/xine-engine/accel_vaapi.h	2013-07-20 18:26:54.064253047 +0200
+@@ -0,0 +1,135 @@
++/*
++ * Copyright (C) 2008 the xine project
++ *
++ * This file is part of xine, a free video player.
++ *
++ * xine is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * xine is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
++ *
++ *
++ * Common acceleration definitions for vaapi
++ *
++ *
++ */
++
++#ifndef HAVE_XINE_ACCEL_VAAPI_H
++#define HAVE_XINE_ACCEL_VAAPI_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#include <va/va_x11.h>
++#include <pthread.h>
++#ifdef HAVE_FFMPEG_AVUTIL_H
++#  include <avcodec.h>
++#else
++#  include <libavcodec/avcodec.h>
++#endif
++
++#if LIBAVCODEC_VERSION_MAJOR >= 53 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 32)
++#  define AVVIDEO 2
++#else
++#  define AVVIDEO 1
++#  define pp_context	pp_context_t
++#  define pp_mode	pp_mode_t
++#endif
++
++#define NUM_OUTPUT_SURFACES 22
++
++#define SURFACE_FREE            0
++#define SURFACE_ALOC            1
++#define SURFACE_RELEASE         2
++#define SURFACE_RENDER          3
++#define SURFACE_RENDER_RELEASE  5
++
++struct vaapi_equalizer {
++  VADisplayAttribute brightness;
++  VADisplayAttribute contrast;
++  VADisplayAttribute hue;
++  VADisplayAttribute saturation;
++};
++
++typedef struct ff_vaapi_context_s ff_vaapi_context_t;
++
++struct ff_vaapi_context_s {
++  VADisplay         va_display;
++  VAContextID       va_context_id;
++  VAConfigID        va_config_id;
++  int               width;
++  int               height;
++  int               sw_width;
++  int               sw_height;
++  int               va_profile;
++  unsigned int      va_colorspace;
++  VAImage           va_subpic_image;
++  VASubpictureID    va_subpic_id;
++  int               va_subpic_width;
++  int               va_subpic_height;
++  int               is_bound;
++  void              *gl_surface;
++  unsigned int      soft_head;
++  unsigned int      valid_context;
++  unsigned int      va_head;
++  unsigned int      va_soft_head;
++  vo_driver_t       *driver;
++  unsigned int      last_sub_image_fmt;
++  VASurfaceID       last_sub_surface_id;
++  struct vaapi_equalizer va_equalizer;
++  VAImageFormat     *va_image_formats;
++  int               va_num_image_formats;
++  VAImageFormat     *va_subpic_formats;
++  int               va_num_subpic_formats;
++};
++
++typedef struct ff_vaapi_surface_s ff_vaapi_surface_t;
++typedef struct vaapi_accel_s vaapi_accel_t;
++
++struct ff_vaapi_surface_s {
++  unsigned int        index;
++  vaapi_accel_t       *accel;
++  VASurfaceID         va_surface_id;
++  unsigned int        status;
++};
++
++struct vaapi_accel_s {
++  unsigned int        index;
++  vo_frame_t          *vo_frame;
++
++#if AVVIDEO > 1
++  int (*avcodec_decode_video2)(vo_frame_t *frame_gen, AVCodecContext *avctx, AVFrame *picture,
++                               int *got_picture_ptr, AVPacket *avpkt);
++#else
++  int (*avcodec_decode_video)(vo_frame_t *frame_gen, AVCodecContext *avctx, AVFrame *picture,
++                              int *got_picture_ptr, uint8_t *buf, int buf_size);
++#endif
++  VAStatus (*vaapi_init)(vo_frame_t *frame_gen, int va_profile, int width, int height, int softrender);
++  int (*profile_from_imgfmt)(vo_frame_t *frame_gen, enum PixelFormat pix_fmt, int codec_id, int vaapi_mpeg_sofdec);
++  ff_vaapi_context_t *(*get_context)(vo_frame_t *frame_gen);
++  int (*guarded_render)(vo_frame_t *frame_gen);
++  ff_vaapi_surface_t *(*get_vaapi_surface)(vo_frame_t *frame_gen);
++  void (*render_vaapi_surface)(vo_frame_t *frame_gen, ff_vaapi_surface_t *va_surface);
++  void (*release_vaapi_surface)(vo_frame_t *frame_gen, ff_vaapi_surface_t *va_surface);
++};
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif
++
diff --git a/xine-lib-vdpau-hooks.patch b/xine-lib-vdpau-hooks.patch
new file mode 100644
index 0000000..b45d684
--- /dev/null
+++ b/xine-lib-vdpau-hooks.patch
@@ -0,0 +1,150 @@
+diff -r 23f700befc6c src/video_out/Makefile.am
+--- a/src/video_out/Makefile.am	Sun Feb 20 23:38:32 2011 +0100
++++ b/src/video_out/Makefile.am	Wed Mar 16 14:17:05 2011 +0100
+@@ -40,6 +40,9 @@
+ 
+ if ENABLE_VDPAU
+ vdpau_module = xineplug_vo_out_vdpau.la
++
++xine_includedir = $(includedir)/xine
++xine_include_HEADERS = video_out_vdpau.h
+ endif
+ 
+ if ENABLE_XCB
+diff -r 23f700befc6c src/video_out/video_out_vdpau.c
+--- a/src/video_out/video_out_vdpau.c	Sun Feb 20 23:38:32 2011 +0100
++++ b/src/video_out/video_out_vdpau.c	Wed Mar 16 14:17:05 2011 +0100
+@@ -52,6 +52,8 @@
+ #include <vdpau/vdpau_x11.h>
+ #include "accel_vdpau.h"
+ 
++#include "video_out_vdpau.h"
++
+ #ifdef HAVE_FFMPEG_AVUTIL_H
+ #  include <mem.h>
+ #else
+@@ -2353,6 +2355,7 @@
+ {
+   vdpau_class_t       *class   = (vdpau_class_t *) class_gen;
+   x11_visual_t        *visual  = (x11_visual_t *) visual_gen;
++  x11_visual_vdpau_t  *vdpau   = visual->d ? NULL : (x11_visual_vdpau_t *) visual_gen;
+   vdpau_driver_t      *this;
+   config_values_t      *config  = class->xine->config;
+   int i;
+@@ -2437,15 +2440,22 @@
+   this->yuv2rgb_factory = yuv2rgb_factory_init (MODE_24_BGR, 0, NULL);
+   this->ovl_yuv2rgb = this->yuv2rgb_factory->create_converter( this->yuv2rgb_factory );
+ 
+-  VdpStatus st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
+-  if ( st != VDP_STATUS_OK ) {
+-    fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
+-    if ( st == VDP_STATUS_NO_IMPLEMENTATION )
+-      fprintf(stderr, "No vdpau implementation.\n" );
+-    else
+-      fprintf(stderr, "unsupported GPU?\n" );
+-    vdpau_dispose( &this->vo_driver );
+-    return NULL;
++  VdpStatus st;
++  if (vdpau) {
++    vdp_device           = vdpau->device;
++    vdp_get_proc_address = vdpau->vdp_get_proc_address;
++  }
++  else {
++    st = vdp_device_create_x11( visual->display, visual->screen, &vdp_device, &vdp_get_proc_address );
++    if ( st != VDP_STATUS_OK ) {
++      fprintf(stderr, "vo_vdpau: Can't create vdp device : " );
++      if ( st == VDP_STATUS_NO_IMPLEMENTATION )
++        fprintf(stderr, "No vdpau implementation.\n" );
++      else
++        fprintf(stderr, "unsupported GPU?\n" );
++      vdpau_dispose( &this->vo_driver );
++      return NULL;
++    }
+   }
+   st = vdp_get_proc_address( vdp_device, VDP_FUNC_ID_GET_ERROR_STRING , (void*)&vdp_get_error_string );
+   if ( vdpau_init_error( st, "Can't get GET_ERROR_STRING proc address !!", &this->vo_driver, 0 ) )
+@@ -2600,6 +2610,22 @@
+   if ( vdpau_init_error( st, "Can't get PREEMPTION_CALLBACK_REGISTER proc address !!", &this->vo_driver, 1 ) )
+     return NULL;
+ 
++  /* Check for extended initialization */
++  if (vdpau) {
++    vdp_queue_target_create_x11       = vdpau->vdp_queue_target_create_x11;
++    vdp_queue_target_destroy          = vdpau->vdp_queue_target_destroy;
++    vdp_queue_create                  = vdpau->vdp_queue_create;
++    vdp_queue_destroy                 = vdpau->vdp_queue_destroy;
++    vdp_queue_display                 = vdpau->vdp_queue_display;
++    vdp_queue_block                   = vdpau->vdp_queue_block;
++    vdp_queue_set_background_color    = vdpau->vdp_queue_set_background_color;
++    vdp_queue_get_time                = vdpau->vdp_queue_get_time;
++    vdp_queue_query_surface_status    = vdpau->vdp_queue_query_surface_status;
++
++    vdp_preemption_callback_register  = vdpau->vdp_preemption_callback_register;
++  }
++
++
+   st = vdp_preemption_callback_register(vdp_device, &vdp_preemption_callback, (void*)this);
+   if ( vdpau_init_error( st, "Can't register preemption callback !!", &this->vo_driver, 1 ) )
+     return NULL;
+diff -r 23f700befc6c src/video_out/video_out_vdpau.h
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
++++ b/src/video_out/video_out_vdpau.h	Wed Mar 16 14:17:05 2011 +0100
+@@ -0,0 +1,58 @@
++/*
++ * kate: space-indent on; indent-width 2; mixedindent off; indent-mode cstyle; remove-trailing-space on;
++ * Copyright (C) 2008 the xine project
++ * Copyright (C) 2008 Christophe Thommeret <hftom at free.fr>
++ *
++ * This file is part of xine, a free video player.
++ *
++ * xine is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * xine is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
++ *
++ *
++ * video_out_vdpau.c, a video output plugin
++ * using VDPAU (Video Decode and Presentation Api for Unix)
++ *
++ *
++ */
++
++#ifndef __VIDEO_OUT__VDPAU_H__
++#define __VIDEO_OUT__VDPAU_H__
++
++#include <xine.h>
++
++#include <vdpau/vdpau_x11.h>
++
++
++typedef struct {
++  x11_visual_t  x11;  // if x11.d (drawable) is zero, it will use this extended struct
++
++  VdpDevice device;
++
++  VdpGetProcAddress *vdp_get_proc_address;
++
++  VdpPresentationQueueTargetCreateX11 *vdp_queue_target_create_x11;
++  VdpPresentationQueueTargetDestroy *vdp_queue_target_destroy;
++  VdpPresentationQueueCreate *vdp_queue_create;
++  VdpPresentationQueueDestroy *vdp_queue_destroy;
++  VdpPresentationQueueDisplay *vdp_queue_display;
++  VdpPresentationQueueBlockUntilSurfaceIdle *vdp_queue_block;
++  VdpPresentationQueueSetBackgroundColor *vdp_queue_set_background_color;
++  VdpPresentationQueueGetTime *vdp_queue_get_time;
++  VdpPresentationQueueQuerySurfaceStatus *vdp_queue_query_surface_status;
++
++  VdpPreemptionCallbackRegister *vdp_preemption_callback_register;
++} x11_visual_vdpau_t;
++
++#endif
++
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xine-lib.git/commitdiff/2ff197262cfcd31fd40e368be9681cc61030f6f3



More information about the pld-cvs-commit mailing list