Commit a6fa6686 authored by Thomas Guillem's avatar Thomas Guillem

input/item: add input_item_AddOptions

parent 54fc5368
......@@ -203,6 +203,12 @@ enum input_item_option_e
* This function allows to add an option to an existing input_item_t.
*/
VLC_API int input_item_AddOption(input_item_t *, const char *, unsigned i_flags );
/**
* This function add several options to an existing input_item_t.
*/
VLC_API int input_item_AddOptions(input_item_t *, int i_options,
const char *const *ppsz_options,
unsigned i_flags );
VLC_API int input_item_AddOpaque(input_item_t *, const char *, void *);
void input_item_ApplyOptions(vlc_object_t *, input_item_t *);
......
......@@ -556,6 +556,16 @@ out:
return err;
}
int input_item_AddOptions( input_item_t *p_item, int i_options,
const char *const *ppsz_options,
unsigned i_flags )
{
int i_ret = VLC_SUCCESS;
for( int i = 0; i < i_options && i_ret == VLC_SUCCESS; i++ )
i_ret = input_item_AddOption( p_item, ppsz_options[i], i_flags );
return i_ret;
}
int input_item_AddOpaque(input_item_t *item, const char *name, void *value)
{
assert(name != NULL);
......
......@@ -173,6 +173,7 @@ input_DecoderFlush
input_GetItem
input_item_AddInfo
input_item_AddOption
input_item_AddOptions
input_item_AddOpaque
input_item_Copy
input_item_CopyOptions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment