Re: [FFmpeg-devel] [PATCH] DASH muxer: add option to change HTTP method

2018-02-26 Thread Jeyapal, Karthick


On 2/26/18 2:16 PM, Serhii Marchuk wrote:
> Please have a look at the attached patch.
Pushed.

Thanks,
Karthick
>
> 2018-02-24 7:31 GMT+02:00 Jeyapal, Karthick :
>
>>
>>
>> On 2/23/18 3:30 PM, Serhii Marchuk wrote:
>>> ---
>>>  libavformat/dashenc.c | 4 
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
>>> index 0f6f4f22fa..28ff288fca 100644
>>> --- a/libavformat/dashenc.c
>>> +++ b/libavformat/dashenc.c
>>> @@ -105,6 +105,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;
>>> @@ -256,6 +257,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)
>>> @@ -1376,6 +1379,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 },
>>
>> Thanks for sending the patch. The patch looks fine.
>> But, please change the commit message’s prefix from “DASH muxer” to
>> “avformat/dashenc”, in order to maintain the uniformity with other commit
>> messages.
>>
>> Regards,
>> Karthick
>>
>>
>>
>>
>> ___
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] DASH muxer: add option to change HTTP method

2018-02-26 Thread Serhii Marchuk
Please have a look at the attached patch.

2018-02-24 7:31 GMT+02:00 Jeyapal, Karthick :

>
>
> On 2/23/18 3:30 PM, Serhii Marchuk wrote:
> > ---
> >  libavformat/dashenc.c | 4 
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> > index 0f6f4f22fa..28ff288fca 100644
> > --- a/libavformat/dashenc.c
> > +++ b/libavformat/dashenc.c
> > @@ -105,6 +105,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;
> > @@ -256,6 +257,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)
> > @@ -1376,6 +1379,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 },
>
> Thanks for sending the patch. The patch looks fine.
> But, please change the commit message’s prefix from “DASH muxer” to
> “avformat/dashenc”, in order to maintain the uniformity with other commit
> messages.
>
> Regards,
> Karthick
>
>
From 7b5ffda520029117865ea0024e1c3eeb439566c2 Mon Sep 17 00:00:00 2001
From: Serhii Marchuk 
Date: Fri, 23 Feb 2018 11:35:40 +0200
Subject: [PATCH] avformat/dashenc: add option to change HTTP method

---
 libavformat/dashenc.c | 4 
 1 file changed, 4 insertions(+)

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 },
-- 
2.14.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] DASH muxer: add option to change HTTP method

2018-02-23 Thread Jeyapal, Karthick


On 2/23/18 3:30 PM, Serhii Marchuk wrote:
> ---
>  libavformat/dashenc.c | 4 
>  1 file changed, 4 insertions(+)
>
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> index 0f6f4f22fa..28ff288fca 100644
> --- a/libavformat/dashenc.c
> +++ b/libavformat/dashenc.c
> @@ -105,6 +105,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;
> @@ -256,6 +257,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)
> @@ -1376,6 +1379,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 },

Thanks for sending the patch. The patch looks fine. 
But, please change the commit message’s prefix from “DASH muxer” to 
“avformat/dashenc”, in order to maintain the uniformity with other commit 
messages.

Regards,
Karthick

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] DASH muxer: add option to change HTTP method

2018-02-23 Thread Serhii Marchuk
---
 libavformat/dashenc.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index 0f6f4f22fa..28ff288fca 100644
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -105,6 +105,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;
@@ -256,6 +257,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)
@@ -1376,6 +1379,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 
},
-- 
2.14.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel