1 /*****************************************************************************
2 * input_ext-intf.c: services to the interface
3 *****************************************************************************
4 * Copyright (C) 1998, 1999, 2000 VideoLAN
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
21 *****************************************************************************/
23 /*****************************************************************************
25 *****************************************************************************/
35 #include "stream_control.h"
36 #include "input_ext-dec.h"
37 #include "input_ext-intf.h"
41 /*****************************************************************************
42 * input_Play: comes back to the normal pace of reading
43 *****************************************************************************/
44 void input_Play( input_thread_t * p_input )
46 intf_Msg( "input: playing at normal rate" );
47 vlc_mutex_lock( &p_input->stream.stream_lock );
48 p_input->stream.i_new_status = PLAYING_S;
49 vlc_mutex_unlock( &p_input->stream.stream_lock );
52 /*****************************************************************************
53 * input_Forward: manages fast forward and slow motion
54 *****************************************************************************
55 * Note that if i_rate > DEFAULT_RATE, the pace is slower.
56 *****************************************************************************/
57 void input_Forward( input_thread_t * p_input, int i_rate )
59 if ( i_rate > DEFAULT_RATE )
61 intf_Msg( "input: playing at 1:%i slow motion", i_rate / 1000 );
63 else if( i_rate < DEFAULT_RATE )
65 intf_Msg( "input: playing at %i:1 fast forward", 1000 / i_rate );
69 /* Not very joli, but this is going to disappear soon anyway */
70 input_Play( p_input );
74 vlc_mutex_lock( &p_input->stream.stream_lock );
75 p_input->stream.i_new_status = FORWARD_S;
76 p_input->stream.i_new_rate = i_rate;
77 vlc_mutex_unlock( &p_input->stream.stream_lock );