[vlc-devel] [PATCH 3/6] preparser: store "parse associated media" option in input_item

Alexandre Janniaux ajanni at videolabs.io
Tue Dec 3 17:02:24 CET 2019


The option will be used by the preparser code to tell whether associated
media like input slaves will be preparsed with the input_item. It is
reset each time a new preparse request is emitted.
---
 include/vlc_input_item.h  | 3 +++
 src/preparser/preparser.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index da5c11b1c1..eafa266b82 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -120,6 +120,9 @@ struct input_item_t
 
     bool        b_preparse_interact; /**< Force interaction with the user when
                                           preparsing.*/
+
+    bool        b_preparse_associated; /**< Force associated media of this item
+                                            to be preparsed with the item. */
 };
 
 #define INPUT_ITEM_URI_NOP "vlc://nop" /* dummy URI for node/directory items */
diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
index 4564026a37..bcb9ac0983 100644
--- a/src/preparser/preparser.c
+++ b/src/preparser/preparser.c
@@ -269,6 +269,8 @@ void input_preparser_Push( input_preparser_t *preparser,
     enum input_item_type_e i_type = item->i_type;
     int b_net = item->b_net;
     item->b_preparse_interact = i_options & META_REQUEST_OPTION_DO_INTERACT;
+    item->b_preparse_associated =
+        i_options & META_REQUEST_OPTION_WITH_ASSOCIATED_MEDIA;
     vlc_mutex_unlock( &item->lock );
 
     switch( i_type )
-- 
2.24.0



More information about the vlc-devel mailing list