diff options
author | Serhii Marchuk <serhii.marchuk@gmail.com> | 2018-02-23 11:35:40 +0200 |
---|---|---|
committer | Karthick Jeyapal <kjeyapal@akamai.com> | 2018-02-27 08:39:47 +0530 |
commit | 6d763ab58811e856517926353ee2920369cf20b4 (patch) | |
tree | 17e8411b75cf94a14c361c58a19c90d1ed6bef70 /libavformat | |
parent | f235359b2b1175585df757e6b60fabac29b8aa22 (diff) | |
download | ffmpeg-6d763ab58811e856517926353ee2920369cf20b4.tar.gz |
avformat/dashenc: add option to change HTTP method
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/dashenc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index d6474f3549..febe468691 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -109,6 +109,7 @@ typedef struct DASHContext { const char *init_seg_name; const char *media_seg_name; const char *utc_timing_url; + const char *method; const char *user_agent; int hls_playlist; int http_persistent; @@ -262,6 +263,8 @@ static int flush_dynbuf(OutputStream *os, int *range_length) static void set_http_options(AVDictionary **options, DASHContext *c) { + if (c->method) + av_dict_set(options, "method", c->method, 0); if (c->user_agent) av_dict_set(options, "user_agent", c->user_agent, 0); if (c->http_persistent) @@ -1410,6 +1413,7 @@ static const AVOption options[] = { { "init_seg_name", "DASH-templated name to used for the initialization segment", OFFSET(init_seg_name), AV_OPT_TYPE_STRING, {.str = "init-stream$RepresentationID$.m4s"}, 0, 0, E }, { "media_seg_name", "DASH-templated name to used for the media segments", OFFSET(media_seg_name), AV_OPT_TYPE_STRING, {.str = "chunk-stream$RepresentationID$-$Number%05d$.m4s"}, 0, 0, E }, { "utc_timing_url", "URL of the page that will return the UTC timestamp in ISO format", OFFSET(utc_timing_url), AV_OPT_TYPE_STRING, { 0 }, 0, 0, E }, + { "method", "set the HTTP method", OFFSET(method), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E }, { "http_user_agent", "override User-Agent field in HTTP header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, E}, { "http_persistent", "Use persistent HTTP connections", OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1, E }, { "hls_playlist", "Generate HLS playlist files(master.m3u8, media_%d.m3u8)", OFFSET(hls_playlist), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, E }, |