return NULL;
}
- static const AVClass *urlcontext_child_class_next(const AVClass *prev)
- {
- int i;
-
- /* find the protocol that corresponds to prev */
- for (i = 0; ff_url_protocols[i]; i++) {
- if (ff_url_protocols[i]->priv_data_class == prev) {
- i++;
- break;
- }
- }
-
- /* find next protocol with priv options */
- for (; ff_url_protocols[i]; i++)
- if (ff_url_protocols[i]->priv_data_class)
- return ff_url_protocols[i]->priv_data_class;
- return NULL;
- }
-
-static const AVOption options[] = { { NULL } };
+#define OFFSET(x) offsetof(URLContext,x)
+#define E AV_OPT_FLAG_ENCODING_PARAM
+#define D AV_OPT_FLAG_DECODING_PARAM
+static const AVOption options[] = {
+ {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D },
+ { NULL }
+};
++
const AVClass ffurl_context_class = {
.class_name = "URLContext",
.item_name = urlcontext_to_name,
void ff_make_absolute_url(char *buf, int size, const char *base,
const char *rel);
+/**
+ * Allocate directory entry with default values.
+ *
+ * @return entry or NULL on error
+ */
+AVIODirEntry *ff_alloc_dir_entry(void);
+
+ const AVClass *ff_urlcontext_child_class_next(const AVClass *prev);
+
extern const URLProtocol *ff_url_protocols[];
#endif /* AVFORMAT_URL_H */