xine-lib:moved into main repo for pisi 2.0

This commit is contained in:
2015-08-10 17:22:16 +03:00
parent 9d16e27572
commit 8e87b97590
11 changed files with 592 additions and 0 deletions
@@ -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 vdpau
*
*
*/
#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
@@ -0,0 +1,20 @@
--- xine-lib-1.1.1/src/xine-engine/load_plugins.c.~1~ 2005-09-19 09:14:02.000000000 -0700
+++ xine-lib-1.1.1/src/xine-engine/load_plugins.c 2006-04-22 23:07:33.000000000 -0700
@@ -591,7 +591,7 @@ static void collect_plugins(xine_t *this
printf("load_plugins: %s not cached\n", str);
#endif
- if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL)) == NULL) {
+ if(!info && (lib = dlopen (str, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)) == NULL) {
const char *error = dlerror();
/* too noisy -- but good to catch unresolved references */
xprintf(this, XINE_VERBOSITY_LOG,
@@ -649,7 +649,7 @@ static int _load_plugin_class(xine_t *th
/* load the dynamic library if needed */
if (!node->file->lib_handle) {
lprintf("dlopen %s\n", filename);
- if ((lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL)) == NULL) {
+ if ((lib = dlopen (filename, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND)) == NULL) {
const char *error = dlerror();
xine_log (this, XINE_LOG_PLUGIN,
+44
View File
@@ -0,0 +1,44 @@
diff -Nur xine-lib-1.1.15-old/src/libw32dll/dmo/DMO_VideoDecoder.c xine-lib-1.1.15/src/libw32dll/dmo/DMO_VideoDecoder.c
--- xine-lib-1.1.15-old/src/libw32dll/dmo/DMO_VideoDecoder.c 2008-09-27 20:55:34.000000000 +0300
+++ xine-lib-1.1.15/src/libw32dll/dmo/DMO_VideoDecoder.c 2008-09-27 21:33:01.000000000 +0300
@@ -87,7 +87,7 @@
{ 24, 24, &MEDIASUBTYPE_RGB24, CAP_NONE },
{ 32, 32, &MEDIASUBTYPE_RGB32, CAP_NONE },
- {0},
+ {0,0,NULL,0},
};
DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER * format, int flip, int maxauto)
@@ -288,8 +288,8 @@
props.cBuffers = 1;
props.cbBuffer = this->m_sDestType.lSampleSize;
- //don't know how to do this correctly
- props.cbAlign = props.cbPrefix = 0;
+ props.cbAlign = 1;
+ props.cbPrefix = 0;
this->m_pDMO_Filter->m_pAll->vt->SetProperties(this->m_pDMO_Filter->m_pAll, &props, &props1);
this->m_pDMO_Filter->m_pAll->vt->Commit(this->m_pDMO_Filter->m_pAll);
#endif
@@ -327,7 +327,7 @@
bufferin = CMediaBufferCreate(size, (void*)src, size, 0);
result = this->m_pDMO_Filter->m_pMedia->vt->ProcessInput(this->m_pDMO_Filter->m_pMedia, 0,
(IMediaBuffer*)bufferin,
- (is_keyframe) ? DMO_INPUT_DATA_BUFFERF_SYNCPOINT : 0,
+ DMO_INPUT_DATA_BUFFERF_SYNCPOINT,
0, 0);
((IMediaBuffer*)bufferin)->vt->Release((IUnknown*)bufferin);
@@ -463,8 +463,9 @@
this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
this->iv.m_obh.biCompression=csp;
this->iv.m_obh.biBitCount=bits;
- this->iv.m_obh.biSizeImage=labs(this->iv.m_obh.biBitCount*
- this->iv.m_obh.biWidth*this->iv.m_obh.biHeight)>>3;
+
+ this->iv.m_obh.biSizeImage = labs(this->iv.m_obh.biWidth * this->iv.m_obh.biHeight)
+ * ((this->iv.m_obh.biBitCount + 7) / 8);
}
}
this->m_sDestType.lSampleSize = this->iv.m_obh.biSizeImage;
@@ -0,0 +1,16 @@
diff -urN xine-lib-1.1.12.orig/misc/xine-list.c xine-lib-1.1.12/misc/xine-list.c
--- xine-lib-1.1.12.orig/misc/xine-list.c 2008-04-06 21:32:21 +0300
+++ xine-lib-1.1.12/misc/xine-list.c 2008-04-19 21:15:50 +0300
@@ -125,7 +125,11 @@
sep = strchr (text, ';') ? : text + strlen (text);
sep2 = which == 'a' ? sep : strchr (text, ':') ? : sep;
if (!*sep)
- break;
+ {
+ if (text[0])
+ printf ("%s;", text);
+ break;
+ }
if (printf ("%.*s;", (int)(sep2 - text), text) < 0 || (lf && puts ("") < 0))
goto write_fail;
}
@@ -0,0 +1,30 @@
diff -Nur xine-lib-1.1.19-old//m4/pthreads.m4 xine-lib-1.1.19/m4/pthreads.m4
--- xine-lib-1.1.19-old//m4/pthreads.m4 2010-09-04 18:26:52.719999251 +0300
+++ xine-lib-1.1.19/m4/pthreads.m4 2010-09-04 18:28:15.110999847 +0300
@@ -15,7 +15,7 @@
AC_ARG_VAR([PTHREAD_CFLAGS], [C compiler flags for Pthread support])
AC_ARG_VAR([PTHREAD_LIBS], [linker flags for Pthread support])
- dnl if PTHREAD_* are not set, default to -pthread (GCC)
+ dnl if PTHREAD_* are not set, default to -lpthread (GCC)
if test "${PTHREAD_CFLAGS-unset}" = "unset"; then
case $host in
*-mingw*) PTHREAD_CFLAGS="" ;;
@@ -25,7 +25,7 @@
dnl Handle Sun Studio compiler (also on Linux)
CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt"]);;
- *) PTHREAD_CFLAGS="-pthread" ;;
+ *) PTHREAD_CFLAGS="-lpthread" ;;
esac
fi
if test "${PTHREAD_LIBS-unset}" = "unset"; then
@@ -36,7 +36,7 @@
*-solaris*)
dnl Use the same libraries for gcc and Sun Studio cc
PTHREAD_LIBS="-lpthread -lposix4 -lrt";;
- *) PTHREAD_LIBS="-pthread" ;;
+ *) PTHREAD_LIBS="-lpthread" ;;
esac
dnl Again, handle Sun Studio compiler
@@ -0,0 +1,16 @@
diff -up xine-lib-1.1.16.2/misc/xine-config.in.multilib xine-lib-1.1.16.2/misc/xine-config.in
--- xine-lib-1.1.16.2/misc/xine-config.in.multilib 2008-06-25 08:04:09.000000000 -0500
+++ xine-lib-1.1.16.2/misc/xine-config.in 2009-02-20 07:34:27.000000000 -0600
@@ -6,12 +6,6 @@ unset prefix
unset exec_prefix
unset args
-PKG_CONFIG_PATH="`cat <<'EOF'
-@XINE_PKGCONFIG_DIR@
-EOF
-`${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH"
-export PKG_CONFIG_PATH
-
usage()
{
cat <<EOF
@@ -0,0 +1,17 @@
diff -up xine-lib-1.1.17/autogen.sh.no_autopoint xine-lib-1.1.17/autogen.sh
--- xine-lib-1.1.17/autogen.sh.no_autopoint 2009-10-09 09:33:31.000000000 -0500
+++ xine-lib-1.1.17/autogen.sh 2009-12-02 09:15:48.534555467 -0600
@@ -229,10 +229,10 @@ run_aclocal () {
echo
fi
- echo $_echo_n " + Running autopoint: $_echo_c"
+ #echo $_echo_n " + Running autopoint: $_echo_c"
- autopoint
- echo "done."
+ #autopoint
+ #echo "done."
echo $_echo_n " + Running aclocal: $_echo_c"
@@ -0,0 +1,24 @@
diff -Nur xine-lib-1.1.18.1-old/src/xine-engine/xine.c xine-lib-1.1.18.1/src/xine-engine/xine.c
--- xine-lib-1.1.18.1-old/src/xine-engine/xine.c 2010-04-15 17:34:34.920980153 +0300
+++ xine-lib-1.1.18.1/src/xine-engine/xine.c 2010-04-15 17:36:18.330983403 +0300
@@ -1710,7 +1710,7 @@
_x_scan_plugins(this);
#ifdef HAVE_SETLOCALE
- if (!setlocale(LC_CTYPE, ""))
+ if (!setlocale(LC_CTYPE, "en_US.UTF-8"))
xprintf(this, XINE_VERBOSITY_LOG, _("xine: locale not supported by C library\n"));
#endif
diff -Nur xine-lib-1.1.18.1-old/src/xine-utils/utils.c xine-lib-1.1.18.1/src/xine-utils/utils.c
--- xine-lib-1.1.18.1-old/src/xine-utils/utils.c 2010-04-15 17:34:34.915980632 +0300
+++ xine-lib-1.1.18.1/src/xine-utils/utils.c 2010-04-15 17:36:04.272983486 +0300
@@ -564,7 +564,7 @@
char *codeset = NULL;
#ifdef HAVE_NL_LANGINFO
- setlocale(LC_CTYPE, "");
+ setlocale(LC_CTYPE, "en_US.UTF-8");
codeset = nl_langinfo(CODESET);
#endif
/*