00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _INPUT_INTERNAL_H
00025 #define _INPUT_INTERNAL_H 1
00026
00027 enum input_control_e
00028 {
00029 INPUT_CONTROL_SET_DIE,
00030
00031 INPUT_CONTROL_SET_STATE,
00032
00033 INPUT_CONTROL_SET_RATE,
00034 INPUT_CONTROL_SET_RATE_SLOWER,
00035 INPUT_CONTROL_SET_RATE_FASTER,
00036
00037 INPUT_CONTROL_SET_POSITION,
00038 INPUT_CONTROL_SET_POSITION_OFFSET,
00039
00040 INPUT_CONTROL_SET_TIME,
00041 INPUT_CONTROL_SET_TIME_OFFSET,
00042
00043 INPUT_CONTROL_SET_PROGRAM,
00044
00045 INPUT_CONTROL_SET_TITLE,
00046 INPUT_CONTROL_SET_TITLE_NEXT,
00047 INPUT_CONTROL_SET_TITLE_PREV,
00048
00049 INPUT_CONTROL_SET_SEEKPOINT,
00050 INPUT_CONTROL_SET_SEEKPOINT_NEXT,
00051 INPUT_CONTROL_SET_SEEKPOINT_PREV,
00052
00053 INPUT_CONTROL_SET_BOOKMARK,
00054
00055 INPUT_CONTROL_SET_ES,
00056
00057 INPUT_CONTROL_SET_AUDIO_DELAY,
00058 INPUT_CONTROL_SET_SPU_DELAY,
00059
00060 INPUT_CONTROL_ADD_SLAVE,
00061 };
00062
00063
00064 static inline void input_ControlPush( input_thread_t *p_input,
00065 int i_type, vlc_value_t *p_val )
00066 {
00067 vlc_mutex_lock( &p_input->lock_control );
00068 if( i_type == INPUT_CONTROL_SET_DIE )
00069 {
00070
00071 p_input->i_control = 1;
00072 p_input->control[0].i_type = i_type;
00073 memset( &p_input->control[0].val, 0, sizeof( vlc_value_t ) );
00074 }
00075 else
00076 {
00077 if( p_input->i_control >= INPUT_CONTROL_FIFO_SIZE )
00078 {
00079 msg_Err( p_input, "input control fifo overflow, trashing type=%d",
00080 i_type );
00081 vlc_mutex_unlock( &p_input->lock_control );
00082 return;
00083 }
00084 p_input->control[p_input->i_control].i_type = i_type;
00085 if( p_val )
00086 p_input->control[p_input->i_control].val = *p_val;
00087 else
00088 memset( &p_input->control[p_input->i_control].val, 0,
00089 sizeof( vlc_value_t ) );
00090
00091 p_input->i_control++;
00092 }
00093 vlc_mutex_unlock( &p_input->lock_control );
00094 }
00095
00096
00097 void input_ControlVarInit ( input_thread_t * );
00098 void input_ControlVarClean( input_thread_t * );
00099 void input_ControlVarNavigation( input_thread_t * );
00100 void input_ControlVarTitle( input_thread_t *, int i_title );
00101
00102 void input_ConfigVarInit ( input_thread_t * );
00103
00104
00105 stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t );
00106 void stream_AccessDelete( stream_t *s );
00107 void stream_AccessReset( stream_t *s );
00108 void stream_AccessUpdate( stream_t *s );
00109
00110
00111 void input_DecoderDiscontinuity( decoder_t * p_dec );
00112 vlc_bool_t input_DecoderEmpty( decoder_t * p_dec );
00113 void input_DecoderPreroll( decoder_t *p_dec, int64_t i_preroll_end );
00114
00115
00116 es_out_t *input_EsOutNew( input_thread_t * );
00117 void input_EsOutDelete( es_out_t * );
00118 es_out_id_t *input_EsOutGetFromID( es_out_t *, int i_id );
00119 void input_EsOutDiscontinuity( es_out_t *, vlc_bool_t b_audio );
00120 void input_EsOutSetDelay( es_out_t *, int i_cat, int64_t );
00121 vlc_bool_t input_EsOutDecodersEmpty( es_out_t * );
00122
00123
00124 enum
00125 {
00126 SYNCHRO_OK = 0,
00127 SYNCHRO_START = 1,
00128 SYNCHRO_REINIT = 2,
00129 };
00130
00131 typedef struct
00132 {
00133
00134 mtime_t delta_cr;
00135 mtime_t cr_ref, sysdate_ref;
00136 mtime_t last_sysdate;
00137 mtime_t last_cr;
00138
00139 mtime_t last_pts;
00140 int i_synchro_state;
00141
00142 vlc_bool_t b_master;
00143
00144
00145 int i_cr_average;
00146 int i_delta_cr_residue;
00147 } input_clock_t;
00148
00149 void input_ClockInit( input_clock_t *, vlc_bool_t b_master, int i_cr_average );
00150 void input_ClockSetPCR( input_thread_t *, input_clock_t *, mtime_t );
00151 mtime_t input_ClockGetTS( input_thread_t *, input_clock_t *, mtime_t );
00152
00153
00154 char **subtitles_Detect( input_thread_t *, char* path, char *fname );
00155 void MRLSplit( vlc_object_t *, char *, char **, char **, char ** );
00156
00157 #endif