]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/url.h
Merge commit '5b9cdf8cba114c41239bf0f9f5e0ccb6977d1c8d'
[ffmpeg] / libavformat / url.h
index 085c24c628358ff1bd73121a317f9930adecfb60..4ce60cc8dfc05bce4e0cff772d6c96e51f894ca6 100644 (file)
@@ -47,6 +47,7 @@ typedef struct URLContext {
     AVIOInterruptCB interrupt_callback;
     int64_t rw_timeout;         /**< maximum time to wait for (network) read/write operation completion, in mcs */
     const char *protocol_whitelist;
+    const char *protocol_blacklist;
 } URLContext;
 
 typedef struct URLProtocol {
@@ -140,7 +141,7 @@ int ffurl_connect(URLContext *uc, AVDictionary **options);
  */
 int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags,
                const AVIOInterruptCB *int_cb, AVDictionary **options,
-               const char *whitelist);
+               const char *whitelist, const char* blacklist);
 
 int ffurl_open(URLContext **puc, const char *filename, int flags,
                const AVIOInterruptCB *int_cb, AVDictionary **options);
@@ -309,6 +310,22 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
  */
 AVIODirEntry *ff_alloc_dir_entry(void);
 
-extern const URLProtocol *ff_url_protocols[];
+const AVClass *ff_urlcontext_child_class_next(const AVClass *prev);
+
+/**
+ * Construct a list of protocols matching a given whitelist and/or blacklist.
+ *
+ * @param whitelist a comma-separated list of allowed protocol names or NULL. If
+ *                  this is a non-empty string, only protocols in this list will
+ *                  be included.
+ * @param blacklist a comma-separated list of forbidden protocol names or NULL.
+ *                  If this is a non-empty string, all protocols in this list
+ *                  will be excluded.
+ *
+ * @return a NULL-terminated array of matching protocols. The array must be
+ * freed by the caller.
+ */
+const URLProtocol **ffurl_get_protocols(const char *whitelist,
+                                        const char *blacklist);
 
 #endif /* AVFORMAT_URL_H */