vlc_input.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_input.h: Core input structures
00003  *****************************************************************************
00004  * Copyright (C) 1999-2006 the VideoLAN team
00005  * $Id: 330b574600494d33fca506638fd8b55a6c31813d $
00006  *
00007  * Authors: Christophe Massiot <massiot@via.ecp.fr>
00008  *          Laurent Aimar <fenrir@via.ecp.fr>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 /* __ is need because conflict with <vlc/input.h> */
00026 #ifndef VLC__INPUT_H
00027 #define VLC__INPUT_H 1
00028 
00029 /**
00030  * \file
00031  * This file defines functions, structures and enums for input objects in vlc
00032  */
00033 
00034 #include <vlc_es.h>
00035 #include <vlc_meta.h>
00036 #include <vlc_epg.h>
00037 #include <vlc_events.h>
00038 #include <vlc_input_item.h>
00039 
00040 #include <string.h>
00041 
00042 /*****************************************************************************
00043  * Meta data helpers
00044  *****************************************************************************/
00045 static inline void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
00046                                                         const vlc_meta_t *p_meta )
00047 {
00048     char * psz_value;
00049 
00050     if( !p_meta )
00051         return;
00052 
00053     if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_GAIN" )) ||
00054         (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_RADIO" )) )
00055     {
00056         p_dst->pb_gain[AUDIO_REPLAY_GAIN_TRACK] = true;
00057         p_dst->pf_gain[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
00058     }
00059     else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_TRACK_PEAK" )) ||
00060              (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_PEAK" )) )
00061     {
00062         p_dst->pb_peak[AUDIO_REPLAY_GAIN_TRACK] = true;
00063         p_dst->pf_peak[AUDIO_REPLAY_GAIN_TRACK] = atof( psz_value );
00064     }
00065     else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_GAIN" )) ||
00066              (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "RG_AUDIOPHILE" )) )
00067     {
00068         p_dst->pb_gain[AUDIO_REPLAY_GAIN_ALBUM] = true;
00069         p_dst->pf_gain[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
00070     }
00071     else if( (psz_value = (char *)vlc_dictionary_value_for_key( &p_meta->extra_tags, "REPLAYGAIN_ALBUM_PEAK" )) )
00072     {
00073         p_dst->pb_peak[AUDIO_REPLAY_GAIN_ALBUM] = true;
00074         p_dst->pf_peak[AUDIO_REPLAY_GAIN_ALBUM] = atof( psz_value );
00075     }
00076 }
00077 
00078 /*****************************************************************************
00079  * Seek point: (generalisation of chapters)
00080  *****************************************************************************/
00081 struct seekpoint_t
00082 {
00083     int64_t i_byte_offset;
00084     int64_t i_time_offset;
00085     char    *psz_name;
00086     int     i_level;
00087 };
00088 
00089 static inline seekpoint_t *vlc_seekpoint_New( void )
00090 {
00091     seekpoint_t *point = (seekpoint_t*)malloc( sizeof( seekpoint_t ) );
00092     point->i_byte_offset =
00093     point->i_time_offset = -1;
00094     point->i_level = 0;
00095     point->psz_name = NULL;
00096     return point;
00097 }
00098 
00099 static inline void vlc_seekpoint_Delete( seekpoint_t *point )
00100 {
00101     if( !point ) return;
00102     free( point->psz_name );
00103     free( point );
00104 }
00105 
00106 static inline seekpoint_t *vlc_seekpoint_Duplicate( seekpoint_t *src )
00107 {
00108     seekpoint_t *point = vlc_seekpoint_New();
00109     if( src->psz_name ) point->psz_name = strdup( src->psz_name );
00110     point->i_time_offset = src->i_time_offset;
00111     point->i_byte_offset = src->i_byte_offset;
00112     return point;
00113 }
00114 
00115 /*****************************************************************************
00116  * Title:
00117  *****************************************************************************/
00118 typedef struct
00119 {
00120     char        *psz_name;
00121 
00122     bool        b_menu;      /* Is it a menu or a normal entry */
00123 
00124     int64_t     i_length;   /* Length(microsecond) if known, else 0 */
00125     int64_t     i_size;     /* Size (bytes) if known, else 0 */
00126 
00127     /* Title seekpoint */
00128     int         i_seekpoint;
00129     seekpoint_t **seekpoint;
00130 
00131 } input_title_t;
00132 
00133 static inline input_title_t *vlc_input_title_New(void)
00134 {
00135     input_title_t *t = (input_title_t*)malloc( sizeof( input_title_t ) );
00136 
00137     t->psz_name = NULL;
00138     t->b_menu = false;
00139     t->i_length = 0;
00140     t->i_size   = 0;
00141     t->i_seekpoint = 0;
00142     t->seekpoint = NULL;
00143 
00144     return t;
00145 }
00146 
00147 static inline void vlc_input_title_Delete( input_title_t *t )
00148 {
00149     int i;
00150     if( t == NULL )
00151         return;
00152 
00153     free( t->psz_name );
00154     for( i = 0; i < t->i_seekpoint; i++ )
00155     {
00156         free( t->seekpoint[i]->psz_name );
00157         free( t->seekpoint[i] );
00158     }
00159     free( t->seekpoint );
00160     free( t );
00161 }
00162 
00163 static inline input_title_t *vlc_input_title_Duplicate( input_title_t *t )
00164 {
00165     input_title_t *dup = vlc_input_title_New( );
00166     int i;
00167 
00168     if( t->psz_name ) dup->psz_name = strdup( t->psz_name );
00169     dup->b_menu      = t->b_menu;
00170     dup->i_length    = t->i_length;
00171     dup->i_size      = t->i_size;
00172     dup->i_seekpoint = t->i_seekpoint;
00173     if( t->i_seekpoint > 0 )
00174     {
00175         dup->seekpoint = (seekpoint_t**)calloc( t->i_seekpoint,
00176                                                 sizeof(seekpoint_t*) );
00177 
00178         for( i = 0; i < t->i_seekpoint; i++ )
00179         {
00180             dup->seekpoint[i] = vlc_seekpoint_Duplicate( t->seekpoint[i] );
00181         }
00182     }
00183 
00184     return dup;
00185 }
00186 
00187 /*****************************************************************************
00188  * Attachments
00189  *****************************************************************************/
00190 struct input_attachment_t
00191 {
00192     char *psz_name;
00193     char *psz_mime;
00194     char *psz_description;
00195 
00196     int  i_data;
00197     void *p_data;
00198 };
00199 
00200 static inline input_attachment_t *vlc_input_attachment_New( const char *psz_name,
00201                                                             const char *psz_mime,
00202                                                             const char *psz_description,
00203                                                             const void *p_data,
00204                                                             int i_data )
00205 {
00206     input_attachment_t *a =
00207         (input_attachment_t*)malloc( sizeof(input_attachment_t) );
00208     if( !a )
00209         return NULL;
00210     a->psz_name = strdup( psz_name ? psz_name : "" );
00211     a->psz_mime = strdup( psz_mime ? psz_mime : "" );
00212     a->psz_description = strdup( psz_description ? psz_description : "" );
00213     a->i_data = i_data;
00214     a->p_data = NULL;
00215     if( i_data > 0 )
00216     {
00217         a->p_data = malloc( i_data );
00218         if( a->p_data && p_data )
00219             memcpy( a->p_data, p_data, i_data );
00220     }
00221     return a;
00222 }
00223 static inline input_attachment_t *vlc_input_attachment_Duplicate( const input_attachment_t *a )
00224 {
00225     return vlc_input_attachment_New( a->psz_name, a->psz_mime, a->psz_description,
00226                                      a->p_data, a->i_data );
00227 }
00228 static inline void vlc_input_attachment_Delete( input_attachment_t *a )
00229 {
00230     if( !a )
00231         return;
00232     free( a->psz_name );
00233     free( a->psz_mime );
00234     free( a->psz_description );
00235     free( a->p_data );
00236     free( a );
00237 }
00238 
00239 /*****************************************************************************
00240  * input defines/constants.
00241  *****************************************************************************/
00242 
00243 /* i_update field of access_t/demux_t */
00244 #define INPUT_UPDATE_NONE       0x0000
00245 #define INPUT_UPDATE_SIZE       0x0001
00246 #define INPUT_UPDATE_TITLE      0x0010
00247 #define INPUT_UPDATE_SEEKPOINT  0x0020
00248 #define INPUT_UPDATE_META       0x0040
00249 #define INPUT_UPDATE_SIGNAL     0x0080
00250 
00251 /**
00252  * This defines private core storage for an input.
00253  */
00254 typedef struct input_thread_private_t input_thread_private_t;
00255 
00256 /**
00257  * This defines an opaque input resource handler.
00258  */
00259 typedef struct input_resource_t input_resource_t;
00260 
00261 /**
00262  * Main structure representing an input thread. This structure is mostly
00263  * private. The only public fields are READ-ONLY. You must use the helpers
00264  * to modify them
00265  */
00266 struct input_thread_t
00267 {
00268     VLC_COMMON_MEMBERS;
00269 
00270     bool b_eof;
00271     bool b_preparsing;
00272     bool b_dead;
00273 
00274     /* All other data is input_thread is PRIVATE. You can't access it
00275      * outside of src/input */
00276     input_thread_private_t *p;
00277 };
00278 
00279 /**
00280  * Record prefix string.
00281  * TODO make it configurable.
00282  */
00283 #define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%Hh%Mm%Ss-$ N-$ p"
00284 
00285 /*****************************************************************************
00286  * Input events and variables
00287  *****************************************************************************/
00288 
00289 /**
00290  * \defgroup inputvariable Input variables
00291  *
00292  * The input provides multiples variable you can write to and/or read from.
00293  *
00294  * TODO complete the documentation.
00295  * The read only variables are:
00296  *  - "length"
00297  *  - "can-seek" (if you can seek, it doesn't say if 'bar display' has be shown
00298  *    or not, for that check position != 0.0)
00299  *  - "can-pause"
00300  *  - "can-rate"
00301  *  - "can-rewind"
00302  *  - "can-record" (if a stream can be recorded while playing)
00303  *  - "teletext-es" (list of id from the spu tracks (spu-es) that are teletext, the
00304  *                   variable value being the one currently selected, -1 if no teletext)
00305  *  - "signal-quality"
00306  *  - "signal-strength"
00307  *  - "program-scrambled" (if the current program is scrambled)
00308  *  - "cache" (level of data cached [0 .. 1])
00309  *
00310  * The read-write variables are:
00311  *  - state (\see input_state_e)
00312  *  - rate, rate-slower, rate-faster
00313  *  - position, position-offset
00314  *  - time, time-offset
00315  *  - title, next-title, prev-title
00316  *  - chapter, next-chapter, next-chapter-prev
00317  *  - program, audio-es, video-es, spu-es
00318  *  - audio-delay, spu-delay
00319  *  - bookmark (bookmark list)
00320  *  - record
00321  *  - frame-next
00322  *  - navigation (list of "title %2i")
00323  *  - "title %2i"
00324  *
00325  * The variable used for event is
00326  *  - intf-event (\see input_event_type_e)
00327  */
00328 
00329 /**
00330  * Input state
00331  *
00332  * This enum is used by the variable "state"
00333  */
00334 typedef enum input_state_e
00335 {
00336     INIT_S = 0,
00337     OPENING_S,
00338     PLAYING_S,
00339     PAUSE_S,
00340     END_S,
00341     ERROR_S,
00342 } input_state_e;
00343 
00344 /**
00345  * Input rate.
00346  *
00347  * It is an integer used by the variable "rate" in the
00348  * range [INPUT_RATE_MIN, INPUT_RATE_MAX] the default value
00349  * being INPUT_RATE_DEFAULT.
00350  *
00351  * A value lower than INPUT_RATE_DEFAULT plays faster.
00352  * A value higher than INPUT_RATE_DEFAULT plays slower.
00353  */
00354 
00355 /**
00356  * Default rate value
00357  */
00358 #define INPUT_RATE_DEFAULT  1000
00359 /**
00360  * Minimal rate value
00361  */
00362 #define INPUT_RATE_MIN        32            /* Up to 32/1 */
00363 /**
00364  * Maximal rate value
00365  */
00366 #define INPUT_RATE_MAX     32000            /* Up to 1/32 */
00367 
00368 /**
00369  * Input events
00370  *
00371  * You can catch input event by adding a callback on the variable "intf-event".
00372  * This variable is an integer that will hold a input_event_type_e value.
00373  */
00374 typedef enum input_event_type_e
00375 {
00376     /* "state" has changed */
00377     INPUT_EVENT_STATE,
00378     /* b_dead is true */
00379     INPUT_EVENT_DEAD,
00380     /* a *user* abort has been requested */
00381     INPUT_EVENT_ABORT,
00382 
00383     /* "rate" has changed */
00384     INPUT_EVENT_RATE,
00385 
00386     /* At least one of "position" or "time" */
00387     INPUT_EVENT_POSITION,
00388 
00389     /* "length" has changed */
00390     INPUT_EVENT_LENGTH,
00391 
00392     /* A title has been added or removed or selected.
00393      * It imply that chapter has changed (not chapter event is sent) */
00394     INPUT_EVENT_TITLE,
00395     /* A chapter has been added or removed or selected. */
00396     INPUT_EVENT_CHAPTER,
00397 
00398     /* A program ("program") has been added or removed or selected,
00399      * or "program-scrambled" has changed.*/
00400     INPUT_EVENT_PROGRAM,
00401     /* A ES has been added or removed or selected */
00402     INPUT_EVENT_ES,
00403     /* "teletext-es" has changed */
00404     INPUT_EVENT_TELETEXT,
00405 
00406     /* "record" has changed */
00407     INPUT_EVENT_RECORD,
00408 
00409     /* input_item_t media has changed */
00410     INPUT_EVENT_ITEM_META,
00411     /* input_item_t info has changed */
00412     INPUT_EVENT_ITEM_INFO,
00413     /* input_item_t name has changed */
00414     INPUT_EVENT_ITEM_NAME,
00415 
00416     /* Input statistics have been updated */
00417     INPUT_EVENT_STATISTICS,
00418     /* At least one of "signal-quality" or "signal-strength" has changed */
00419     INPUT_EVENT_SIGNAL,
00420 
00421     /* "audio-delay" has changed */
00422     INPUT_EVENT_AUDIO_DELAY,
00423     /* "spu-delay" has changed */
00424     INPUT_EVENT_SUBTITLE_DELAY,
00425 
00426     /* "bookmark" has changed */
00427     INPUT_EVENT_BOOKMARK,
00428 
00429     /* cache" has changed */
00430     INPUT_EVENT_CACHE,
00431 
00432     /* A aout_instance_t object has been created/deleted by *the input* */
00433     INPUT_EVENT_AOUT,
00434     /* A vout_thread_t object has been created/deleted by *the input* */
00435     INPUT_EVENT_VOUT,
00436 
00437 } input_event_type_e;
00438 
00439 /**
00440  * Input queries
00441  */
00442 enum input_query_e
00443 {
00444     /* input variable "position" */
00445     INPUT_GET_POSITION,         /* arg1= double *       res=    */
00446     INPUT_SET_POSITION,         /* arg1= double         res=can fail    */
00447 
00448     /* input variable "length" */
00449     INPUT_GET_LENGTH,           /* arg1= int64_t *      res=can fail    */
00450 
00451     /* input variable "time" */
00452     INPUT_GET_TIME,             /* arg1= int64_t *      res=    */
00453     INPUT_SET_TIME,             /* arg1= int64_t        res=can fail    */
00454 
00455     /* input variable "rate" (1 is DEFAULT_RATE) */
00456     INPUT_GET_RATE,             /* arg1= int *          res=    */
00457     INPUT_SET_RATE,             /* arg1= int            res=can fail    */
00458 
00459     /* input variable "state" */
00460     INPUT_GET_STATE,            /* arg1= int *          res=    */
00461     INPUT_SET_STATE,            /* arg1= int            res=can fail    */
00462 
00463     /* input variable "audio-delay" and "sub-delay" */
00464     INPUT_GET_AUDIO_DELAY,      /* arg1 = int* res=can fail */
00465     INPUT_SET_AUDIO_DELAY,      /* arg1 = int  res=can fail */
00466     INPUT_GET_SPU_DELAY,        /* arg1 = int* res=can fail */
00467     INPUT_SET_SPU_DELAY,        /* arg1 = int  res=can fail */
00468 
00469     /* Meta datas */
00470     INPUT_ADD_INFO,   /* arg1= char* arg2= char* arg3=...     res=can fail */
00471     INPUT_GET_INFO,   /* arg1= char* arg2= char* arg3= char** res=can fail */
00472     INPUT_DEL_INFO,   /* arg1= char* arg2= char*              res=can fail */
00473     INPUT_SET_NAME,   /* arg1= char* res=can fail    */
00474 
00475     /* Input config options */
00476     INPUT_ADD_OPTION,      /* arg1= char * arg2= char *  res=can fail*/
00477 
00478     /* Input properties */
00479     INPUT_GET_VIDEO_FPS,         /* arg1= double *        res=can fail */
00480 
00481     /* bookmarks */
00482     INPUT_GET_BOOKMARK,    /* arg1= seekpoint_t *               res=can fail */
00483     INPUT_GET_BOOKMARKS,   /* arg1= seekpoint_t *** arg2= int * res=can fail */
00484     INPUT_CLEAR_BOOKMARKS, /* res=can fail */
00485     INPUT_ADD_BOOKMARK,    /* arg1= seekpoint_t *  res=can fail   */
00486     INPUT_CHANGE_BOOKMARK, /* arg1= seekpoint_t * arg2= int * res=can fail   */
00487     INPUT_DEL_BOOKMARK,    /* arg1= seekpoint_t *  res=can fail   */
00488     INPUT_SET_BOOKMARK,    /* arg1= int  res=can fail    */
00489 
00490     /* Attachments */
00491     INPUT_GET_ATTACHMENTS, /* arg1=input_attachment_t***, arg2=int*  res=can fail */
00492     INPUT_GET_ATTACHMENT,  /* arg1=input_attachment_t**, arg2=char*  res=can fail */
00493 
00494     /* On the fly input slave */
00495     INPUT_ADD_SLAVE,       /* arg1= const char * */
00496     INPUT_ADD_SUBTITLE,    /* arg1= const char *, arg2=bool b_check_extension */
00497 
00498     /* On the fly record while playing */
00499     INPUT_SET_RECORD_STATE, /* arg1=bool    res=can fail */
00500     INPUT_GET_RECORD_STATE, /* arg1=bool*   res=can fail */
00501 
00502     /* ES */
00503     INPUT_RESTART_ES,       /* arg1=int (-AUDIO/VIDEO/SPU_ES for the whole category) */
00504 
00505     /* Input ressources
00506      * XXX You must call vlc_object_release as soon as possible */
00507     INPUT_GET_AOUT,         /* arg1=aout_instance_t **              res=can fail */
00508     INPUT_GET_VOUTS,        /* arg1=vout_thread_t ***, int *        res=can fail */
00509 };
00510 
00511 /** @}*/
00512 
00513 /*****************************************************************************
00514  * Prototypes
00515  *****************************************************************************/
00516 
00517 #define input_Create(a,b,c,d) __input_Create(VLC_OBJECT(a),b,c,d)
00518 VLC_EXPORT( input_thread_t *, __input_Create, ( vlc_object_t *p_parent, input_item_t *, const char *psz_log, input_resource_t * ) );
00519 
00520 #define input_CreateAndStart(a,b,c) __input_CreateAndStart(VLC_OBJECT(a),b,c)
00521 VLC_EXPORT( input_thread_t *, __input_CreateAndStart, ( vlc_object_t *p_parent, input_item_t *, const char *psz_log ) );
00522 
00523 VLC_EXPORT( int,  input_Start, ( input_thread_t * ) );
00524 
00525 VLC_EXPORT( void, input_Stop, ( input_thread_t *, bool b_abort ) );
00526 
00527 #define input_Read(a,b) __input_Read(VLC_OBJECT(a),b)
00528 VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t * ) );
00529 
00530 VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list  ) );
00531 
00532 VLC_EXPORT( int, input_Control,  ( input_thread_t *, int i_query, ...  ) );
00533 
00534 /**
00535  * Get the input item for an input thread
00536  *
00537  * You have to keep a reference to the input or to the input_item_t until
00538  * you do not need it anymore.
00539  */
00540 VLC_EXPORT( input_item_t*, input_GetItem, ( input_thread_t * ) );
00541 
00542 /**
00543  * It will return the current state of the input.
00544  * Provided for convenience.
00545  */
00546 static inline input_state_e input_GetState( input_thread_t * p_input )
00547 {
00548     input_state_e state = INIT_S;
00549     input_Control( p_input, INPUT_GET_STATE, &state );
00550     return state;
00551 }
00552 /**
00553  * It will add a new subtitle source to the input.
00554  * Provided for convenience.
00555  */
00556 static inline int input_AddSubtitle( input_thread_t *p_input, const char *psz_url, bool b_check_extension )
00557 {
00558     return input_Control( p_input, INPUT_ADD_SUBTITLE, psz_url, b_check_extension );
00559 }
00560 
00561 /**
00562  * Return one of the video output (if any). If possible, you should use
00563  * INPUT_GET_VOUTS directly and process _all_ video outputs instead.
00564  * @param p_input an input thread from which to get a video output
00565  * @return NULL on error, or a video output thread pointer (which needs to be
00566  * released with vlc_object_release()).
00567  */
00568 static inline vout_thread_t *input_GetVout( input_thread_t *p_input )
00569 {
00570      vout_thread_t **pp_vout, *p_vout;
00571      size_t i_vout;
00572 
00573      if( input_Control( p_input, INPUT_GET_VOUTS, &pp_vout, &i_vout ) )
00574          return NULL;
00575 
00576      for( size_t i = 1; i < i_vout; i++ )
00577          vlc_object_release( (vlc_object_t *)(pp_vout[i]) );
00578 
00579      p_vout = (i_vout >= 1) ? pp_vout[0] : NULL;
00580      free( pp_vout );
00581      return p_vout;
00582 }
00583 
00584 /**
00585  * Return the audio output (if any) associated with an input.
00586  * @param p_input an input thread
00587  * @return NULL on error, or the audio output (which needs to be
00588  * released with vlc_object_release()).
00589  */
00590 static inline aout_instance_t *input_GetAout( input_thread_t *p_input )
00591 {
00592      aout_instance_t *p_aout;
00593      return input_Control( p_input, INPUT_GET_AOUT, &p_aout ) ? NULL : p_aout;
00594 }
00595 
00596 /* */
00597 typedef struct input_clock_t input_clock_t;
00598 VLC_EXPORT( decoder_t *, input_DecoderNew, ( input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t * ) );
00599 VLC_EXPORT( void, input_DecoderDelete, ( decoder_t * ) );
00600 VLC_EXPORT( void, input_DecoderDecode,( decoder_t *, block_t *, bool b_do_pace ) );
00601 
00602 /**
00603  * This function allows to split a MRL into access, demux and path part.
00604  *
00605  *  You should not write into access and demux string as they may not point into
00606  * the provided buffer.
00607  *  The buffer provided by psz_dup will be modified.
00608  */
00609 VLC_EXPORT( void, input_SplitMRL, ( const char **ppsz_access, const char **ppsz_demux, char **ppsz_path, char *psz_dup ) );
00610 
00611 /**
00612  * This function creates a sane filename path.
00613  */
00614 VLC_EXPORT( char *, input_CreateFilename, ( vlc_object_t *, const char *psz_path, const char *psz_prefix, const char *psz_extension ) );
00615 
00616 /**
00617  * This function detaches resources from a dead input.
00618  *
00619  * It MUST be called on a dead input (p_input->b_dead true) otherwise
00620  * it will assert.
00621  * It does not support concurrent calls.
00622  */
00623 VLC_EXPORT(input_resource_t *, input_DetachResource, ( input_thread_t * ) );
00624 
00625 /**
00626  * This function releases the input resource.
00627  */
00628 VLC_EXPORT(void, input_resource_Delete, ( input_resource_t * ) );
00629 
00630 #endif

Generated on Sat Nov 21 08:05:14 2009 for VLC by  doxygen 1.5.6