From 519f3e9ac3a920fe8a04668f38fbd0eb7b10942a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 11 Jan 2008 17:30:35 +0000 Subject: Build-dep fixes: remove duplicate libdirectfb-dev, add gs-gpl | gs. --- debian/control | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index c4a127b4f..7d93d2f7e 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,6 @@ Build-Depends: debhelper (>= 5.0.1), binutils (>= 2.12.90.0.9), pkg-config, libxcb-xvmc0-dev | libxv-dev (<< 1:1.0.3), libxcb-shm0-dev | libxv-dev (<< 1:1.0.3), libxcb-shape0-dev | libxv-dev (<< 1:1.0.3), libxinerama-dev, libxv-dev, libxvmc-dev, libxt-dev, - libdirectfb-dev (>= 0.9.22), libasound2-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libaa1-dev, libcaca-dev, libmodplug-dev, libmagick9-dev, libpng12-dev, libfreetype6-dev, @@ -19,11 +18,11 @@ Build-Depends: debhelper (>= 5.0.1), binutils (>= 2.12.90.0.9), pkg-config, libesd0-dev, libgnomevfs2-dev, zlib1g-dev, libartsc0-dev, liblircclient-dev, libjack0.100.0-dev | libjack-dev, - libdirectfb-dev, libgtk2.0-dev, + libdirectfb-dev (>= 0.9.22), libgtk2.0-dev, libflac-dev, libpulse-dev, libsdl1.2-dev, libwavpack-dev, libsmbclient-dev, libspeex-dev, libmng-dev, libmad0-dev, libmpcdec-dev, libcdio-dev (>= 0.76-1), - w3m, transfig, sgmltools-lite + w3m, transfig, sgmltools-lite, gs-gpl | gs Build-Conflicts: libdvdnav-dev, libvcdinfo-dev Standards-Version: 3.7.2 -- cgit v1.2.3 From 37e7a5aa4c03f8793dc9da8058a5625f5ff84d4b Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sat, 12 Jan 2008 15:48:13 +0100 Subject: Don't send BUF_FLAG_FRAME_START twice per frame, otherwise the ffmpeg plugin skips the first part of the frame. Fixed wmv playback with ffmpeg. --- src/demuxers/demux_asf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 9aab59977..c4a154f99 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -723,6 +723,9 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_demux_stream_t *str buf->size = bufsize; timestamp = 0; + if (stream->frag_offset == 0) + buf->decoder_flags |= BUF_FLAG_FRAME_START; + stream->frag_offset += bufsize; frag_len -= bufsize; @@ -733,10 +736,6 @@ static void asf_send_buffer_nodefrag (demux_asf_t *this, asf_demux_stream_t *str else check_newpts (this, buf->pts, PTS_AUDIO, package_done); - - if (frag_offset == 0) - buf->decoder_flags |= BUF_FLAG_FRAME_START; - /* test if whole packet read */ if (package_done) { buf->decoder_flags |= BUF_FLAG_FRAME_END; -- cgit v1.2.3 From 1324f12dc8213fc0f7e4549665f7d3f5b7f3100e Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sat, 12 Jan 2008 16:51:25 +0100 Subject: Fixed metadata reading when length=0. Fixed bug id=17. --- src/demuxers/asfheader.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/demuxers/asfheader.c b/src/demuxers/asfheader.c index ea92f878b..eb74c0886 100644 --- a/src/demuxers/asfheader.c +++ b/src/demuxers/asfheader.c @@ -142,9 +142,9 @@ static uint8_t *asf_reader_get_bytes(asf_reader_t *reader, size_t size) { static char *asf_reader_get_string(asf_reader_t *reader, size_t size, iconv_t cd) { char *inbuf, *outbuf; size_t inbytesleft, outbytesleft; - char scratch[2048]; + char scratch[2048]; - if ((reader->size - reader->pos) < size) + if ((size == 0) ||((reader->size - reader->pos) < size)) return NULL; inbuf = (char *)reader->buffer + reader->pos; @@ -599,6 +599,12 @@ static int asf_header_parse_content_description(asf_header_t *header_pub, uint8_ content->description = asf_reader_get_string(&reader, description_length, header->iconv_cd); content->rating = asf_reader_get_string(&reader, rating_length, header->iconv_cd); + lprintf("title: %d chars: \"%s\"\n", title_length, content->title); + lprintf("author: %d chars: \"%s\"\n", author_length, content->author); + lprintf("copyright: %d chars: \"%s\"\n", copyright_length, content->copyright); + lprintf("description: %d chars: \"%s\"\n", description_length, content->description); + lprintf("rating: %d chars: \"%s\"\n", rating_length, content->rating); + header->pub.content = content; return 1; } -- cgit v1.2.3 From 1a2ce4b7f270a680f2510a525926ba31b8b385f0 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Sun, 13 Jan 2008 17:27:39 +0100 Subject: Added data accumulation logic. Fixed bug id=2. --- src/libxineadec/xine_vorbis_decoder.c | 250 +++++++++++++++++++--------------- 1 file changed, 141 insertions(+), 109 deletions(-) diff --git a/src/libxineadec/xine_vorbis_decoder.c b/src/libxineadec/xine_vorbis_decoder.c index 4b7a6c15d..b3acff811 100644 --- a/src/libxineadec/xine_vorbis_decoder.c +++ b/src/libxineadec/xine_vorbis_decoder.c @@ -41,6 +41,7 @@ #include #define MAX_NUM_SAMPLES 4096 +#define INIT_BUFSIZE 8192 typedef struct { audio_decoder_class_t decoder_class; @@ -70,6 +71,11 @@ typedef struct vorbis_decoder_s { xine_stream_t *stream; + /* data accumulation stuff */ + unsigned char *buf; + int bufsize; + int size; + } vorbis_decoder_t; @@ -78,6 +84,7 @@ static void vorbis_reset (audio_decoder_t *this_gen) { vorbis_decoder_t *this = (vorbis_decoder_t *) this_gen; if( this->header_count ) return; + this->size = 0; /* clear block first, as it might contain allocated data */ vorbis_block_clear(&this->vb); @@ -136,126 +143,147 @@ static void get_metadata (vorbis_decoder_t *this) { _x_meta_info_set_utf8(this->stream, XINE_META_INFO_AUDIOCODEC, "vorbis"); } +static void vorbis_check_bufsize (vorbis_decoder_t *this, int size) { + if (size > this->bufsize) { + this->bufsize = size + size / 2; + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + _("vorbis: increasing buffer to %d to avoid overflow.\n"), + this->bufsize); + this->buf = realloc(this->buf, this->bufsize); + } +} + static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { vorbis_decoder_t *this = (vorbis_decoder_t *) this_gen; memset( &this->op, 0, sizeof(this->op) ); - this->op.packet = buf->content; - this->op.bytes = buf->size; - - if ( (buf->decoder_flags & BUF_FLAG_HEADER) && - !(buf->decoder_flags & BUF_FLAG_STDHEADER) ) { - lprintf ("%d headers to go\n", this->header_count); - if (this->header_count) { - int res = 0; + /* data accumulation */ + vorbis_check_bufsize(this, this->size + buf->size); + xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size); + this->size += buf->size; - if (this->header_count == 3) - this->op.b_o_s = 1; + if (buf->decoder_flags & BUF_FLAG_FRAME_END) { + this->op.packet = this->buf; + this->op.bytes = this->size; - - if( (res = vorbis_synthesis_headerin(&this->vi,&this->vc,&this->op)) < 0 ){ - /* error case; not a vorbis header */ - xine_log(this->stream->xine, XINE_LOG_MSG, "libvorbis: this bitstream does not contain vorbis audio data. Following first 64 bytes (return: %d).\n", res); - xine_hexdump((char *)this->op.packet, this->op.bytes < 64 ? this->op.bytes : 64); - return; - } - - this->header_count--; - - if (!this->header_count) { - - int mode = AO_CAP_MODE_MONO; - - get_metadata (this); - - mode = _x_ao_channels2mode(this->vi.channels); - - this->convsize=MAX_NUM_SAMPLES/this->vi.channels; - - if (!this->output_open) { - this->output_open = (this->stream->audio_out->open) (this->stream->audio_out, - this->stream, - 16, - this->vi.rate, - mode) ; - - _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, - this->vi.bitrate_nominal); - - } - - /* OK, got and parsed all three headers. Initialize the Vorbis - * packet->PCM decoder. */ - lprintf("all three headers parsed. initializing decoder.\n"); - /* initialize central decode state */ - vorbis_synthesis_init(&this->vd,&this->vi); - /* initialize local state for most of the decode so multiple - * block decodes can proceed in parallel. We could init - * multiple vorbis_block structures for vd here */ - vorbis_block_init(&this->vd,&this->vb); + /* reset accumultaion buffer */ + this->size = 0; + + if ( (buf->decoder_flags & BUF_FLAG_HEADER) && + !(buf->decoder_flags & BUF_FLAG_STDHEADER) ) { + + lprintf ("%d headers to go\n", this->header_count); + + if (this->header_count) { + int res = 0; + + if (this->header_count == 3) + this->op.b_o_s = 1; + + if ( (res = vorbis_synthesis_headerin(&this->vi,&this->vc,&this->op)) < 0 ) { + /* error case; not a vorbis header */ + xine_log(this->stream->xine, XINE_LOG_MSG, "libvorbis: this bitstream does not contain vorbis audio data. Following first 64 bytes (return: %d).\n", res); + xine_hexdump((char *)this->op.packet, this->op.bytes < 64 ? this->op.bytes : 64); + return; + } + + this->header_count--; + + if (!this->header_count) { + + int mode = AO_CAP_MODE_MONO; + + get_metadata (this); + + mode = _x_ao_channels2mode(this->vi.channels); + + this->convsize=MAX_NUM_SAMPLES/this->vi.channels; + + if (!this->output_open) { + this->output_open = (this->stream->audio_out->open) (this->stream->audio_out, + this->stream, + 16, + this->vi.rate, + mode) ; + + _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, + this->vi.bitrate_nominal); + + } + + /* OK, got and parsed all three headers. Initialize the Vorbis + * packet->PCM decoder. */ + lprintf("all three headers parsed. initializing decoder.\n"); + /* initialize central decode state */ + vorbis_synthesis_init(&this->vd,&this->vi); + /* initialize local state for most of the decode so multiple + * block decodes can proceed in parallel. We could init + * multiple vorbis_block structures for vd here */ + vorbis_block_init(&this->vd,&this->vb); + } } - } - - } else if (this->output_open) { - - float **pcm; - int samples; - - if(vorbis_synthesis(&this->vb,&this->op)==0) - vorbis_synthesis_blockin(&this->vd,&this->vb); - - if (buf->pts!=0) - this->pts=buf->pts; - - while ((samples=vorbis_synthesis_pcmout(&this->vd,&pcm))>0){ - - /* **pcm is a multichannel float vector. In stereo, for - * example, pcm[0][...] is left, and pcm[1][...] is right. - * samples is the size of each channel. Convert the float - * values (-1.<=range<=1.) to whatever PCM format and write - * it out - */ - - int i,j; - int bout=(samplesconvsize?samples:this->convsize); - audio_buffer_t *audio_buffer; - - audio_buffer = this->stream->audio_out->get_buffer (this->stream->audio_out); - - /* convert floats to 16 bit signed ints (host order) and - interleave */ - for(i=0;ivi.channels;i++){ - ogg_int16_t *ptr=audio_buffer->mem+i; - float *mono=pcm[i]; - for(j=0;j32767){ - val=32767; - } else if(val<-32768){ - val=-32768; - } - *ptr=val; - ptr+=this->vi.channels; - } + + } else if (this->output_open) { + + float **pcm; + int samples; + + if(vorbis_synthesis(&this->vb,&this->op)==0) + vorbis_synthesis_blockin(&this->vd,&this->vb); + + if (buf->pts!=0) + this->pts=buf->pts; + + while ((samples=vorbis_synthesis_pcmout(&this->vd,&pcm))>0){ + + /* **pcm is a multichannel float vector. In stereo, for + * example, pcm[0][...] is left, and pcm[1][...] is right. + * samples is the size of each channel. Convert the float + * values (-1.<=range<=1.) to whatever PCM format and write + * it out + */ + + int i,j; + int bout=(samplesconvsize?samples:this->convsize); + audio_buffer_t *audio_buffer; + + audio_buffer = this->stream->audio_out->get_buffer (this->stream->audio_out); + + /* convert floats to 16 bit signed ints (host order) and + interleave */ + for(i=0;ivi.channels;i++){ + ogg_int16_t *ptr=audio_buffer->mem+i; + float *mono=pcm[i]; + for(j=0;j32767){ + val=32767; + } else if(val<-32768){ + val=-32768; + } + *ptr=val; + ptr+=this->vi.channels; + } + } + + audio_buffer->vpts = this->pts; + this->pts=0; + audio_buffer->num_frames = bout; + + this->stream->audio_out->put_buffer (this->stream->audio_out, audio_buffer, this->stream); + + buf->pts=0; + + /* tell libvorbis how many samples we actually consumed */ + vorbis_synthesis_read(&this->vd,bout); } - - audio_buffer->vpts = this->pts; - this->pts=0; - audio_buffer->num_frames = bout; - - this->stream->audio_out->put_buffer (this->stream->audio_out, audio_buffer, this->stream); - - buf->pts=0; - - /* tell libvorbis how many samples we actually consumed */ - vorbis_synthesis_read(&this->vd,bout); + } else { + lprintf("output not open\n"); } - } else { - lprintf("output not open\n"); } } @@ -299,6 +327,10 @@ static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen, this->header_count = 3; this->convsize = 0; + this->bufsize = INIT_BUFSIZE; + this->buf = xine_xmalloc(INIT_BUFSIZE); + this->size = 0; + vorbis_info_init(&this->vi); vorbis_comment_init(&this->vc); -- cgit v1.2.3 From 88f40cf978d542151b289b4ca1ded713b6eb812a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 13 Jan 2008 17:48:08 +0000 Subject: Bump version no. ready for what I expect to be the next release. --HG-- extra : transplant_source : q%B3q%EEC%D4p%E7%7F%8Eb%BE%F8%81%D3c%F6%C8%1AF --- ChangeLog | 2 ++ configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f7e8b3243..1b4526e66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +xine-lib (1.1.10) (unreleased) + xine-lib (1.1.9.1) * Security fixes: - Fix a buffer overflow in RTSP header-handling code. (CVE-2008-0225) diff --git a/configure.ac b/configure.ac index f92318924..813c5c83a 100644 --- a/configure.ac +++ b/configure.ac @@ -16,9 +16,9 @@ dnl XINE_SUB += 1; XINE_PATCH = ''; continue with XINE_LT_* values below dnl XINE_MAJOR=1 XINE_MINOR=1 -XINE_SUB=9 +XINE_SUB=10 # XINE_PATCH should be left empty or set to ".1" or ".2" or something similar -XINE_PATCH=.1 +XINE_PATCH= #if test $XINE_SUB -eq 0 ; then # XINE_SUBPART=""; -- cgit v1.2.3 From 934857924c40f5fc075359f8ad60bf49e4687d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 14 Jan 2008 19:45:14 +0100 Subject: Support all the extensions reported by xiph's documentation (plus ogm). --- src/demuxers/demux_ogg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 9ed39f12d..43ab3cb36 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -2155,7 +2155,7 @@ static const char *ogg_get_identifier (demux_class_t *this_gen) { } static const char *ogg_get_extensions (demux_class_t *this_gen) { - return "ogg ogm spx"; + return "ogx ogv oga ogg spx ogm"; } static const char *ogg_get_mimetypes (demux_class_t *this_gen) { -- cgit v1.2.3 From 7558fb41b257c2d05e243c9c3640bf5c08c4808d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 14 Jan 2008 20:05:42 +0100 Subject: Update mimetypes for Annodex and Ogg. --- src/demuxers/demux_ogg.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 43ab3cb36..d1b522727 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -2118,7 +2118,9 @@ static const char *anx_get_extensions (demux_class_t *this_gen) { } static const char *anx_get_mimetypes (demux_class_t *this_gen) { - return "application/x-annodex: ogg: Annodex media;"; + return "application/annodex: anx: Annodex media;" + "audio/annodex: axa: Annodex audio;" + "video/annodex: axv: Annodex video;"; } static void anx_class_dispose (demux_class_t *this_gen) { @@ -2159,10 +2161,9 @@ static const char *ogg_get_extensions (demux_class_t *this_gen) { } static const char *ogg_get_mimetypes (demux_class_t *this_gen) { - return "audio/x-ogg: ogg: OggVorbis Audio;" - "audio/x-speex: ogg: Speex Audio;" - "application/x-ogg: ogg: Ogg Stream;" - "application/ogg: ogg: Ogg Stream;"; + return "application/ogg: ogx: Ogg Stream;" + "audio/ogg: oga: Ogg Audio;" + "video/ogg: ogv: Ogg Video;"; } static void ogg_class_dispose (demux_class_t *this_gen) { -- cgit v1.2.3 From 748929e7950069870e350668542814c3ee0fd2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Mon, 14 Jan 2008 20:06:44 +0100 Subject: ChangeLog entries for the last two revisions. --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index 1b4526e66..cdcab1d00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ xine-lib (1.1.10) (unreleased) + * Update Ogg and Annodex mimetypes and extensions. xine-lib (1.1.9.1) * Security fixes: -- cgit v1.2.3 From 0c0e9b541318da072be829d920d5ae47676d3dba Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 14 Jan 2008 22:59:05 +0000 Subject: Bump the Debian package version no. --HG-- extra : transplant_source : %D9%DE%C7%C9%CB%D9%84%1E%A2%A0%AD%A9%E1%C27%EA%C6%E5%A3A --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 91999074d..6c3d1ab7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xine-lib (1.1.9~hg-0) unstable; urgency=low +xine-lib (1.1.10~hg-0) unstable; urgency=low [ Darren Salt ] * Hg snapshot. @@ -7,7 +7,7 @@ xine-lib (1.1.9~hg-0) unstable; urgency=low * remove gs from build-dependencies * change the maintainer field to xine-devel@lists.sourceforge.net. - -- Reinhard Tartler Sun, 25 Nov 2007 23:45:52 +0100 + -- Darren Salt Mon, 14 Jan 2008 22:57:42 +0000 xine-lib (1.1.5~cvs-0) unstable; urgency=low -- cgit v1.2.3 From bc09805e004f1a68d7a632a38ed6309f6c9ec356 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Mon, 14 Jan 2008 23:24:15 +0000 Subject: Change the default v4l device paths to /dev/{video,radio}0. --- ChangeLog | 1 + src/input/input_v4l.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdcab1d00..ec47096eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ xine-lib (1.1.10) (unreleased) * Update Ogg and Annodex mimetypes and extensions. + * Change the default v4l device paths to /dev/video0 and /dev/radio0. xine-lib (1.1.9.1) * Security fixes: diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c index b43a2684a..34f6a0684 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -91,8 +91,8 @@ static const resolution_t resolutions[] = { }; #define NUM_RESOLUTIONS (sizeof(resolutions)/sizeof(resolutions[0])) -#define RADIO_DEV "/dev/v4l/radio0" -#define VIDEO_DEV "/dev/v4l/video0" +#define RADIO_DEV "/dev/radio0" +#define VIDEO_DEV "/dev/video0" #if !defined(NDELAY) && defined(O_NDELAY) #define FNDELAY O_NDELAY -- cgit v1.2.3 From c13524a87fb997ef260d397a0e14d5649af323ef Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 Jan 2008 16:00:49 +0000 Subject: Update documentation to match filename-parsing changes in 1.1.9. [Bug 22] --- doc/faq/faq.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/faq/faq.sgml b/doc/faq/faq.sgml index 9743cf361..77502d618 100644 --- a/doc/faq/faq.sgml +++ b/doc/faq/faq.sgml @@ -946,7 +946,7 @@ Latest xine-lib modules (1-beta3 or newer) support external subtitles for any media file, not only AVI. In order to use it you can pass a special MRL construction like: -    xine test.mpg#subtitle:file.sub +    xine file://path/to/test.mpg#subtitle:/path/to/file.sub The external subtitles support can also be used by any xine frontend. Currently xine-ui and kaffeine implement this feature with a subtitle selection dialog. -- cgit v1.2.3 From 4b30fc7d0ad482d4449703e9270df933cdd755ee Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 17 Jan 2008 16:13:23 +0000 Subject: Update the copyright info in the FAQ list. --- doc/faq/faq.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/faq/faq.sgml b/doc/faq/faq.sgml index 77502d618..1176024e0 100644 --- a/doc/faq/faq.sgml +++ b/doc/faq/faq.sgml @@ -6,7 +6,7 @@ The xine engine FAQ xine FAQ - 2001-2003 + 2001-2008 the xine project team -- cgit v1.2.3