Changes of Revision 4
[-] | Changed | xine-lib.spec |
x 1
2 +# norootforbuild 3 %define shortname libxine 4 %define name libxine1 5 %define version 1.1.8 6
7 %if %{?BUILD_SYNCFB:0}%{!?BUILD_SYNCFB:1} 8 %define BUILD_SYNCFB 1 9 %endif 10 +%if %{?BUILD_W32DLL:0}%{!?BUILD_W32DLL:1} 11 +%define BUILD_W32DLL 1 12 +%endif 13 %if %{?BUILD_XVMC:0}%{!?BUILD_XVMC:1} 14 %define BUILD_XVMC 1 15 %endif 16 %if %{?BUILD_JACK:0}%{!?BUILD_JACK:1} 17 %define BUILD_JACK 1 18 %endif 19 +%if %{?BUILD_PULSE:0}%{!?BUILD_PULSE:1} 20 +%define BUILD_PULSE 1 21 +%endif 22 23 Name: %{name} 24 Summary: A portable video/audio library for unix-like systems. 25
26 27 Source0: xine-lib-1.1.8.tar.bz2 28 29 -Patch0: vdr-xine-lib-0.7.10.diff 30 -Patch1: vdr-xine-lib-with-sockets-0.7.10.diff 31 +Patch0: vdr-xine-lib-0.7.12.diff 32 +Patch1: vdr-xine-lib-with-sockets-0.7.12.diff 33 +Patch2: libxine1-ffmpeg.diff 34 BuildRequires: alsa >= 0.9 35 BuildRequires: alsa-devel >= 0.9 36 BuildRequires: arts >= 1.0 37
38 BuildRequires: mesaglut 39 BuildRequires: mesaglut-devel 40 %endif 41 +%if %suse_version >= 1010 42 +BuildRequires: libpulse-devel 43 +%endif 44 BuildRequires: freetype2 45 BuildRequires: freetype2-devel 46 BuildRequires: glib2 47
48 Requires: libXvMCW 49 %endif 50 %endif 51 +BuildRequires: vcdimager-devel 52 +BuildRequires: libcdio-devel 53 +BuildRequires: libffmpeg0 54 +BuildRequires: libffmpeg-devel 55 Requires: alsa >= 0.9 56 Requires: audiofile 57 Requires: esound 58
59 Requires: popt 60 Requires: libsmbclient 61 Requires: libcaca 62 +Requires: vcdimager 63 +Requires: libcdio 64 +Requires: libffmpeg0 65 Obsoletes: xine 66 Obsoletes: xine-lib 67 Obsoletes: xine-lib-oss 68
69 Obsoletes: %{libname}-oggvorbis 70 Obsoletes: %{libname}-oggtheora 71 Obsoletes: %{libname}-ogg 72 -Obsoletes: xine-lib-w32dll 73 -Obsoletes: libxine0-w32dll 74 -Obsoletes: %{libname}-w32dll 75 Obsoletes: xine-mad 76 Provides: xine 77 Provides: xine-lib 78
79 Provides: %{libname}-oggvorbis 80 Provides: %{libname}-oggtheora 81 Provides: %{libname}-ogg 82 -Provides: xine-lib-w32dll 83 -Provides: libxine0-w32dll 84 -Provides: %{libname}-w32dll 85 Provides: xine-mad 86 BuildRoot: %{_tmppath}/%{name}-buildrootrelease 87 88
89 http://www.gnu.org/licenses/gpl.html 90 91 %if %BUILD_DEVEL 92 -%package devel 93 +%package -n %{shortname}-devel 94 Summary: Header files and documentation to develope programs with libxine. 95 -Summary(cs): Hlavičkové soubory a dokumentace pro vývoj programů, které používají libxine 96 +Summary(cs): Hlavičkové soubory a dokumentace pro vývoj programů používající libxine 97 Summary(de): Headerdateien und Dokumentationen, um Programme mit libxine entwickeln zu können. 98 Summary(fi): Header-tiedostot ja dokumentaatio, joita tarvitset kehittäessäsi ohjelmia libxine:n kanssa. 99 -Group: Development/Libraries 100 +Group: Development/Libraries 101 Obsoletes: xine-lib-devel 102 Obsoletes: xine-devel 103 Obsoletes: libxine0-devel 104 -Provides: %{shortname}-devel = %{version}-%{release} 105 +Obsoletes: %{name}-devel 106 +Provides: %{name}-devel = %{version}-%{release} 107 Provides: xine-devel 108 Requires: %{libname} = %{version}-%{release} 109 110 -%description devel 111 +%description -n %{shortname}-devel 112 This package contains header files and documentation required to develope 113 programs with libxine. 114 115
116 complies to the GPL. More information about GPL-license can be found at 117 http://www.gnu.org/licenses/gpl.html 118 119 -%description devel -l cs 120 +%description -n %{shortname}-devel -l cs 121 Tento balíček obsahuje hlavičkové soubory a dokumentaci potřebnou pro vývoj 122 programů, které používají libxine. 123 124
125 projektech. Více informací o GPL licenci můžete nalézt na 126 http://www.gnu.org/licenses/gpl.html. 127 128 -%description devel -l de 129 +%description -n %{shortname}-devel -l de 130 Dieses Paket enthält die Headerdateien und Dokumentationen, um Programme 131 mit libxine entwickeln zu können. 132 133
134 hierzu jedoch die in der GPL Lizenz vereinbarten Bestimmungen. Weitere 135 Informationen zur GPL-Lizenz finden Sie unter http://www.gnu.org/licenses/gpl.html 136 137 -%description devel -l fi 138 +%description -n %{shortname}-devel -l fi 139 libxine on xinen sydän (vapaa GPL-linsensoitu videosoitinohjelma Unix-tyylisille 140 käyttöjärjestelmille), joka muun muassa tarjoaa mahdollisuudet pakatun videon 141 ja äänen purkamiseen (sekä näyttämiseen) suurimmalla osalla nykyaikaista äänen- 142
143 144 145 %if %BUILD_DXR3 146 -%ifarch i386 i486 i586 i686 i786 i868 i986 k6 k7 athlon x86_64 amd64 ia32e 147 %package dxr3 148 Summary: libxine video output plugin using mpeg2 decoding cards with dxr3 decoder-chip 149 Summary(cs): Videovýstupní modul libxine používající karty s čipem DXR3 150
151 %description dxr3 -l fi 152 libxine-Videolisdke MPEG2-videopurkukorteille, joissa on DXR3 purkusiru 153 %endif 154 -%endif 155 156 %if %BUILD_XVMC 157 -%ifarch i386 i486 i586 i686 i786 i868 i986 k6 k7 athlon x86_64 amd64 ia32e 158 %package xvmc 159 Summary: libxine video output plugin using XVideo-extension with motion compensation 160 Summary(cs): Videovýstupní modul libxine používající rozšíření XVideo MC 161
162 %description xvmc -l de 163 libxine Videoausgabeplugin per XVideo-Erweiterung mit Motion Compensation 164 %endif 165 + 166 +%if %BUILD_W32DLL 167 +%ifarch i386 i486 i586 i686 i786 i868 i986 k6 k7 athlon 168 +%package w32dll 169 +Summary: libxine decoding plugin using win32 dlls for native not supported formats 170 +Summary(cs): Dekódovací modul libxine, který používá DLL knihovny WIN32 171 +Summary(de): libxine Dekodierplugin, nutzt Win32 dlls für natvie nicht unterstützte Formate 172 +Summary(fi): libxine-Purkulisdke, joka mahdollistaa Win32 DLL:n kdytvn. 173 +Group: Development/Libraries 174 +Obsoletes: xine-lib-w32dll 175 +Obsoletes: libxine0-w32dll 176 +Requires: %{libname} = %{version}-%{release} 177 +Requires: w32codec-all >= 20040809 178 +Requires: zlib 179 + 180 +%description w32dll 181 +libxine decoding plugin using win32 dlls for native not supported formats 182 + 183 +%description w32dll -l cs 184 +Dekódovací modul libxine, který používá DLL knihovny WIN32 pro formáty 185 +nepodporované přímo. 186 + 187 +%description w32dll -l de 188 +libxine Dekodierplugin, nutzt Win32 dlls für native nicht unterstützte Formate 189 + 190 +%description w32dll -l fi 191 +libxine-Purkulisdke, joka mahdollistaa Win32 DLL:n kdytvn. 192 +%endif 193 %endif 194 195 %if %BUILD_JACK 196 %package jack 197 -Summary: libxine sound output plugin for the jack sooundserver 198 +Summary: libxine sound output plugin for the jack soundserver 199 Summary(de): libxine Soundausgabeplugin für den jack-Soundserver 200 Group: Development/Libraries 201 |
||
[+] | Added | libxine1-ffmpeg.diff ^ |
@@ -0,0 +1,2721 @@ +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_audio_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_audio_decoder.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ff_audio_decoder.c 2007-08-19 01:36:49.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ff_audio_decoder.c 2007-11-11 00:31:03.000000000 +0100 +@@ -15,12 +15,9 @@ + * + * 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 +- * +- * $Id: audio_decoder.c,v 1.33 2007/01/28 18:38:33 miguelfreitas Exp $ ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * xine audio decoder plugin using ffmpeg +- * + */ + + #ifdef HAVE_CONFIG_H +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_dvaudio_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_dvaudio_decoder.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ff_dvaudio_decoder.c 2007-08-19 01:36:49.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ff_dvaudio_decoder.c 2007-11-11 00:31:03.000000000 +0100 +@@ -15,12 +15,9 @@ + * + * 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 +- * +- * $Id: dvaudio_decoder.c,v 1.12 2006/12/04 22:25:13 miguelfreitas Exp $ ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * dv audio decoder based on patch by Dan Dennedy <dan@dennedy.org> +- * + */ + + #ifdef HAVE_CONFIG_H +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.c xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.c 2007-08-19 01:36:50.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.c 2007-11-11 00:31:03.000000000 +0100 +@@ -15,12 +15,9 @@ + * + * 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 +- * +- * $Id: xine_decoder.c,v 1.173 2007/01/13 21:19:52 miguelfreitas Exp $ ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * xine decoder plugin using ffmpeg +- * + */ + + #ifdef HAVE_CONFIG_H +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.h xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.h +--- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_decoder.h 2007-08-19 01:36:50.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_decoder.h 2007-11-11 00:31:03.000000000 +0100 +@@ -15,10 +15,7 @@ + * + * 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 +- * +- * $Id: xine_decoder.h,v 1.7 2006/08/02 07:15:27 tmmm Exp $ +- * ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + + #ifndef HAVE_XINE_DECODER_H +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_encoder.c xine-lib-1.1.8/src/libffmpeg/ffmpeg_encoder.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ffmpeg_encoder.c 2007-08-19 01:36:50.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ffmpeg_encoder.c 2007-12-07 19:26:33.000000000 +0100 +@@ -15,9 +15,7 @@ + * + * 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 +- * +- * $Id: xine_encoder.c,v 1.25 2006/07/10 22:08:29 dgp85 Exp $ ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + + /* mpeg encoders for the dxr3 video out plugin. */ +@@ -76,7 +74,7 @@ + lavc_data_t* this; + avcodec_init(); + +- register_avcodec(&mpeg1video_encoder); ++ avcodec_register_all(); + lprintf("lavc init , version %x\n", avcodec_version()); + this = xine_xmalloc(sizeof(lavc_data_t)); + if (!this) return 0; +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.c xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.c 2007-08-19 01:36:49.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.c 2007-11-11 00:31:03.000000000 +0100 +@@ -15,12 +15,10 @@ + * + * 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 ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr) + * based on libmpeg2 decoder. +- * +- * $Id: mpeg_parser.c,v 1.7 2007/03/29 18:52:45 dgp85 Exp $ + */ + #define LOG_MODULE "mpeg_parser" + #define LOG_VERBOSE +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.h xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.h +--- xine-lib-1.1.8.orig/src/libffmpeg/ff_mpeg_parser.h 2007-08-19 01:36:49.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ff_mpeg_parser.h 2007-11-11 00:31:03.000000000 +0100 +@@ -15,12 +15,10 @@ + * + * 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 ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * Simple MPEG-ES parser/framer by Thibaut Mattern (tmattern@noos.fr) + * based on libmpeg2 decoder. +- * +- * $Id: mpeg_parser.h,v 1.5 2007/03/29 18:52:45 dgp85 Exp $ + */ + #ifndef HAVE_MPEG_PARSER_H + #define HAVE_MPEG_PARSER_H +diff -uNr xine-lib-1.1.8.orig/src/libffmpeg/ff_video_decoder.c xine-lib-1.1.8/src/libffmpeg/ff_video_decoder.c +--- xine-lib-1.1.8.orig/src/libffmpeg/ff_video_decoder.c 2007-08-19 01:36:49.000000000 +0200 ++++ xine-lib-1.1.8/src/libffmpeg/ff_video_decoder.c 2007-12-09 16:35:05.000000000 +0100 +@@ -15,12 +15,9 @@ + * + * 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 +- * +- * $Id: video_decoder.c,v 1.73 2007/03/29 18:41:02 dgp85 Exp $ ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + * + * xine video decoder plugin using ffmpeg +- * + */ + + #ifdef HAVE_CONFIG_H +@@ -67,6 +64,7 @@ + video_decoder_class_t decoder_class; + + int pp_quality; ++ int thread_count; + + xine_t *xine; + } ff_video_class_t; +@@ -87,6 +85,7 @@ + uint8_t yuv_init:1; + uint8_t is_direct_rendering_disabled:1; + uint8_t cs_convert_init:1; ++ uint8_t assume_bad_field_picture:1; + + xine_bmiheader bih; + unsigned char *buf; +@@ -216,12 +215,14 @@ + ff_video_decoder_t *this = (ff_video_decoder_t *)context->opaque; + + if (av_frame->type == FF_BUFFER_TYPE_USER) { +- vo_frame_t *img = (vo_frame_t *)av_frame->opaque; ++ if ( av_frame->opaque ) { ++ vo_frame_t *img = (vo_frame_t *)av_frame->opaque; ++ ++ img->free(img); ++ } ++ + xine_list_iterator_t it; + +- assert(av_frame->opaque); +- img->free(img); +- + it = xine_list_find(this->dr1_frames, av_frame); + assert(it); + if( it != NULL ) +@@ -244,6 +245,7 @@ + {BUF_VIDEO_WMV7, CODEC_ID_WMV1, "MS Windows Media Video 7 (ffmpeg)"}, + {BUF_VIDEO_WMV8, CODEC_ID_WMV2, "MS Windows Media Video 8 (ffmpeg)"}, + {BUF_VIDEO_WMV9, CODEC_ID_WMV3, "MS Windows Media Video 9 (ffmpeg)"}, ++ {BUF_VIDEO_VC1, CODEC_ID_VC1, "MS Windows Media Video VC-1 (ffmpeg)"}, + {BUF_VIDEO_MPEG4, CODEC_ID_MPEG4, "ISO MPEG-4 (ffmpeg)"}, + {BUF_VIDEO_XVID, CODEC_ID_MPEG4, "ISO MPEG-4 (XviD, ffmpeg)"}, + {BUF_VIDEO_DIVX5, CODEC_ID_MPEG4, "ISO MPEG-4 (DivX5, ffmpeg)"}, +@@ -368,6 +370,12 @@ + _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0); + return; + } ++ ++ if (this->class->thread_count > 1) { ++ avcodec_thread_init(this->context, this->class->thread_count); ++ this->context->thread_count = this->class->thread_count; ++ } ++ + pthread_mutex_unlock(&ffmpeg_lock); + + lprintf("lavc decoder opened\n"); +@@ -418,10 +426,19 @@ + case BUF_VIDEO_HUFFYUV: + this->frame_flags |= VO_INTERLACED_FLAG; | ||
[+] | Added | vdr-xine-lib-0.7.12.diff ^ |
@@ -0,0 +1,5124 @@ +diff -uNr xine-lib.orig/configure.ac xine-lib/configure.ac +--- xine-lib.orig/configure.ac 2007-09-07 20:50:12.000000000 +0200 ++++ xine-lib/configure.ac 2007-10-21 09:39:06.000000000 +0200 +@@ -2692,6 +2692,7 @@ + src/video_out/vidix/drivers/Makefile + src/xine-utils/Makefile + src/xine-engine/Makefile ++src/vdr/Makefile + win32/Makefile + win32/include/Makefile]) + AC_CONFIG_COMMANDS([default],[[chmod +x ./misc/SlackBuild ./misc/build_rpms.sh ./misc/relchk.sh]],[[]]) +@@ -2727,7 +2728,7 @@ + echo " - stdin_fifo - rtp" + echo " - http - mms" + echo " - pnm - rtsp" +-echo " - dvb" ++echo " - dvb - vdr" + if test "x$external_dvdnav" = "xyes"; then + echo " - dvd (external libs)" + else +@@ -2927,6 +2928,7 @@ + echo " - eq - eq2" + echo " - boxblur - denoise3d" + echo " - unsharp - tvtime" ++echo " - vdr" + echo " * SFX:" + echo " - goom - oscope" + echo " - fftscope - mosaico" +diff -uNr xine-lib.orig/include/xine.h.in xine-lib/include/xine.h.in +--- xine-lib.orig/include/xine.h.in 2007-08-17 19:11:39.000000000 +0200 ++++ xine-lib/include/xine.h.in 2007-10-21 09:39:06.000000000 +0200 +@@ -1663,6 +1663,7 @@ + #define XINE_EVENT_VDR_AUDIO 332 + #define XINE_EVENT_VDR_INFO 333 + #define XINE_EVENT_VDR_CHANNELPREVIOUS 334 ++#define XINE_EVENT_VDR_SUBTITLES 335 + /* some space for further keys */ + #define XINE_EVENT_VDR_SETVIDEOWINDOW 350 + #define XINE_EVENT_VDR_FRAMESIZECHANGED 351 +diff -uNr xine-lib.orig/src/libffmpeg/libavcodec/h264.c xine-lib/src/libffmpeg/libavcodec/h264.c +--- xine-lib.orig/src/libffmpeg/libavcodec/h264.c 2007-04-17 20:46:43.000000000 +0200 ++++ xine-lib/src/libffmpeg/libavcodec/h264.c 2007-10-21 09:39:33.000000000 +0200 +@@ -4639,8 +4639,11 @@ + s->picture_structure= PICT_FRAME; + }else{ + if(get_bits1(&s->gb)) { //field_pic_flag +- s->picture_structure= PICT_TOP_FIELD + get_bits1(&s->gb); //bottom_field_flag ++ //s->picture_structure= PICT_TOP_FIELD + get_bits1(&s->gb); //bottom_field_flag + av_log(h->s.avctx, AV_LOG_ERROR, "PAFF interlacing is not implemented\n"); ++ s->avctx->release_buffer(s->avctx, (AVFrame*)s->current_picture_ptr); ++ s->current_picture_ptr = 0; ++ return -1; + } else { + s->picture_structure= PICT_FRAME; + h->mb_aff_frame = h->sps.mb_aff; +@@ -4696,8 +4699,12 @@ + if(h->slice_type == P_TYPE || h->slice_type == SP_TYPE || h->slice_type == B_TYPE){ + if(h->slice_type == B_TYPE){ + h->direct_spatial_mv_pred= get_bits1(&s->gb); +- if(h->sps.mb_aff && h->direct_spatial_mv_pred) ++ if(h->sps.mb_aff && h->direct_spatial_mv_pred){ + av_log(h->s.avctx, AV_LOG_ERROR, "MBAFF + spatial direct mode is not implemented\n"); ++ s->avctx->release_buffer(s->avctx, (AVFrame*)s->current_picture_ptr); ++ s->current_picture_ptr = 0; ++ return -1; ++ } + } + num_ref_idx_active_override_flag= get_bits1(&s->gb); + +@@ -8110,10 +8117,10 @@ + } + + ptr= decode_nal(h, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index); +- if (ptr==NULL || dst_length <= 0){ ++ if (ptr==NULL || dst_length < 0){ + return -1; + } +- while(ptr[dst_length - 1] == 0 && dst_length > 1) ++ while(ptr[dst_length - 1] == 0 && dst_length > 0) + dst_length--; + bit_length= 8*dst_length - decode_rbsp_trailing(ptr + dst_length - 1); + +diff -uNr xine-lib.orig/src/libffmpeg/libavcodec/mpegvideo.c xine-lib/src/libffmpeg/libavcodec/mpegvideo.c +--- xine-lib.orig/src/libffmpeg/libavcodec/mpegvideo.c 2007-06-14 19:59:48.000000000 +0200 ++++ xine-lib/src/libffmpeg/libavcodec/mpegvideo.c 2007-10-21 09:39:33.000000000 +0200 +@@ -1544,7 +1544,7 @@ + AVFrame *pic; + s->mb_skipped = 0; + +- assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3); ++// assert(s->last_picture_ptr==NULL || s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3); + + /* mark&release old frames */ + if (s->pict_type != B_TYPE && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->data[0]) { +@@ -1619,7 +1619,7 @@ + goto alloc; + } + +- assert(s->pict_type == I_TYPE || (s->last_picture_ptr && s->last_picture_ptr->data[0])); ++// assert(s->pict_type == I_TYPE || (s->last_picture_ptr && s->last_picture_ptr->data[0])); + + if(s->picture_structure!=PICT_FRAME){ + int i; +diff -uNr xine-lib.orig/src/Makefile.am xine-lib/src/Makefile.am +--- xine-lib.orig/src/Makefile.am 2007-04-17 20:46:41.000000000 +0200 ++++ xine-lib/src/Makefile.am 2007-10-21 09:39:06.000000000 +0200 +@@ -26,4 +26,5 @@ + libfaad \ + libmusepack \ + post \ +- combined ++ combined \ ++ vdr +diff -uNr xine-lib.orig/src/vdr/input_vdr.c xine-lib/src/vdr/input_vdr.c +--- xine-lib.orig/src/vdr/input_vdr.c 1970-01-01 01:00:00.000000000 +0100 ++++ xine-lib/src/vdr/input_vdr.c 2007-10-21 09:39:33.000000000 +0200 +@@ -0,0 +1,2546 @@ ++/* ++ * Copyright (C) 2003-2004 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ++ * ++ * $Id: input_vdr.c,v 1.51 2003/05/02 15:02:11 miguelfreitas Exp $ ++ */ ++ ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++#include <fcntl.h> ++#include <unistd.h> ++#include <sys/stat.h> ++#include <sys/poll.h> ++#include <errno.h> ++#include <pthread.h> ++ ++#define LOG_MODULE "input_vdr" ++#define LOG_VERBOSE ++/* ++#define LOG ++*/ ++#include "xine_internal.h" ++#include "xineutils.h" ++#include "input_plugin.h" ++ ++#include "input_vdr.h" ++#include "post_vdr.h" ++ ++ ++ ++#define VDR_MAX_NUM_WINDOWS 16 ++#define VDR_ABS_FIFO_DIR "/tmp/vdr-xine" ++ ++ ++ ++#define BUF_SIZE 1024 ++ ++#define LOG_OSD(x) ++/* ++#define LOG_OSD(x) x ++*/ ++ ++ ++typedef struct ++{ ++ input_plugin_t input_plugin; ++ ++ xine_stream_t *stream; ++ xine_stream_t *stream_external; ++ ++ int fh; ++ int fh_control; ++ int fh_result; ++ int fh_event; ++ ++ char *mrl; ++ ++ off_t curpos; ++ char seek_buf[ BUF_SIZE ]; ++ ++ char *preview; ++ off_t preview_size; | ||
[+] | Added | vdr-xine-lib-with-sockets-0.7.12.diff ^ |
@@ -0,0 +1,343 @@ +diff -uNr xine-lib.orig/src/vdr/input_vdr.c xine-lib/src/vdr/input_vdr.c +--- xine-lib.orig/src/vdr/input_vdr.c 2007-10-21 10:08:28.000000000 +0200 ++++ xine-lib/src/vdr/input_vdr.c 2007-10-21 10:18:06.000000000 +0200 +@@ -34,6 +34,10 @@ + #include <errno.h> + #include <pthread.h> + ++#include <sys/socket.h> ++#include <resolv.h> ++#include <netdb.h> ++ + #define LOG_MODULE "input_vdr" + #define LOG_VERBOSE + /* +@@ -49,9 +53,7 @@ + + + #define VDR_MAX_NUM_WINDOWS 16 +-#define VDR_ABS_FIFO_DIR "/tmp/vdr-xine" +- +- ++#define VDR_ABS_FIFO_DIR "/var/lib/vdr-xine" + + #define BUF_SIZE 1024 + +@@ -2115,108 +2117,203 @@ + + static uint8_t preview_data[ sizeof (preview_mpg_data) + ((sizeof (preview_mpg_data) - 1) / (2048 - 6 - 3) + 1) * (6 + 3) ]; + +-static int vdr_plugin_open(input_plugin_t *this_gen) ++static int vdr_plugin_open_socket(vdr_input_plugin_t *this, struct hostent *host, unsigned short port) ++{ ++ int fd; ++ struct sockaddr_in sain; ++ struct in_addr iaddr; ++ ++ if ((fd = socket(PF_INET,SOCK_STREAM,0)) == -1) { ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ _("vdr: failed to create socket for port %d (%s)\n"), ++ port,strerror(errno)); ++ return -1; ++ } ++ ++ iaddr.s_addr = * ((unsigned int *) host->h_addr_list[0]); ++ ++ sain.sin_port = htons(port); ++ sain.sin_family = AF_INET; ++ sain.sin_addr = iaddr; ++ ++ if (connect(fd,(struct sockaddr*) &sain, sizeof(sain)) < 0) { ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ _("vdr: failed to connect to port %d (%s)\n"),port, ++ strerror(errno)); ++ return -1; ++ } ++ ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ "vdr: socket opening successful, fd = %d\n",fd); ++ return fd; ++} ++ ++static int vdr_plugin_open_sockets(vdr_input_plugin_t *this) ++{ ++// struct hostent *host = gethostbyname(VDR_SERVER_ADDRESS); ++ struct hostent *host = gethostbyname(&this->mrl[12]); ++ ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,"vdr: connecting to vdr.\n"); ++ if (host == NULL) { ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ _("vdr: failed to resolve hostname '%s' (%s)\n"), ++ &this->mrl[12], ++ strerror(errno)); ++ return 0; ++ } ++ ++ if ((this->fh = vdr_plugin_open_socket(this,host,18701)) == -1) ++ return 0; ++ ++ fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); ++ ++ if ((this->fh_control = vdr_plugin_open_socket(this,host,18702)) == -1) ++ return 0; ++ ++ if ((this->fh_result = vdr_plugin_open_socket(this,host,18703)) == -1) ++ return 0; ++ ++ if ((this->fh_event = vdr_plugin_open_socket(this,host,18704)) == -1) ++ return 0; ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ "vdr: connecting to all sockets was successful.\n"); ++ return 1; ++} ++ ++static int vdr_plugin_open_vdr(input_plugin_t *this_gen) + { + vdr_input_plugin_t *this = (vdr_input_plugin_t *)this_gen; + +- lprintf("trying to open '%s'...\n", this->mrl); ++ char *filename; + +- if (this->fh == -1) +- { +- char *filename; +- int err = 0; ++ filename = (char *)&this->mrl[ 4 ]; ++ this->fh = open(filename, O_RDONLY | O_NONBLOCK); + +- filename = (char *)&this->mrl[ 4 ]; +- this->fh = open(filename, O_RDONLY | O_NONBLOCK); ++ lprintf("filename '%s'\n", filename); + +- lprintf("filename '%s'\n", filename); ++ if (this->fh == -1) ++ { ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ _(LOG_MODULE ": failed to open '%s' (%s)\n"), ++ filename, ++ strerror(errno)); ++ ++ return 0; ++ } + +- if (this->fh == -1) ++ { ++ struct pollfd poll_fh = { this->fh, POLLIN, 0 }; ++ ++ int r = poll(&poll_fh, 1, 300); ++ if (1 != r) + { + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + _(LOG_MODULE ": failed to open '%s' (%s)\n"), + filename, +- strerror(errno)); +- +- return 0; +- } +- +- { +- struct pollfd poll_fh = { this->fh, POLLIN, 0 }; +- +- int r = poll(&poll_fh, 1, 300); +- if (1 != r) +- { +- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, +- _(LOG_MODULE ": failed to open '%s' (%s)\n"), +- filename, +- _("timeout expired during setup phase")); ++ _("timeout expired during setup phase")); + +- return 0; +- } ++ return 0; + } ++ } + +- fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); ++ fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); + +- { +- char *filename_control = 0; +- asprintf(&filename_control, "%s.control", filename); +- +- this->fh_control = open(filename_control, O_RDONLY); +- +- if (this->fh_control == -1) { +- xprintf(this->stream->xine, XINE_VERBOSITY_LOG, +- _(LOG_MODULE ": failed to open '%s' (%s)\n"), +- filename_control, +- strerror(errno)); ++ { ++ char *filename_control = 0; ++ asprintf(&filename_control, "%s.control", filename); + +- free(filename_control); +- return 0; +- } ++ this->fh_control = open(filename_control, O_RDONLY); + +- free(filename_control); ++ if (this->fh_control == -1) { ++ xprintf(this->stream->xine, XINE_VERBOSITY_LOG, ++ _(LOG_MODULE ": failed to open '%s' (%s)\n"), ++ filename_control, ++ strerror(errno)); ++ free(filename_control); ++ return 0; + } ++ free(filename_control); ++ } + +- { +- char *filename_result = 0; +- asprintf(&filename_result, "%s.result", filename); ++ { ++ char *filename_result = 0; ++ asprintf(&filename_result, "%s.result", filename); + +- this->fh_result = open(filename_result, O_WRONLY); ++ this->fh_result = open(filename_result, O_WRONLY); |