diff options
author | uid86226 <none@none> | 2004-02-16 20:19:09 +0000 |
---|---|---|
committer | uid86226 <none@none> | 2004-02-16 20:19:09 +0000 |
commit | 5807b51c46b31abe0fecedb8f1a783f2bd74a18d (patch) | |
tree | db5924af7c3bf12972a2e99854a76b8914d1fb99 /src/input | |
parent | 76b4bde43bb287a9b4cbfe92b4af5e1dd40ee311 (diff) | |
download | xine-lib-5807b51c46b31abe0fecedb8f1a783f2bd74a18d.tar.gz xine-lib-5807b51c46b31abe0fecedb8f1a783f2bd74a18d.tar.bz2 |
fix freezes with input plugins that play with the speed:
* use _x_set_speed() for speed manipulations, since it is ticket-safe
* _x_set_speed() is an internal helper function now, move frontend locking
outside of it
* restrict access to metronom clock internal stuff
CVS patchset: 6165
CVS date: 2004/02/16 20:19:09
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_pvr.c | 10 | ||||
-rw-r--r-- | src/input/input_v4l.c | 4 | ||||
-rw-r--r-- | src/input/net_buf_ctrl.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c index 8b47c9747..32a7aa632 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.41 2004/02/12 18:09:20 mroi Exp $ + * $Id: input_pvr.c,v 1.42 2004/02/16 20:19:09 uid86226 Exp $ */ /************************************************************************** @@ -460,7 +460,7 @@ static void pvr_adjust_realtime_speed(pvr_input_plugin_t *this, fifo_buffer_t *f this->scr_tunning = -2; /* marked as paused */ 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); + _x_set_speed(this->stream, XINE_SPEED_PAUSE); #ifdef SCRLOG printf("input_pvr: buffer empty, pausing playback\n" ); #endif @@ -472,7 +472,7 @@ static void pvr_adjust_realtime_speed(pvr_input_plugin_t *this, fifo_buffer_t *f this->scr_tunning = 0; pvrscr_speed_tunning(this->scr, 1.0 ); - this->stream->xine->clock->set_speed ( this->stream->xine->clock, this->speed_before_pause); + _x_set_speed(this->stream, this->speed_before_pause); #ifdef SCRLOG printf("input_pvr: resuming playback\n" ); #endif @@ -674,7 +674,7 @@ 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 ) - this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_NORMAL); + _x_set_speed(this->stream, XINE_SPEED_NORMAL); if( this->play_fd != -1 ) { if(this->play_fd != this->rec_fd ) @@ -977,7 +977,7 @@ 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); + _x_set_speed(this->stream, XINE_SPEED_NORMAL); 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 2de46b2fd..117c2c411 100644 --- a/src/input/input_v4l.c +++ b/src/input/input_v4l.c @@ -1175,7 +1175,7 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi "Buffer is empty, pausing playback (used: %d, num_free: %d)\r\n", num_used, num_free); - this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_PAUSE); + _x_set_speed(this->stream, XINE_SPEED_PAUSE); this->stream->xine->clock->set_option (this->stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 0); this->scr_tunning = SCR_PAUSED; @@ -1196,7 +1196,7 @@ static int v4l_adjust_realtime_speed(v4l_input_plugin_t *this, fifo_buffer_t *fi pvrscr_speed_tunning(this->scr, 1.0); - this->stream->xine->clock->set_speed (this->stream->xine->clock, XINE_SPEED_NORMAL); + _x_set_speed(this->stream, XINE_SPEED_NORMAL); this->stream->xine->clock->set_option (this->stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 1); } } else if (scr_tunning == SCR_SKIP) { diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c index e5b720a55..b8d44a3b3 100644 --- a/src/input/net_buf_ctrl.c +++ b/src/input/net_buf_ctrl.c @@ -99,13 +99,13 @@ static void report_progress (xine_stream_t *stream, int p) { 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); + _x_set_speed(stream, XINE_SPEED_PAUSE); stream->xine->clock->set_option (stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 0); } 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); + _x_set_speed(stream, XINE_SPEED_NORMAL); stream->xine->clock->set_option (stream->xine->clock, CLOCK_SCR_ADJUSTABLE, 1); } |