rpms/xine-lib/EL-5 xine-lib-safe-audio-pause.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 sources, 1.11, 1.12 xine-lib-mk-autotools-patch.sh, 1.3, 1.4 xine-lib.spec, 1.24, 1.25

Rex Dieter rdieter at fedoraproject.org
Tue Feb 10 23:37:12 UTC 2009


Author: rdieter

Update of /cvs/pkgs/rpms/xine-lib/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6850

Modified Files:
	.cvsignore sources xine-lib-mk-autotools-patch.sh 
	xine-lib.spec 
Added Files:
	xine-lib-safe-audio-pause.patch 
Log Message:
* Tue Feb 10 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.2-1
- xine-lib-1.1.16.2


xine-lib-safe-audio-pause.patch:

--- NEW FILE xine-lib-safe-audio-pause.patch ---
diff -r ce4b1533a0af src/xine-engine/audio_out.c
--- a/src/xine-engine/audio_out.c	Sun Jan 11 22:24:42 2009 +0000
+++ b/src/xine-engine/audio_out.c	Sat Feb 07 15:09:24 2009 -0200
@@ -243,6 +243,7 @@
   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 */
@@ -1040,6 +1041,7 @@
      * 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 && 
@@ -1055,6 +1057,7 @@
 	    _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;
 	}
 
@@ -1065,6 +1068,7 @@
       }
 
       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;
@@ -1274,6 +1278,7 @@
       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
@@ -1684,6 +1689,7 @@
   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);
 
@@ -1910,11 +1916,15 @@
     if (value != XINE_FINE_SPEED_NORMAL && value != XINE_SPEED_PAUSE && !this->slow_fast_audio )
       this->ao.control(&this->ao, AO_CTRL_FLUSH_BUFFERS, NULL);
 
+    /* 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,
       	             (value == XINE_SPEED_PAUSE) ? AO_CTRL_PLAY_PAUSE : AO_CTRL_PLAY_RESUME, NULL);
     this->current_speed = value;
     if( this->slow_fast_audio )
       ao_update_resample_factor(this);
+    pthread_mutex_unlock(&this->current_speed_lock);
     break;
     
   default:
@@ -2056,6 +2066,7 @@
   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
@@ -2087,6 +2098,7 @@
   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 -r ce4b1533a0af src/xine-engine/xine.c
--- a/src/xine-engine/xine.c	Sun Jan 11 22:24:42 2009 +0000
+++ b/src/xine-engine/xine.c	Sat Feb 07 15:09:25 2009 -0200
@@ -330,17 +330,20 @@
 
 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);
@@ -350,6 +353,10 @@
     
     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);
 }
 
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xine-lib/EL-5/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- .cvsignore	23 Jan 2009 19:53:42 -0000	1.11
+++ .cvsignore	10 Feb 2009 23:36:41 -0000	1.12
@@ -1,2 +1,2 @@
-xine-lib-1.1.16.1-autotools.patch.bz2
-xine-lib-1.1.16.1-pruned.tar.bz2
+xine-lib-1.1.16.2-pruned.tar.bz2
+xine-lib-1.1.16.2-autotools.patch.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xine-lib/EL-5/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sources	23 Jan 2009 19:53:42 -0000	1.11
+++ sources	10 Feb 2009 23:36:41 -0000	1.12
@@ -1,2 +1,2 @@
-e3e061f93f36eae910b66cb0c973dbb8  xine-lib-1.1.16.1-autotools.patch.bz2
-aa1265b1007086c0906ec8134cfeacf6  xine-lib-1.1.16.1-pruned.tar.bz2
+e2c3a178be02f5c32957b2716123aa28  xine-lib-1.1.16.2-pruned.tar.bz2
+07bf186d51b8315026453a2f21b33703  xine-lib-1.1.16.2-autotools.patch.bz2


Index: xine-lib-mk-autotools-patch.sh
===================================================================
RCS file: /cvs/pkgs/rpms/xine-lib/EL-5/xine-lib-mk-autotools-patch.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xine-lib-mk-autotools-patch.sh	22 Apr 2007 18:31:21 -0000	1.3
+++ xine-lib-mk-autotools-patch.sh	10 Feb 2009 23:36:41 -0000	1.4
@@ -22,10 +22,12 @@
 tar jxf xine-lib-$version-pruned.tar.bz2
 cp -a xine-lib-$version xine-lib-$version-pruned
 
-cd xine-lib-$version
+pushd xine-lib-$version
+# extra work for to omit old libtool-related crud
+rm -f configure ltmain.sh libtool m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4
 ./autogen.sh noconfig
 rm -rf autom4te.cache *~
-cd ..
+popd
 
 diff -Nru xine-lib-$version-pruned xine-lib-$version \
 | bzip2 --best > xine-lib-$version-autotools.patch.bz2


Index: xine-lib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xine-lib/EL-5/xine-lib.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- xine-lib.spec	23 Jan 2009 19:53:42 -0000	1.24
+++ xine-lib.spec	10 Feb 2009 23:36:41 -0000	1.25
@@ -31,9 +31,9 @@
 %define _without_arts --without-arts
 %endif
 
-Summary:        Xine library
+Summary:        A multimedia engine 
 Name:           xine-lib
-Version:        1.1.16.1
+Version:        1.1.16.2
 Release:        1%{?dist}
 License:        GPLv2+
 Group:          System Environment/Libraries
@@ -55,8 +55,12 @@
 # http://bugzilla.redhat.com/470568
 Patch8:         xine-lib-1.1.15-avsync_hack.patch
 ## upstream patches
+Patch100:	xine-lib-safe-audio-pause.patch
 
 Provides:       xine-lib(plugin-abi) = %{abiver}
+%if "%{?_isa}" != "%{nil}"
+Provides:       xine-lib(plugin-abi)%{?_isa} = %{abiver}
+%endif
 # X11
 BuildRequires:  libX11-devel
 BuildRequires:  libXv-devel
@@ -119,13 +123,10 @@
 BuildRequires:  libdvdnav-devel
 
 %description
-This package contains the Xine library. Xine is a free multimedia player.
-It can play back various media. It also decodes multimedia files from local
-disk drives, and displays multimedia streamed over the Internet. It
-interprets many of the most common multimedia formats available - and some
-of the most uncommon formats, too.  --with/--without rpmbuild options
-(some default values depend on target distribution): aalib, directfb,
-imagemagick, freetype, antialiasing (with freetype), pulseaudio, xcb.
+This package contains the Xine library.  It can be used to play back
+various media, decode multimedia files from local disk drives, and display
+multimedia streamed over the Internet. It interprets many of the most
+common multimedia formats available - and some uncommon formats, too. 
 
 %package        devel
 Summary:        Xine library development files
@@ -135,10 +136,10 @@
 Requires:       zlib-devel
 
 %description    devel
-This package contains development files for xine-lib.
+This package contains development files for %{name}.
 
 %package        arts
-Summary:        aRts plugin for xine-lib
+Summary:        aRts plugin for %{name} 
 Group:          System Environment/Libraries
 Requires:       %{name} = %{version}-%{release}
 #Requires:      xine-lib(plugin-abi) = %{abiver}
@@ -146,27 +147,27 @@
 Obsoletes:      xine-lib-extras < 1.1.7-3
 
 %description    arts
-This package contains the aRts extra plugin for xine-lib.
+This package contains the aRts plugin for %{name}.
 
 %package        pulseaudio
-Summary:        Pulseaudio plugin for xine-lib
+Summary:        Pulseaudio plugin for %{name} 
 Group:          System Environment/Libraries
 Requires:       %{name} = %{version}-%{release}
 # -pulseaudio was split off -extras at 1.1.11.1-2
 #Obsoletes:     xine-lib-extras < 1.1.11.1-2
 
 %description    pulseaudio
-This package contains the pulseaudio plugin for xine-lib.
+This package contains the pulseaudio plugin for %{name}.
 
 
 %package        extras
-Summary:        Additional plugins for xine-lib
+Summary:        Additional plugins for %{name} 
 Group:          System Environment/Libraries
 Requires:       %{name} = %{version}-%{release}
 #Requires:      xine-lib(plugin-abi) = %{abiver}
 
 %description    extras
-This package contains extra plugins for xine-lib:
+This package contains extra plugins for %{name}:
   - EsounD
   - JACK
   - GDK-Pixbuf
@@ -202,6 +203,8 @@
 
 %patch8 -p1 -b .avsync_hack
 
+%patch100 -p1 -b .safe_audio_pause
+
 # Avoid standard rpaths on lib64 archs: (autotools patch should handle this, no? -- Rex )
 #sed -i -e 's|"/lib /usr/lib\b|"/%{_lib} %{_libdir}|' configure
 
@@ -234,7 +237,6 @@
     --with-external-ffmpeg \
     --with-xv-path=%{_libdir} \
     --with-libflac \
-    --with-external-libdvdnav \
     --with-external-libmpcdec \
 %if 0%{?_without_imagemagick:1}
     --without-imagemagick \
@@ -434,6 +436,19 @@
 
 
 %changelog
+* Tue Feb 10 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.2-1
+- xine-lib-1.1.16.2
+
+* Mon Feb 09 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.1-4
+- gapless-race-fix patch (kdebug#180339)
+
+* Sat Feb 07 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.1-3
+- safe-audio-pause patch (kdebug#180339)
+
+* Mon Jan 26 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.1-2
+- Provides: xine-lib(plugin-abi)%%{?_isa} = %%{abiver}
+- touchup Summary/Description
+
 * Fri Jan 23 2009 Rex Dieter <rdieter at fedoraproject.org> - 1.1.16.1-1
 - xine-lib-1.1.16.1
 - include avsync patch (#470568)




More information about the scm-commits mailing list