X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_input.h;h=75af0c0314d3d335460970dec7e9329bc5b738a0;hb=ec401825678f8e4032a0e9b27bba9393b57de9bd;hp=9ec80381c252058136582c45ca2d95fdc35f6585;hpb=32376dc26ea8c10dce202deee1ee239a5716c1d0;p=vlc diff --git a/include/vlc_input.h b/include/vlc_input.h index 9ec80381c2..75af0c0314 100644 --- a/include/vlc_input.h +++ b/include/vlc_input.h @@ -66,6 +66,8 @@ struct input_item_t int i_options; /**< Number of input options */ char **ppsz_options; /**< Array of input options */ + uint8_t *optflagv; /**< Some flags of input options */ + unsigned optflagc; mtime_t i_duration; /**< Duration in milliseconds*/ @@ -116,6 +118,10 @@ static inline void input_ItemCopyOptions( input_item_t *p_parent, p_child->i_options * sizeof( char * ) ); p_child->ppsz_options[p_child->i_options-1] = psz_option; + p_child->optflagc++; + p_child->optflagv = (uint8_t *)realloc( p_child->optflagv, + p_child->optflagc ); + p_child->optflagv[p_child->optflagc - 1] = p_parent->optflagv[i]; } } @@ -142,15 +148,18 @@ static inline void input_ItemAddSubItem( input_item_t *p_parent, vlc_event_send( &p_parent->event_manager, &event ); } -#define VLC_INPUT_OPTION_UNIQUE 0x1 +/* Flags handled past input_ItemAddOpt() */ #define VLC_INPUT_OPTION_TRUSTED 0x2 -VLC_EXPORT( void, input_ItemAddOpt, ( input_item_t *, const char *str, unsigned flags ) ); +/* Flags handled within input_ItemAddOpt() */ +#define VLC_INPUT_OPTION_UNIQUE 0x100 + +VLC_EXPORT( int, input_ItemAddOpt, ( input_item_t *, const char *str, unsigned flags ) ); static inline -void input_ItemAddOption (input_item_t *item, const char *str) +int input_ItemAddOption (input_item_t *item, const char *str) { - input_ItemAddOpt (item, str, VLC_INPUT_OPTION_TRUSTED); + return input_ItemAddOpt (item, str, VLC_INPUT_OPTION_TRUSTED); } static inline void input_ItemClean( input_item_t *p_i ) @@ -173,6 +182,7 @@ static inline void input_ItemClean( input_item_t *p_i ) for( i = 0; i < p_i->i_options; i++ ) free( p_i->ppsz_options[i] ); TAB_CLEAN( p_i->i_options, p_i->ppsz_options ); + free( p_i->optflagv); for( i = 0; i < p_i->i_es; i++ ) { @@ -634,15 +644,18 @@ struct input_thread_t /***************************************************************************** * Prototypes *****************************************************************************/ + +/* input_CreateThread + * Release the returned input_thread_t using vlc_object_release() */ #define input_CreateThread(a,b) __input_CreateThread(VLC_OBJECT(a),b) VLC_EXPORT( input_thread_t *, __input_CreateThread, ( vlc_object_t *, input_item_t * ) ); + #define input_Preparse(a,b) __input_Preparse(VLC_OBJECT(a),b) VLC_EXPORT( int, __input_Preparse, ( vlc_object_t *, input_item_t * ) ); #define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c) VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, vlc_bool_t ) ); VLC_EXPORT( void, input_StopThread, ( input_thread_t * ) ); -VLC_EXPORT( void, input_DestroyThread, ( input_thread_t * ) ); enum input_query_e {