From d5cd481c17736041b5a0a334e62168620643e7c7 Mon Sep 17 00:00:00 2001 From: piernov Date: Tue, 4 Oct 2011 19:56:58 +0200 Subject: xine-lib 1.1.19-3 ajout patch ffmpeg 0.8 + désactivation jack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extra/xine-lib/.md5sum.i686 | 1 + extra/xine-lib/.md5sum.x86_64 | 1 + extra/xine-lib/Pkgfile | 35 ++++++---- extra/xine-lib/xine-lib-1.1.19-ffmpeg.patch | 99 +++++++++++++++++++++++++++++ 4 files changed, 124 insertions(+), 12 deletions(-) create mode 100644 extra/xine-lib/xine-lib-1.1.19-ffmpeg.patch (limited to 'extra/xine-lib') diff --git a/extra/xine-lib/.md5sum.i686 b/extra/xine-lib/.md5sum.i686 index 7c8f45e70..4f06e91a6 100644 --- a/extra/xine-lib/.md5sum.i686 +++ b/extra/xine-lib/.md5sum.i686 @@ -1,4 +1,5 @@ c4537f3b0445e15a031e1f69fc57bc28 compat.c 9776df4eb54d2f1f68d8268adbc3b5c2 xine-lib-1.1.1-configure-no-mcpu-march.patch +c72fd9096ff572eda1a4ca8ee6a3637d xine-lib-1.1.19-ffmpeg.patch cd6e2d6896e162690d6bd6bae5a61897 xine-lib-1.1.19-include.patch a410a0f0617e1d6309f0cbe907f73f8a xine-lib-1.1.19.tar.bz2 diff --git a/extra/xine-lib/.md5sum.x86_64 b/extra/xine-lib/.md5sum.x86_64 index 7c8f45e70..4f06e91a6 100644 --- a/extra/xine-lib/.md5sum.x86_64 +++ b/extra/xine-lib/.md5sum.x86_64 @@ -1,4 +1,5 @@ c4537f3b0445e15a031e1f69fc57bc28 compat.c 9776df4eb54d2f1f68d8268adbc3b5c2 xine-lib-1.1.1-configure-no-mcpu-march.patch +c72fd9096ff572eda1a4ca8ee6a3637d xine-lib-1.1.19-ffmpeg.patch cd6e2d6896e162690d6bd6bae5a61897 xine-lib-1.1.19-include.patch a410a0f0617e1d6309f0cbe907f73f8a xine-lib-1.1.19.tar.bz2 diff --git a/extra/xine-lib/Pkgfile b/extra/xine-lib/Pkgfile index 58182668d..a4bb2b50b 100755 --- a/extra/xine-lib/Pkgfile +++ b/extra/xine-lib/Pkgfile @@ -7,31 +7,42 @@ name=xine-lib version=1.1.19 -release=2 +release=3 source=(http://downloads.sourceforge.net/xine/$name-$version.tar.bz2 - http://downloads.sourceforge.net/sourceforge/xine/compat.c \ + http://downloads.sourceforge.net/sourceforge/xine/compat.c xine-lib-1.1.1-configure-no-mcpu-march.patch - xine-lib-1.1.19-include.patch) + xine-lib-1.1.19-include.patch + xine-lib-1.1.19-ffmpeg.patch) build() { cd $name-$version + cp ../compat.c src/dxr3/compat.c patch -p0 < ../xine-lib-1.1.1-configure-no-mcpu-march.patch - patch -Np0 -i ../xine-lib-1.1.19-include.patch + patch -p0 < ../xine-lib-1.1.19-include.patch + patch -p0 < ../xine-lib-1.1.19-ffmpeg.patch libtoolize --force --copy aclocal -I m4 autoconf automake --add-missing - ./configure --prefix=/usr --with-w32-path=/usr/lib/codecs \ - --with-xv-path=/usr/lib --with-xxmc-path=/usr/lib --with-xvmc-path=/usr/lib \ - --with-libflac --with-wavpack --with-xcb \ - --without-arts --without-speex \ - --disable-gnomevfs --without-pulseaudio --disable-aalib \ - --disable-modplug --with-external-ffmpeg + ./configure --prefix=/usr \ + --with-w32-path=/usr/lib/codecs \ + --with-xv-path=/usr/lib \ + --with-xxmc-path=/usr/lib \ + --with-xvmc-path=/usr/lib \ + --with-libflac \ + --with-wavpack \ + --with-xcb \ + --without-arts \ + --without-speex \ + --disable-gnomevfs \ + --without-pulseaudio \ + --disable-aalib \ + --disable-modplug \ + --with-external-ffmpeg \ + --without-jack make make DESTDIR=$PKG install } - - diff --git a/extra/xine-lib/xine-lib-1.1.19-ffmpeg.patch b/extra/xine-lib/xine-lib-1.1.19-ffmpeg.patch new file mode 100644 index 000000000..2e4b874d3 --- /dev/null +++ b/extra/xine-lib/xine-lib-1.1.19-ffmpeg.patch @@ -0,0 +1,99 @@ +--- src/combined/ffmpeg/ff_audio_decoder.c.orig ++++ src/combined/ffmpeg/ff_audio_decoder.c +@@ -285,12 +285,15 @@ static void ff_audio_decode_data (audio_ + + if (!this->output_open) { + if (!this->audio_bits || !this->audio_sample_rate || !this->audio_channels) { ++ AVPacket pkt; + decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- avcodec_decode_audio2 (this->context, ++ av_init_packet( &pkt ); ++ pkt.data = &this->buf[0]; ++ pkt.size = this->size; ++ avcodec_decode_audio3 (this->context, + (int16_t *)this->decode_buffer, + &decode_buffer_size, +- &this->buf[0], +- this->size); ++ &pkt); + this->audio_bits = this->context->bits_per_sample; + this->audio_sample_rate = this->context->sample_rate; + this->audio_channels = this->context->channels; +@@ -310,12 +313,15 @@ static void ff_audio_decode_data (audio_ + + offset = 0; + while (this->size>0) { ++ AVPacket pkt; + decode_buffer_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; +- bytes_consumed = avcodec_decode_audio2 (this->context, ++ av_init_packet( &pkt ); ++ pkt.data = &this->buf[offset]; ++ pkt.size = this->size; ++ bytes_consumed = avcodec_decode_audio3 (this->context, + (int16_t *)this->decode_buffer, + &decode_buffer_size, +- &this->buf[offset], +- this->size); ++ &pkt); + + if (bytes_consumed<0) { + xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, +--- src/combined/ffmpeg/ff_video_decoder.c.orig ++++ src/combined/ffmpeg/ff_video_decoder.c +@@ -1026,6 +1026,7 @@ static void ff_handle_mpeg12_buffer (ff_ + + uint8_t *current; + int next_flush; ++ AVPacket pkt; + + got_picture = 0; + if (!flush) { +@@ -1055,12 +1056,14 @@ static void ff_handle_mpeg12_buffer (ff_ + } + + /* skip decoding b frames if too late */ +- this->context->hurry_up = (this->skipframes > 0); ++ this->context->skip_frame = (this->skipframes > 0? AVDISCARD_NONREF : AVDISCARD_DEFAULT); + ++ av_init_packet( &pkt ); ++ pkt.data = this->mpeg_parser->chunk_buffer; ++ pkt.size = this->mpeg_parser->buffer_size; + lprintf("avcodec_decode_video: size=%d\n", this->mpeg_parser->buffer_size); +- len = avcodec_decode_video (this->context, this->av_frame, +- &got_picture, this->mpeg_parser->chunk_buffer, +- this->mpeg_parser->buffer_size); ++ len = avcodec_decode_video2 (this->context, this->av_frame, ++ &got_picture, &pkt); + lprintf("avcodec_decode_video: decoded_size=%d, got_picture=%d\n", + len, got_picture); + len = current - buf->content - offset; +@@ -1112,7 +1115,7 @@ static void ff_handle_mpeg12_buffer (ff_ + + } else { + +- if (this->context->hurry_up) { ++ if (this->context->skip_frame > AVDISCARD_DEFAULT) { + /* skipped frame, output a bad frame */ + img = this->stream->video_out->get_frame (this->stream->video_out, + this->bih.biWidth, +@@ -1303,13 +1306,16 @@ static void ff_handle_buffer (ff_video_d + this->size = 0; + got_picture = 0; + } else { ++ AVPacket pkt; + /* skip decoding b frames if too late */ +- this->context->hurry_up = (this->skipframes > 0); ++ this->context->skip_frame = (this->skipframes > 0? AVDISCARD_NONREF : AVDISCARD_DEFAULT); + + lprintf("buffer size: %d\n", this->size); +- len = avcodec_decode_video (this->context, this->av_frame, +- &got_picture, &chunk_buf[offset], +- this->size); ++ av_init_packet( &pkt ); ++ pkt.data = &chunk_buf[offset]; ++ pkt.size = this->size; ++ len = avcodec_decode_video2 (this->context, this->av_frame, ++ &got_picture, &pkt); + + #ifdef AVCODEC_HAS_REORDERED_OPAQUE + /* reset consumed pts value */ -- cgit v1.2.3-70-g09d2