[vlc-devel] [PATCH v3 11/11] libvlc: add an option to force user interaction
Thomas Guillem
thomas at gllm.fr
Mon Dec 21 17:54:36 UTC 2020
---
include/vlc/libvlc_media.h | 5 +++++
lib/media.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 904e2655612..ddc5c511605 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -173,6 +173,11 @@ typedef enum libvlc_media_parse_flag_t
* when the input is asking for credentials.
*/
libvlc_media_do_interact = 0x08,
+
+ /** Force an interaction with the user (via libvlc_dialog_cbs). This can be
+ * used to change the username of a previously saved browsing session.
+ */
+ libvlc_media_do_interact_forced = 0x10,
} libvlc_media_parse_flag_t;
/**
diff --git a/lib/media.c b/lib/media.c
index 3144eef9504..3e40749444c 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -870,6 +870,8 @@ static int media_parse(libvlc_media_t *media, bool b_async,
parse_scope |= META_REQUEST_OPTION_FETCH_NETWORK;
if (parse_flag & libvlc_media_do_interact)
parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
+ if (parse_flag & libvlc_media_do_interact_forced)
+ parse_scope |= META_REQUEST_OPTION_DO_INTERACT_FORCED;
libvlc_media_retain(media);
ret = libvlc_MetadataRequest(libvlc, item, parse_scope,
--
2.29.2
More information about the vlc-devel
mailing list