[vlc-commits] input/item: add input_item_AddOptions
Thomas Guillem
git at videolan.org
Sun Apr 17 07:22:30 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr 14 11:16:23 2016 +0200| [a6fa66864895a0ff1a45c3d28620f4484831c0a0] | committer: Thomas Guillem
input/item: add input_item_AddOptions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a6fa66864895a0ff1a45c3d28620f4484831c0a0
---
include/vlc_input_item.h | 6 ++++++
src/input/item.c | 10 ++++++++++
src/libvlccore.sym | 1 +
3 files changed, 17 insertions(+)
diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 14f569c..0e4ac73 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -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 *);
diff --git a/src/input/item.c b/src/input/item.c
index dc42eba..3d67a44 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -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);
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 0d69d14..8dff0c6 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -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
More information about the vlc-commits
mailing list