---
libavformat/avio.c | 7 +++++++
libavformat/avio.h | 11 +++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 24cec8f..100a04a 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -57,6 +57,13 @@ URLProtocol *av_protocol_next(URLProtocol *p)
else return first_protocol;
}
+const char *avio_enum_protocols(void **opaque)
+{
+ URLProtocol **p = opaque;
+ *p = *p ? (*p)->next : first_protocol;
+ return *p ? (*p)->name : NULL;
+}
+
int av_register_protocol2(URLProtocol *protocol, int size)
{
URLProtocol **p;
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 427aa8c..c892bb1 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -588,4 +588,15 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer);
int udp_get_file_handle(URLContext *h);
#endif
+/**
+ * Iterate through names of available protocols.
+ *
+ * @param opaque A private pointer representing current protocol.
+ * It must be a pointer to NULL on first iteration and will
+ * be updated by successive calls to avio_enum_protocols.
+ *
+ * @return A static string containing the name of current protocol or NULL
+ */
+const char *avio_enum_protocols(void **opaque);
+
#endif /* AVFORMAT_AVIO_H */
--
1.7.4.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel