http: Add encoding/decoding flags to the AVOptions

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Anton Khirnov 2011-11-10 09:34:58 +01:00 committed by Martin Storsjö
parent 492cc1bef3
commit a251928060

View File

@ -52,9 +52,11 @@ typedef struct {
} HTTPContext; } HTTPContext;
#define OFFSET(x) offsetof(HTTPContext, x) #define OFFSET(x) offsetof(HTTPContext, x)
#define D AV_OPT_FLAG_DECODING_PARAM
#define E AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = { static const AVOption options[] = {
{"chunksize", "use chunked transfer-encoding for posts, -1 disables it, 0 enables it", OFFSET(chunksize), AV_OPT_TYPE_INT64, {.dbl = 0}, -1, 0 }, /* Default to 0, for chunked POSTs */ {"chunksize", "use chunked transfer-encoding for posts, -1 disables it, 0 enables it", OFFSET(chunksize), AV_OPT_TYPE_INT64, {.dbl = 0}, -1, 0, E }, /* Default to 0, for chunked POSTs */
{"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING }, {"headers", "custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
{NULL} {NULL}
}; };
#define HTTP_CLASS(flavor)\ #define HTTP_CLASS(flavor)\