summaryrefslogtreecommitdiff
path: root/libavformat/dashenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2019-12-13 18:14:05 +0100
committerJames Almer <jamrial@gmail.com>2020-01-15 23:34:22 -0300
commitbc4f0e713b07b4cb969fe66d08afbc246691b41d (patch)
tree0c254ecdfd5d19c021dc40f4b8478f36b15c8b0d /libavformat/dashenc.c
parentc96a9636c8efd3fd51b696c29a76af8c4d77a729 (diff)
dashenc: support setting arbitrary HTTP protocol options
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/dashenc.c')
-rw-r--r--libavformat/dashenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 2b86a781bc..12aac6412d 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -167,6 +167,7 @@ typedef struct DASHContext {
const char *utc_timing_url;
const char *method;
const char *user_agent;
+ char *http_opts;
int hls_playlist;
int http_persistent;
int master_playlist_created;
@@ -476,6 +477,8 @@ static void set_http_options(AVDictionary **options, DASHContext *c)
{
if (c->method)
av_dict_set(options, "method", c->method, 0);
+ if (c->http_opts)
+ av_dict_parse_string(options, c->http_opts, "=", ",", 0);
if (c->user_agent)
av_dict_set(options, "user_agent", c->user_agent, 0);
if (c->http_persistent)
@@ -2248,6 +2251,7 @@ static const AVOption options[] = {
{ "mpd_profile", "Set profiles. Elements and values used in the manifest may be constrained by them", OFFSET(profile), AV_OPT_TYPE_FLAGS, {.i64 = MPD_PROFILE_DASH }, 0, UINT_MAX, E, "mpd_profile"},
{ "dash", "MPEG-DASH ISO Base media file format live profile", 0, AV_OPT_TYPE_CONST, {.i64 = MPD_PROFILE_DASH }, 0, UINT_MAX, E, "mpd_profile"},
{ "dvb_dash", "DVB-DASH profile", 0, AV_OPT_TYPE_CONST, {.i64 = MPD_PROFILE_DVB }, 0, UINT_MAX, E, "mpd_profile"},
+ { "http_opts", "HTTP protocol options", OFFSET(http_opts), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, E },
{ NULL },
};