From 2bfb6dff24f97526f9b32281b959b1ce53634ee9 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 25 Nov 2007 23:43:24 +0100 Subject: * remove gs from build-dependencies --- debian/changelog | 6 +++++- debian/control | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf11720e1..63a8846f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,12 @@ xine-lib (1.1.9~hg-0) unstable; urgency=low + [ Darren Salt ] * Hg snapshot. - -- Darren Salt Mon, 03 Sep 2007 16:12:52 +0100 + [ Reinhard Tartler ] + * remove gs from build-dependencies + + -- Reinhard Tartler Sun, 25 Nov 2007 23:42:56 +0100 xine-lib (1.1.5~cvs-0) unstable; urgency=low diff --git a/debian/control b/debian/control index 59d20030e..44bc806fd 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,7 @@ Build-Depends: debhelper (>= 5.0.1), binutils (>= 2.12.90.0.9), pkg-config, 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, gs, sgmltools-lite + w3m, transfig, sgmltools-lite Build-Conflicts: libdvdnav-dev, libvcdinfo-dev Standards-Version: 3.7.2 -- cgit v1.2.3 From ef67dfaf62538c9feeb56415a0b5af7fde3bdf80 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 25 Nov 2007 23:46:01 +0100 Subject: * change the maintainer field to xine-devel@lists.sourceforge.net. --- debian/changelog | 3 ++- debian/control | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 63a8846f9..91999074d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,9 @@ xine-lib (1.1.9~hg-0) unstable; urgency=low [ Reinhard Tartler ] * remove gs from build-dependencies + * change the maintainer field to xine-devel@lists.sourceforge.net. - -- Reinhard Tartler Sun, 25 Nov 2007 23:42:56 +0100 + -- Reinhard Tartler Sun, 25 Nov 2007 23:45:52 +0100 xine-lib (1.1.5~cvs-0) unstable; urgency=low diff --git a/debian/control b/debian/control index 44bc806fd..c5e325e9a 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,7 @@ Source: xine-lib Section: libs Priority: optional -Maintainer: Siggi Langauf -Uploaders: Philipp Matthias Hahn , Reinhard Tartler +Maintainer: xine Developers Build-Depends: debhelper (>= 5.0.1), binutils (>= 2.12.90.0.9), pkg-config, automake1.9, autoconf, libtool, libxcb-xinerama0-dev | libxv-dev (<< 1:1.0.3), libxcb-xv0-dev | libxv-dev (<< 1:1.0.3), -- cgit v1.2.3 From 6e5977c7083ad6d9df50049c25a046f180056229 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Fri, 30 Nov 2007 00:55:54 +0000 Subject: Remove pointless "several MRLs" text; move that paragraph up a bit. --- doc/man/en/xine.5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/man/en/xine.5 b/doc/man/en/xine.5 index 4726f1105..7a9357640 100644 --- a/doc/man/en/xine.5 +++ b/doc/man/en/xine.5 @@ -79,15 +79,14 @@ to read from. Valid MRLs may be plain file names or one of the following .BR rtsp://... " (requires Real codecs)" .br .LP +Additional input plugins will provide additional MRL types. The ones listed +above are available with stock libxine. + \fBNOTE:\fP where a file name is required, the \fIfull path must be provided\fP - from a shell, you can use \fB"$PWD/file"\fP or \fB"$(pwd)/file"\fP or \fB"\`pwd\`/file"\fP if the file is in the current directory. (Which one depends on your shell; all three work in bash.) -Several MRLs may be specified in order to play a number of consecutive -streams. Additional input plugins will provide additional MRL types. The ones -listed above are available with stock libxine... - As of xine-lib 1.1.3, the DVD title number may be 0 (select navigation) and the chapter number may be 0 (full title). -- cgit v1.2.3 From ad59ad1d662d29c4ac3644c8fc6a2c428e2ed2c8 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Mon, 3 Dec 2007 17:01:04 +0100 Subject: ChangeLog entries for my patches --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 23ca358e8..469faf8b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ xine-lib (1.1.9) (unreleased) This requires conversion to UTF-8 of entities with codes >= 128. * Fixed ATSC support. [Bug 1749508] * Fixed a possible DVB plugin crash when switching channels. + * Fixed ogg demuxer to not discard data at the end of the stream. + * Fixed deadlock on ao_close while paused. + * Nicer wakeup behaviour, using select instead of nanosleep (800 -> 100 + wakeups/s). xine-lib (1.1.8) * Send a channel-changed event to the frontend when receiving the SYNC -- cgit v1.2.3 From cad22619cdb867490ebfb59069f0aa472620edc5 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Sun, 2 Dec 2007 22:48:36 +0100 Subject: Fixed ALSA close function to not discard all data that had been written but not played yet. When closing the pcm device make sure that everything that was written to the device actually gets played. This was the race we were seeing with Ogg Vorbis and wav playback where a delayed driver->close would fix playback. Notice that blocking mode needs to be used for snd_pcm_drain, otherwise the call would be a noop. --- ChangeLog | 2 ++ src/audio_out/audio_alsa_out.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 469faf8b8..a4a680bbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,8 @@ xine-lib (1.1.9) (unreleased) * Fixed deadlock on ao_close while paused. * Nicer wakeup behaviour, using select instead of nanosleep (800 -> 100 wakeups/s). + * Fixed ALSA close function to not discard all data that had been written + but not played yet. xine-lib (1.1.8) * Send a channel-changed event to the frontend when receiving the SYNC diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index e92bfbb3a..4ce2b1be3 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -856,7 +856,11 @@ static int ao_alsa_write(ao_driver_t *this_gen, int16_t *data, uint32_t count) { static void ao_alsa_close(ao_driver_t *this_gen) { alsa_driver_t *this = (alsa_driver_t *) this_gen; - if(this->audio_fd) snd_pcm_close(this->audio_fd); + if(this->audio_fd) { + snd_pcm_nonblock(this->audio_fd, 0); + snd_pcm_drain(this->audio_fd); + snd_pcm_close(this->audio_fd); + } this->audio_fd = NULL; this->has_pause_resume = 0; /* This is set at open time */ } -- cgit v1.2.3 From 5a7b7dcb302085db68a44f7f7acb6e4abbb73a75 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Sun, 2 Dec 2007 22:59:23 +0100 Subject: remove redundant check buf must be != NULL because of the while(!fifo->first) before and the buf->next after --- src/xine-engine/audio_out.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 7e43fb5cf..0c37b8d1f 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -358,22 +358,19 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { buf = fifo->first; - if (buf) { - fifo->first = buf->next; - - if (!fifo->first) { + fifo->first = buf->next; - fifo->last = NULL; - fifo->num_buffers = 0; - pthread_cond_signal (&fifo->empty); + if (!fifo->first) { - } else - fifo->num_buffers--; + fifo->last = NULL; + fifo->num_buffers = 0; + pthread_cond_signal (&fifo->empty); - } + } else + fifo->num_buffers--; buf->next = NULL; - + return buf; } -- cgit v1.2.3 From fc74afb82c232221a4205579e1eddb26a91d1c26 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Sun, 2 Dec 2007 23:03:46 +0100 Subject: Don't signal fifo->empty right after reading the last buffer but only when a read was requested and the fifo is empty. Rationale: ao_close uses fifo_wait_empty to make sure all buffers were written to the driver before it calls close on the driver. But if empty is already signaled when ao_loop just reads the next buffer then ao_close might close the driver before ao_loop has a chance to send the buffer to the driver. --- src/xine-engine/audio_out.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 0c37b8d1f..de74ac578 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -364,7 +364,6 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { fifo->last = NULL; fifo->num_buffers = 0; - pthread_cond_signal (&fifo->empty); } else fifo->num_buffers--; -- cgit v1.2.3 From 948b8dd9bfc33de61ff8c8bacf32eae53aa3b528 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Sun, 2 Dec 2007 23:43:03 +0100 Subject: silence stdout of ogg demuxer --- 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 2c06f14ca..4eacf7070 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -239,7 +239,7 @@ static int read_ogg_packet (demux_ogg_t *this) { bytes = this->input->read(this->input, buffer, CHUNKSIZE); if (bytes == 0) { if (total == 0) { - printf("read_ogg_packet read nothing\n"); + lprintf("read_ogg_packet read nothing\n"); return 0; } break; -- cgit v1.2.3 From b312cde90d985df949beac9708476af28bc82113 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Mon, 3 Dec 2007 16:47:53 +0100 Subject: Fixed a race condition between ao_loop and ao_close to not lose the last buffer. In ao_loop only read the first buffer and remove it from the fifo only when the buffer has been written or is about to be discarded. This fixes the race between ao_loop and ao_close for good. Now fifo_remove_int may signal empty again right after removing the last buffer from the fifo. --- ChangeLog | 2 ++ src/xine-engine/audio_out.c | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4a680bbd..97dd87f94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ xine-lib (1.1.9) (unreleased) wakeups/s). * Fixed ALSA close function to not discard all data that had been written but not played yet. + * Fixed a race condition between ao_loop and ao_close to not lose the last + buffer. xine-lib (1.1.8) * Send a channel-changed event to the frontend when receiving the SYNC diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index de74ac578..7519c3067 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -338,9 +338,7 @@ static void fifo_append (audio_fifo_t *fifo, pthread_mutex_unlock (&fifo->mutex); } -static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { - audio_buffer_t *buf; - +static audio_buffer_t *fifo_peek_int (audio_fifo_t *fifo, int blocking) { while (!fifo->first) { pthread_cond_signal (&fifo->empty); if (blocking) @@ -355,8 +353,11 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { return NULL; } } + return fifo->first; +} - buf = fifo->first; +static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { + audio_buffer_t *buf = fifo_peek_int(fifo, blocking); fifo->first = buf->next; @@ -364,6 +365,7 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { fifo->last = NULL; fifo->num_buffers = 0; + pthread_cond_signal (&fifo->empty); } else fifo->num_buffers--; @@ -373,6 +375,17 @@ static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { return buf; } +static audio_buffer_t *fifo_peek (audio_fifo_t *fifo) { + + audio_buffer_t *buf; + + pthread_mutex_lock (&fifo->mutex); + buf = fifo_peek_int(fifo, 1); + pthread_mutex_unlock (&fifo->mutex); + + return buf; +} + static audio_buffer_t *fifo_remove (audio_fifo_t *fifo) { audio_buffer_t *buf; @@ -994,7 +1007,7 @@ static void *ao_loop (void *this_gen) { if (!in_buf) { lprintf ("loop: get buf from fifo\n"); - in_buf = fifo_remove (this->out_fifo); + in_buf = fifo_peek (this->out_fifo); bufs_since_sync++; lprintf ("got a buffer\n"); } @@ -1007,6 +1020,7 @@ static void *ao_loop (void *this_gen) { } if (this->discard_buffers) { + fifo_remove (this->out_fifo); if (in_buf->stream) _x_refcounter_dec(in_buf->stream->refcounter); fifo_append (this->free_fifo, in_buf); @@ -1033,6 +1047,7 @@ static void *ao_loop (void *this_gen) { cur_time = this->clock->get_current_time (this->clock); if (in_buf->vpts < cur_time ) { lprintf ("loop: next fifo\n"); + fifo_remove (this->out_fifo); if (in_buf->stream) _x_refcounter_dec(in_buf->stream->refcounter); fifo_append (this->free_fifo, in_buf); @@ -1157,6 +1172,7 @@ static void *ao_loop (void *this_gen) { /* drop package */ lprintf ("loop: drop package, next fifo\n"); + fifo_remove (this->out_fifo); if (in_buf->stream) _x_refcounter_dec(in_buf->stream->refcounter); fifo_append (this->free_fifo, in_buf); @@ -1223,6 +1239,7 @@ static void *ao_loop (void *this_gen) { } else { result = 0; } + fifo_remove (this->out_fifo); if( result < 0 ) { /* device unplugged. */ -- cgit v1.2.3 From 0aa00fb217357cee4ef1008677e1247bb24eb42c Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Tue, 4 Dec 2007 00:43:27 +0100 Subject: fifo_peek_int can return NULL (when non-blocking). make fifo_remove_int handle that case --- src/xine-engine/audio_out.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index 7519c3067..7fe92d9fe 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -358,6 +358,8 @@ static audio_buffer_t *fifo_peek_int (audio_fifo_t *fifo, int blocking) { static audio_buffer_t *fifo_remove_int (audio_fifo_t *fifo, int blocking) { audio_buffer_t *buf = fifo_peek_int(fifo, blocking); + if (!buf) + return NULL; fifo->first = buf->next; -- cgit v1.2.3