summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-02-17 02:13:48 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-02-17 02:13:48 +0000
commitb4eea697942773917c2b4c8b932e246227ba01d4 (patch)
treeedf23a85851f62c37af20d3d2ed2ddbae73f42a2
parentc86104fa7a18ef14551249901ef9ade96ae46998 (diff)
parente554df7addfea632ef9ae4be09049f459710bbe6 (diff)
downloadxine-lib-b4eea697942773917c2b4c8b932e246227ba01d4.tar.gz
xine-lib-b4eea697942773917c2b4c8b932e246227ba01d4.tar.bz2
Merge from 1.1.
--HG-- rename : doc/faq/faq.sgml => doc/faq/faq.docbook rename : doc/hackersguide/intro.sgml => doc/hackersguide/intro.docbook
-rw-r--r--ChangeLog3
-rw-r--r--README2
-rw-r--r--debian/watch2
-rw-r--r--doc/faq/faq.docbook2
-rw-r--r--doc/hackersguide/intro.docbook4
-rw-r--r--doc/internal/HOWTO.release22
-rw-r--r--doc/man/en/xine.54
-rw-r--r--misc/xine-lib.spec.in4
-rw-r--r--src/combined/ffmpeg/Makefile.am3
-rwxr-xr-xsrc/combined/ffmpeg/mkcodeclist.pl4
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c2
-rw-r--r--src/xine-engine/audio_out.c19
-rw-r--r--src/xine-engine/xine.c15
13 files changed, 58 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e250d002..95cb53ab3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,6 +71,9 @@ xine-lib (1.1.90) (Unreleased)
xine-lib (1.1.17) 2009-??-??
* Enable libmpeg2new. This is not yet production code; the old mpeg2
decoder remains the default.
+ * Fix a build failure on *BSD due to some rather useful GNUisms.
+ * Protect audio loop so it cannot write to a paused device (fix
+ pause/resume freeze with pulseaudio).
xine-lib (1.1.16.2) 2009-02-10
* Build fixes related to ImageMagick 6.4 & later.
diff --git a/README b/README
index 349fdd2b1..ce6e85d0d 100644
--- a/README
+++ b/README
@@ -19,7 +19,7 @@ Individual frontends (e.g. xine-ui, gxine, totem, ...) may provide
additional documentation in their packages.
For more information on xine features (supported multimedia formats etc.)
-see the xine homepage, located at http://xinehq.de/
+see the xine homepage, located at http://www.xine-project.org/
The xine-lib XML parser (src/xine-utils/xmlparser.[ch] and
src/xine-utils/xmllexer.[ch]) is released under the GNU LGPL, see COPYING.LIB
diff --git a/debian/watch b/debian/watch
index c82dbbc10..d3a4d7702 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
version=3
-http://xinehq.de/index.php/releases \
+http://www.xine-project.org/releases \
(?:.*/)?xine/xine-lib-([\d\.]*).tar.gz \
debian uupdate
diff --git a/doc/faq/faq.docbook b/doc/faq/faq.docbook
index 4eb947e06..641cd1c08 100644
--- a/doc/faq/faq.docbook
+++ b/doc/faq/faq.docbook
@@ -201,7 +201,7 @@
tools for further info.
You can also find links to third parties providing xine RPMs on
the xine homepage at
- <ulink url="http://xinehq.de/index.php/releases">http://xinehq.de/index.php/releases</ulink>.
+ <ulink url="http://www.xine-project.org/releases">http://www.xine-project.org/releases</ulink>.
</para>
<para>
See the next section of this FAQ for instructions on how to build xine
diff --git a/doc/hackersguide/intro.docbook b/doc/hackersguide/intro.docbook
index c7dce6254..4e96d2de1 100644
--- a/doc/hackersguide/intro.docbook
+++ b/doc/hackersguide/intro.docbook
@@ -6,7 +6,7 @@
<para>
You are currently looking at a piece of documentation for xine.
xine is a free video player. It lives on
- <ulink url="http://xinehq.de/">http://xinehq.de/</ulink>. Specifically
+ <ulink url="http://www.xine-project.org/">http://www.xine-project.org/</ulink>. Specifically
this document goes under the moniker of the "xine Hackers' Guide".
</para>
</sect1>
@@ -36,7 +36,7 @@
</para>
<para>
New versions of this document can also be obtained from the xine web site:
- <ulink url="http://xinehq.de/">http://xinehq.de/</ulink>.
+ <ulink url="http://www.xine-project.org/">http://www.xine-project.org/</ulink>.
</para>
</sect1>
diff --git a/doc/internal/HOWTO.release b/doc/internal/HOWTO.release
index 2128ca391..38532aac0 100644
--- a/doc/internal/HOWTO.release
+++ b/doc/internal/HOWTO.release
@@ -127,15 +127,19 @@ hands.
(also make sure it gets immediately approved by the xine-announce
moderator!)
-12) write the announcement for xinehq:
- You need to login on xinehq and use your admin privileges to create a
- news article in the "New Releases" section. Include a link to the
- SourceForge Release notes/Changelog page and one to the download page.
-
- Warning: triple-check that you get the HTML correct! If you have
- unmatched quotes, you might break the whole website so that it
- can only be repaired by manually fiddling with mysql to get the
- HTML right!
+12) write the announcement for xine-project.org:
+ You need to have an account on alioth.debian.org and a checked-out copy
+ of ssh://hg.debian.org//hg/xine-lib/xine-project-www/ (using Mercurial).
+ Add the new news item near the top of pages/news/items.xml (use the
+ provided template), run update.sh (requires xsltproc; if this fails,
+ re-edit), check that it looks fine in a convenient browser, then commit
+ and push the change. At present, you will need to request a web site
+ update via #xine on irc.oftc.net or by contacting a site admin.
+
+ You should include a link to the SourceForge Release notes/Changelog
+ page and one to the download page.
+
+ Warning: triple-check that you get the XML correct!
13) write the Freshmeat announcement:
use your freshmeat account to log into their website, if you aren't
diff --git a/doc/man/en/xine.5 b/doc/man/en/xine.5
index 9fa19c0cc..a278e9acf 100644
--- a/doc/man/en/xine.5
+++ b/doc/man/en/xine.5
@@ -347,8 +347,8 @@ stream.
.br
The programs are documented fully on the xine home page:
-.UR http://xinehq.de/
-.IR "http://xinehq.de/"
+.UR http://www.xine-project.org/
+.IR "http://www.xine-project.org/"
.UE
.SH AUTHOR
This text was extracted from the xine man page by Darren Salt
diff --git a/misc/xine-lib.spec.in b/misc/xine-lib.spec.in
index 0b7c78ed4..1874514e5 100644
--- a/misc/xine-lib.spec.in
+++ b/misc/xine-lib.spec.in
@@ -76,8 +76,8 @@ Version: %{version}
Release: %{release}
License: GPL
Group: Development/Libraries
-URL: http://xinehq.de
-Source: http://xinehq.de/files/@PACKAGE@-@VERSION@.tar.bz2
+URL: http://www.xine-project.org
+Source: http://prdownloads.sourceforge.net/xine/@PACKAGE@-@VERSION@.tar.bz2
Packager: Manfred Tremmel <Manfred.Tremmel@iiv.de>
Obsoletes: xine
Obsoletes: xine-lib
diff --git a/src/combined/ffmpeg/Makefile.am b/src/combined/ffmpeg/Makefile.am
index 536f4d7f6..ef19cf797 100644
--- a/src/combined/ffmpeg/Makefile.am
+++ b/src/combined/ffmpeg/Makefile.am
@@ -36,8 +36,7 @@ avcodec_video.list: AV_CODECS:=/CODEC_ID_MPEG1VIDEO/,/CODEC_ID_PCM_S16LE/
avcodec_audio.list avcodec_video.list:
echo '#include "$(srcdir)/ffmpeg_decoder.h"' | $(AV_CPP) - |\
- sed -e $(AV_CODECS)'! d; s/^\s*//; s/[=,].*//; /^$$/ d' |\
- head -n -1 >$@
+ sed -e $(AV_CODECS)'! d; s/^[ \t]*//; s/[=,].*//; /^$$/ d' >$@
# Generate the mappings. These are #included where needed.
ff_%_list.h: $(srcdir)/mkcodeclist.pl avcodec_%.list $(srcdir)/xine_%.list
diff --git a/src/combined/ffmpeg/mkcodeclist.pl b/src/combined/ffmpeg/mkcodeclist.pl
index 10901552a..311d147af 100755
--- a/src/combined/ffmpeg/mkcodeclist.pl
+++ b/src/combined/ffmpeg/mkcodeclist.pl
@@ -12,10 +12,12 @@ my $line;
# Read in the ffmpeg codec IDs
my %codecs;
open LIST, "< $ffmpeg" or die $!;
-while (defined ($line = <LIST>)) {
+$line = <LIST>;
+while (defined $line) {
chomp $line;
$line =~ s/^CODEC_ID_//o;
$codecs{$line} = 0;
+ $line = <LIST>;
}
close LIST or die $!;
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 569634e08..8b12ca459 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -20,7 +20,7 @@
/*
These are plugin routines called by the xine engine. See
Chapter 4. Extending xine's input
- http://xinehq.de/index.php/hackersguide/index.php?resource=5.3&action=default#INPUT
+ http://www.xine-project.org/hackersguide#INPUT
and the comments in input_plugin.h
This is what is referred to below a "the xine plugin spec"
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index cf202cf8f..348431114 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -247,6 +247,7 @@ typedef struct {
audio_fifo_t *free_fifo;
audio_fifo_t *out_fifo;
int64_t last_audio_vpts;
+ pthread_mutex_t current_speed_lock;
uint32_t current_speed; /* the current playback speed */
/* FIXME: replace all this->clock->speed with this->current_speed. we should make
* sure nobody will change speed without going through xine.c:set_speed_internal */
@@ -1042,6 +1043,7 @@ static void *ao_loop (void *this_gen) {
* we must process/free buffers otherwise the entire engine will stop.
*/
+ pthread_mutex_lock(&this->current_speed_lock);
if ( this->audio_loop_running &&
(this->clock->speed == XINE_SPEED_PAUSE ||
(this->clock->speed != XINE_FINE_SPEED_NORMAL &&
@@ -1057,6 +1059,7 @@ static void *ao_loop (void *this_gen) {
_x_refcounter_dec(in_buf->stream->refcounter);
fifo_append (this->free_fifo, in_buf);
in_buf = NULL;
+ pthread_mutex_unlock(&this->current_speed_lock);
continue;
}
@@ -1067,6 +1070,7 @@ static void *ao_loop (void *this_gen) {
}
lprintf ("loop:pause: I feel sleepy (%d buffers).\n", this->out_fifo->num_buffers);
+ pthread_mutex_unlock(&this->current_speed_lock);
xine_usec_sleep (10000);
lprintf ("loop:pause: I wake up.\n");
continue;
@@ -1276,6 +1280,7 @@ static void *ao_loop (void *this_gen) {
fifo_append (this->free_fifo, in_buf);
in_buf = NULL;
}
+ pthread_mutex_unlock(&this->current_speed_lock);
/* Give other threads a chance to use functions which require this->driver_lock to
* be available. This is needed when using NPTL on Linux (and probably PThreads
@@ -1686,6 +1691,7 @@ static void ao_exit(xine_audio_port_t *this_gen) {
free (this->frame_buf[1]);
free (this->zero_space);
+ pthread_mutex_destroy(&this->current_speed_lock);
pthread_mutex_destroy(&this->flush_audio_driver_lock);
pthread_cond_destroy(&this->flush_audio_driver_reached);
@@ -1912,8 +1918,15 @@ static int ao_set_property (xine_audio_port_t *this_gen, int property, int value
if (value != XINE_FINE_SPEED_NORMAL && value != XINE_SPEED_PAUSE && !this->slow_fast_audio )
this->ao.control(&this->ao, AO_CTRL_FLUSH_BUFFERS, NULL);
- this->ao.control(&this->ao,
- (value == XINE_SPEED_PAUSE) ? AO_CTRL_PLAY_PAUSE : AO_CTRL_PLAY_RESUME, NULL);
+ if( value == XINE_SPEED_PAUSE ) {
+ /* current_speed_lock is here to make sure the ao_loop will pause in a safe place.
+ * that is, we cannot pause writing to device, filling gaps etc. */
+ pthread_mutex_lock(&this->current_speed_lock);
+ this->ao.control(&this->ao, AO_CTRL_PLAY_PAUSE, NULL);
+ pthread_mutex_unlock(&this->current_speed_lock);
+ } else {
+ this->ao.control(&this->ao, AO_CTRL_PLAY_RESUME, NULL);
+ }
this->current_speed = value;
if( this->slow_fast_audio )
ao_update_resample_factor(this);
@@ -2058,6 +2071,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver,
this->driver = driver;
this->xine = xine;
this->clock = xine->clock;
+ this->current_speed = xine->clock->speed;
this->streams = xine_list_new();
/* warning: driver_lock is a recursive mutex. it must NOT be
@@ -2089,6 +2103,7 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver,
this->discard_buffers = 0;
this->zero_space = calloc (1, ZERO_BUF_SIZE * 4 * 6); /* MAX as 32bit, 6 channels. */
+ pthread_mutex_init( &this->current_speed_lock, NULL );
pthread_mutex_init( &this->flush_audio_driver_lock, NULL );
pthread_cond_init( &this->flush_audio_driver_reached, NULL );
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 86b099922..1299b0f01 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -367,17 +367,20 @@ static xine_ticket_t *XINE_MALLOC ticket_init(void) {
static void set_speed_internal (xine_stream_t *stream, int speed) {
xine_t *xine = stream->xine;
+ int old_speed = xine->clock->speed;
- if (xine->clock->speed != XINE_SPEED_PAUSE && speed == XINE_SPEED_PAUSE)
+ if (old_speed != XINE_SPEED_PAUSE && speed == XINE_SPEED_PAUSE)
/* get all decoder and post threads in a state where they agree to be blocked */
xine->port_ticket->revoke(xine->port_ticket, 0);
- if (xine->clock->speed == XINE_SPEED_PAUSE && speed != XINE_SPEED_PAUSE)
+ if (old_speed == XINE_SPEED_PAUSE && speed != XINE_SPEED_PAUSE)
/* all decoder and post threads may continue now */
xine->port_ticket->issue(xine->port_ticket, 0);
- stream->xine->clock->set_fine_speed (stream->xine->clock, speed);
-
+ if (old_speed != XINE_SPEED_PAUSE && speed == XINE_SPEED_PAUSE)
+ /* set master clock so audio_out loop can pause in a safe place */
+ stream->xine->clock->set_fine_speed (stream->xine->clock, speed);
+
/* see coment on audio_out loop about audio_paused */
if( stream->audio_out ) {
xine->port_ticket->acquire(xine->port_ticket, 1);
@@ -387,6 +390,10 @@ static void set_speed_internal (xine_stream_t *stream, int speed) {
xine->port_ticket->release(xine->port_ticket, 1);
}
+
+ if (old_speed == XINE_SPEED_PAUSE || speed != XINE_SPEED_PAUSE)
+ /* master clock is set after resuming the audio device (audio_out loop may continue) */
+ stream->xine->clock->set_fine_speed (stream->xine->clock, speed);
}