[7/8] lavf/http: improve options descriptions and add documentation where missing

Message ID 1394118691-19478-8-git-send-email-alessandro@ghedini.me
State New
Headers show

Commit Message

Alessandro Ghedini March 6, 2014, 3:11 p.m.
---
 doc/protocols.texi | 17 +++++++++++++++--
 libavformat/http.c |  4 ++--
 2 files changed, 17 insertions(+), 4 deletions(-)

Patch

diff --git a/doc/protocols.texi b/doc/protocols.texi
index 820afcf..987ffdf 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -92,9 +92,22 @@  HTTP (Hyper Text Transfer Protocol).
 This protocol accepts the following options:
 
 @table @option
+@item chunked_post
+If set to 1 use chunked Transfer-Encoding for posts, default is 1.
+
+@item headers
+Set custom HTTP headers, can override built in default headers. The
+value must be a string encoding the headers.
+
+@item multiple_requests
+Use persistent connections if set to 1, default is 0.
+
+@item post_data
+Set custom HTTP post data.
+
 @item user-agent
-Override the User-Agent header. If not specified the protocol will use a
-string of the form "Lavf/<version>".
+Override the User-Agent header. If not specified a string of the form
+"Lavf/<version>" will be used.
 
 @item mime_type
 Set MIME type.
diff --git a/libavformat/http.c b/libavformat/http.c
index 77f6477..cbccdbf 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -84,10 +84,10 @@  typedef struct {
 #define DEFAULT_USER_AGENT "Lavf/" AV_STRINGIFY(LIBAVFORMAT_VERSION)
 static const AVOption options[] = {
 {"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E },
-{"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
+{"headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
 {"user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D },
 {"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
-{"post_data", "custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E },
+{"post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E },
 {"mime_type", "set MIME type", OFFSET(mime_type), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },
 {"icy", "request ICY metadata", OFFSET(icy), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D },
 {"icy_metadata_headers", "return ICY metadata headers", OFFSET(icy_metadata_headers), AV_OPT_TYPE_STRING, {0}, 0, 0, 0 },