[vlc-devel] [PATCH 13/15] core: Expose input_item_GetAttachments

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Nov 10 18:40:23 CET 2020


---
 include/vlc_input_item.h | 13 ++++++++++++-
 src/libvlccore.sym       |  1 +
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index f38e7ba7ca..aa786d8141 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -338,7 +338,18 @@ VLC_API int input_item_DelInfo( input_item_t *p_i, const char *psz_cat, const ch
 VLC_API void input_item_ReplaceInfos( input_item_t *, info_category_t * );
 VLC_API void input_item_MergeInfos( input_item_t *, info_category_t * );
 
-int input_item_GetAttachments(input_item_t *item, input_item_attachment_t ***attachments);
+/**
+ * Returns this item's attachments
+ * \param item The item instance
+ * \param attachments A pointer to an array of input_item_attachment_t* (out)
+ * \return The number of attachment on success, -1 on error
+ *
+ * If this function return value is less or equal to zero, attachment will
+ * contain a NULL pointer
+ * Once returned, the attachments can be held & released but their content must
+ * not be modified
+ */
+VLC_API int input_item_GetAttachments(input_item_t *item, input_item_attachment_t ***attachments);
 input_item_attachment_t *input_item_GetAttachment(input_item_t *item, const char *name);
 
 /**
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index e3a2de9f6d..5284e9a1b1 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -216,6 +216,7 @@ input_item_AddSlave
 input_item_Parse
 input_item_parser_id_Interrupt
 input_item_parser_id_Release
+input_item_GetAttachments
 input_resource_New
 input_resource_Release
 input_resource_GetAout
-- 
2.28.0



More information about the vlc-devel mailing list