summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-02-12 18:09:19 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-02-12 18:09:19 +0000
commitc2637f6fbd4a06ff0c433eccb705f52b35d46043 (patch)
tree66997712e793cceefb4375a26c715e6cbfde6f23 /src
parentf6166fd4b881834285d2e756fc770417858bd5fb (diff)
downloadxine-lib-c2637f6fbd4a06ff0c433eccb705f52b35d46043.tar.gz
xine-lib-c2637f6fbd4a06ff0c433eccb705f52b35d46043.tar.bz2
getting rid of AO_PROP_PAUSED, because it can be derived by asking the clock
CVS patchset: 6136 CVS date: 2004/02/12 18:09:19
Diffstat (limited to 'src')
-rw-r--r--src/input/input_pvr.c13
-rw-r--r--src/input/input_v4l.c4
-rw-r--r--src/input/net_buf_ctrl.c4
-rw-r--r--src/xine-engine/audio_out.c24
-rw-r--r--src/xine-engine/audio_out.h5
5 files changed, 11 insertions, 39 deletions
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c
index b8cac982e..8b47c9747 100644
--- a/src/input/input_pvr.c
+++ b/src/input/input_pvr.c
@@ -38,7 +38,7 @@
* usage:
* xine pvr:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age>
*
- * $Id: input_pvr.c,v 1.40 2003/12/14 22:13:23 siggi Exp $
+ * $Id: input_pvr.c,v 1.41 2004/02/12 18:09:20 mroi Exp $
*/
/**************************************************************************
@@ -461,8 +461,6 @@ static void pvr_adjust_realtime_speed(pvr_input_plugin_t *this, fifo_buffer_t *f
pvrscr_speed_tunning(this->scr, 1.0);
this->speed_before_pause = speed;
this->stream->xine->clock->set_speed ( this->stream->xine->clock, XINE_SPEED_PAUSE);
- if( this->stream->audio_out )
- this->stream->audio_out->set_property( this->stream->audio_out, AO_PROP_PAUSED, 2 );
#ifdef SCRLOG
printf("input_pvr: buffer empty, pausing playback\n" );
#endif
@@ -475,8 +473,6 @@ static void pvr_adjust_realtime_speed(pvr_input_plugin_t *this, fifo_buffer_t *f
pvrscr_speed_tunning(this->scr, 1.0 );
this->stream->xine->clock->set_speed ( this->stream->xine->clock, this->speed_before_pause);
- if( this->stream->audio_out )
- this->stream->audio_out->set_property( this->stream->audio_out, AO_PROP_PAUSED, 0 );
#ifdef SCRLOG
printf("input_pvr: resuming playback\n" );
#endif
@@ -677,11 +673,8 @@ static int pvr_play_file(pvr_input_plugin_t *this, fifo_buffer_t *fifo, uint8_t
this->play_blk = (this->rec_blk) ? (this->rec_blk-1) : 0;
- if( speed > XINE_SPEED_NORMAL ) {
+ if( speed > XINE_SPEED_NORMAL )
this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_NORMAL);
- if( this->stream->audio_out )
- this->stream->audio_out->set_property( this->stream->audio_out, AO_PROP_PAUSED, 0 );
- }
if( this->play_fd != -1 ) {
if(this->play_fd != this->rec_fd )
@@ -985,8 +978,6 @@ static void pvr_event_handler (pvr_input_plugin_t *this) {
case XINE_EVENT_SET_V4L2:
/* make sure we are not paused */
this->stream->xine->clock->set_speed ( this->stream->xine->clock, XINE_SPEED_NORMAL);
- if( this->stream->audio_out )
- this->stream->audio_out->set_property( this->stream->audio_out, AO_PROP_PAUSED, 0 );
if( v4l2_data->session_id != this->session ) {
/* if session changes -> closes the old one */
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 4910a508d..2de46b2fd 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -1177,8 +1177,6 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi
this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_PAUSE);
this->stream->xine->clock->set_option (this->stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 0);
- if (this->stream->audio_out != NULL)
- this->stream->audio_out->set_property(this->stream->audio_out, AO_PROP_PAUSED, 2);
this->scr_tunning = SCR_PAUSED;
/* pvrscr_speed_tunning(this->scr, 0.0); */
@@ -1200,8 +1198,6 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi
this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_NORMAL);
this->stream->xine->clock->set_option (this->stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 1);
- if (this->stream->audio_out != NULL)
- this->stream->audio_out->set_property(this->stream->audio_out, AO_PROP_PAUSED, 0);
}
} else if (scr_tunning == SCR_SKIP) {
if (num_used < 2 * num_free) {
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index 0a328d367..e5b720a55 100644
--- a/src/input/net_buf_ctrl.c
+++ b/src/input/net_buf_ctrl.c
@@ -101,16 +101,12 @@ static void nbc_set_speed_pause (xine_stream_t *stream) {
xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_put_cb: set_speed_pause\n");
stream->xine->clock->set_speed (stream->xine->clock, XINE_SPEED_PAUSE);
stream->xine->clock->set_option (stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 0);
- if (stream->audio_out)
- stream->audio_out->set_property(stream->audio_out,AO_PROP_PAUSED,2);
}
static void nbc_set_speed_normal (xine_stream_t *stream) {
xprintf(stream->xine, XINE_VERBOSITY_DEBUG, "\nnet_buf_ctrl: nbc_put_cb: set_speed_normal\n");
stream->xine->clock->set_speed (stream->xine->clock, XINE_SPEED_NORMAL);
stream->xine->clock->set_option (stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 1);
- if (stream->audio_out)
- stream->audio_out->set_property(stream->audio_out,AO_PROP_PAUSED,0);
}
void nbc_check_buffers (nbc_t *this) {
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 84caca40c..099f5462d 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.162 2004/01/07 19:52:42 mroi Exp $
+ * $Id: audio_out.c,v 1.163 2004/02/12 18:09:19 mroi Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -217,7 +217,6 @@ typedef struct {
int audio_loop_running;
int grab_only; /* => do not start thread, frontend will consume samples */
- int audio_paused;
pthread_t audio_thread;
int64_t audio_step; /* pts per 32 768 samples (sample = #bytes/2) */
@@ -919,13 +918,13 @@ static void *ao_loop (void *this_gen) {
/*
* wait until user unpauses stream
- * audio_paused == 1 means we are playing at a different speed
- * them we must process buffers otherwise the entire engine will stop.
+ * if we are playing at a different speed
+ * we must process buffers otherwise the entire engine will stop.
*/
- if ( this->audio_paused && this->audio_loop_running ) {
+ if ( this->clock->speed != XINE_SPEED_NORMAL && this->audio_loop_running ) {
- if (this->audio_paused == 1) {
+ if (this->clock->speed != XINE_SPEED_PAUSE) {
cur_time = this->clock->get_current_time (this->clock);
if (in_buf->vpts < cur_time ) {
@@ -1420,7 +1419,6 @@ static void ao_exit(xine_audio_port_t *this_gen) {
void *p;
this->audio_loop_running = 0;
- this->audio_paused = 0;
buf = fifo_remove(this->free_fifo);
buf->num_frames = 0;
@@ -1557,10 +1555,6 @@ static int ao_get_property (xine_audio_port_t *this_gen, int property) {
ret = this->discard_buffers;
break;
- case AO_PROP_PAUSED:
- ret = this->audio_paused;
- break;
-
default:
inc_num_driver_actions(this);
pthread_mutex_lock( &this->driver_lock );
@@ -1655,11 +1649,6 @@ static int ao_set_property (xine_audio_port_t *this_gen, int property, int value
}
break;
- case AO_PROP_PAUSED:
- this->audio_paused = value;
- ret = this->audio_paused;
- break;
-
case AO_PROP_CLOSE_DEVICE:
inc_num_driver_actions(this);
pthread_mutex_lock( &this->driver_lock );
@@ -1717,7 +1706,7 @@ static void ao_flush (xine_audio_port_t *this_gen) {
this->flush_audio_driver++;
/* do not try this in paused mode */
- while( this->flush_audio_driver && !this->audio_paused) {
+ while( this->flush_audio_driver && this->clock->speed != XINE_SPEED_PAUSE) {
struct timeval tv;
struct timespec ts;
@@ -1824,7 +1813,6 @@ xine_audio_port_t *_x_ao_new_port (xine_t *xine, ao_driver_t *driver,
this->num_driver_actions = 0;
this->audio_loop_running = 0;
this->grab_only = grab_only;
- this->audio_paused = 0;
this->flush_audio_driver = 0;
this->discard_buffers = 0;
this->zero_space = xine_xmalloc (ZERO_BUF_SIZE * 2 * 6);
diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h
index 23591e60d..9ed8decbc 100644
--- a/src/xine-engine/audio_out.h
+++ b/src/xine-engine/audio_out.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.h,v 1.66 2004/01/07 19:52:42 mroi Exp $
+ * $Id: audio_out.h,v 1.67 2004/02/12 18:09:19 mroi Exp $
*/
#ifndef HAVE_AUDIO_OUT_H
#define HAVE_AUDIO_OUT_H
@@ -305,7 +305,7 @@ int _x_ao_mode2channels( int mode );
#define AO_PROP_MUTE_VOL 2
#define AO_PROP_COMPRESSOR 3
#define AO_PROP_DISCARD_BUFFERS 4
-#define AO_PROP_PAUSED 5
+#define AO_PROP_REUSE_ME 5
#define AO_PROP_AMP 6 /* amplifier */
#define AO_PROP_EQ_30HZ 7 /* equalizer */
#define AO_PROP_EQ_60HZ 8 /* equalizer */
@@ -319,6 +319,7 @@ int _x_ao_mode2channels( int mode );
#define AO_PROP_EQ_16000HZ 16 /* equalizer */
#define AO_PROP_CLOSE_DEVICE 17 /* force closing audio device */
#define AO_PROP_AMP_MUTE 18 /* amplifier mute */
+/* if you need to add another one: number 5 is unused */
/* audio device control ops */
#define AO_CTRL_PLAY_PAUSE 0