[vlc-devel] [PATCH v3 10/11] libvlc: propagate the logged user

Thomas Guillem thomas at gllm.fr
Mon Dec 21 17:54:35 UTC 2020


---
 include/vlc/libvlc_events.h | 3 +++
 lib/media.c                 | 1 +
 2 files changed, 4 insertions(+)

diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
index 826a0f45624..4ca5e202a48 100644
--- a/include/vlc/libvlc_events.h
+++ b/include/vlc/libvlc_events.h
@@ -276,6 +276,9 @@ typedef struct libvlc_event_t
         } media_thumbnail_generated;
         struct
         {
+            /** Logged user or NULL if no user was needed to browse the current
+             * media. */
+            const char *logged_user;
             libvlc_media_t * item;
         } media_subitemtree_added;
         struct
diff --git a/lib/media.c b/lib/media.c
index 6f7911e0a2a..3144eef9504 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -290,6 +290,7 @@ void libvlc_media_add_subtree(libvlc_media_t *p_md, input_item_node_t *node)
     libvlc_event_t event;
     event.type = libvlc_MediaSubItemTreeAdded;
     event.u.media_subitemtree_added.item = p_md;
+    event.u.media_subitemtree_added.logged_user = node->psz_logged_user;
 
     /* Send the event */
     libvlc_event_send( &p_md->event_manager, &event );
-- 
2.29.2



More information about the vlc-devel mailing list