summaryrefslogtreecommitdiff
path: root/libavformat/url.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-30 02:17:50 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-02 03:39:34 +0100
commit1dba8371d93cf1c83bcd5c432d921905206a60f3 (patch)
treecf349434cd61e6fc77160e28bf076768fc1af019 /libavformat/url.h
parent838abfc1d711b42beaf401153b36ef80922b85b8 (diff)
avformat: add protocol_whitelist
Note to maintainers: update tools Note to maintainers: set a default whitelist for your protocol If that makes no sense then consider to set "none" and thus require the user to specify a white-list for sub-protocols to be opened Note, testing and checking for missing changes is needed Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/url.h')
-rw-r--r--libavformat/url.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/url.h b/libavformat/url.h
index 391e3bca2a..0b4f2ee376 100644
--- a/libavformat/url.h
+++ b/libavformat/url.h
@@ -47,6 +47,7 @@ typedef struct URLContext {
int is_connected;
AVIOInterruptCB interrupt_callback;
int64_t rw_timeout; /**< maximum time to wait for (network) read/write operation completion, in mcs */
+ const char *protocol_whitelist;
} URLContext;
typedef struct URLProtocol {
@@ -94,6 +95,7 @@ typedef struct URLProtocol {
int (*url_close_dir)(URLContext *h);
int (*url_delete)(URLContext *h);
int (*url_move)(URLContext *h_src, URLContext *h_dst);
+ const char *default_whitelist;
} URLProtocol;
/**
@@ -138,6 +140,10 @@ int ffurl_connect(URLContext *uc, AVDictionary **options);
* @return >= 0 in case of success, a negative value corresponding to an
* AVERROR code in case of failure
*/
+int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags,
+ const AVIOInterruptCB *int_cb, AVDictionary **options,
+ const char *whitelist);
+
int ffurl_open(URLContext **puc, const char *filename, int flags,
const AVIOInterruptCB *int_cb, AVDictionary **options);