Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

input_internal.h

00001 /*****************************************************************************
00002  * input_internal.h:
00003  *****************************************************************************
00004  * Copyright (C) 1998-2004 the VideoLAN team
00005  * $Id: input.c 7955 2004-06-07 22:21:33Z fenrir $
00006  *
00007  * Authors: Laurent Aimar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
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 /* Internal helpers */
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         /* Special case, empty the control */
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 /* var.c */
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 /* stream.c */
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 /* decoder.c FIXME make it public ?*/
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 /* es_out.c */
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 /* clock.c */
00124 enum /* Synchro states */
00125 {
00126     SYNCHRO_OK     = 0,
00127     SYNCHRO_START  = 1,
00128     SYNCHRO_REINIT = 2,
00129 };
00130 
00131 typedef struct
00132 {
00133     /* Synchronization information */
00134     mtime_t                 delta_cr;
00135     mtime_t                 cr_ref, sysdate_ref;
00136     mtime_t                 last_sysdate;
00137     mtime_t                 last_cr; /* reference to detect unexpected stream
00138                                       * discontinuities                      */
00139     mtime_t                 last_pts;
00140     int                     i_synchro_state;
00141 
00142     vlc_bool_t              b_master;
00143 
00144     /* Config */
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 /* Subtitles */
00154 char **subtitles_Detect( input_thread_t *, char* path, char *fname );
00155 void MRLSplit( vlc_object_t *, char *, char **, char **, char ** );
00156 
00157 #endif

Generated on Tue Dec 20 10:14:59 2005 for vlc-0.8.4a by  doxygen 1.4.2