[vlc-devel] [PATCH 2/2] libvlc: add a libvlc_media_parse_flag_t to interact with the user
Thomas Guillem
thomas at gllm.fr
Wed Feb 3 19:29:30 CET 2016
---
include/vlc/libvlc_media.h | 6 ++++++
lib/media.c | 2 ++
2 files changed, 8 insertions(+)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 262a936..3e7c637 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -265,6 +265,12 @@ typedef enum libvlc_media_parse_flag_t
* Fetch meta and covert art using network resources
*/
libvlc_media_fetch_network = 0x04,
+ /**
+ * Interact with the user (via libvlc_dialog_cbs) when preparsing this item
+ * (and not its sub items). Set this flag in order to receive a callback
+ * when the input is asking for credentials.
+ */
+ libvlc_media_do_interact = 0x08,
} libvlc_media_parse_flag_t;
/**
diff --git a/lib/media.c b/lib/media.c
index 20266ae..49f5132 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -741,6 +741,8 @@ static int media_parse(libvlc_media_t *media, bool b_async,
if (parse_flag & libvlc_media_parse_network)
parse_scope |= META_REQUEST_OPTION_SCOPE_NETWORK;
+ if (parse_flag & libvlc_media_do_interact)
+ parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
ret = libvlc_MetaRequest(libvlc, item, parse_scope);
if (ret != VLC_SUCCESS)
return ret;
--
2.7.0.rc3
More information about the vlc-devel
mailing list