aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/opt.h
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-11-04 15:32:56 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-11-25 15:01:33 +0100
commitc70ec631c928ac202fdb8efc999a50fc339f263c (patch)
tree50fc6417bb4e5c66f2f49ebef5bb52992a6d0c45 /libavutil/opt.h
parentfdd71cf04c4fdcea0af911d808687c07d150fee2 (diff)
downloadffmpeg-c70ec631c928ac202fdb8efc999a50fc339f263c.tar.gz
lavu/opt: add av_opt_ accessors for pixel/format/image size options
The interface is implemented against the style of the other options accessors. Possibly simplify programmatic setting of options.
Diffstat (limited to 'libavutil/opt.h')
-rw-r--r--libavutil/opt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/opt.h b/libavutil/opt.h
index c168f59ef8..bf84a9bc57 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -31,6 +31,8 @@
#include "avutil.h"
#include "dict.h"
#include "log.h"
+#include "pixfmt.h"
+#include "samplefmt.h"
/**
* @defgroup avoptions AVOptions
@@ -629,6 +631,9 @@ int av_opt_set_int (void *obj, const char *name, int64_t val, int search_f
int av_opt_set_double(void *obj, const char *name, double val, int search_flags);
int av_opt_set_q (void *obj, const char *name, AVRational val, int search_flags);
int av_opt_set_bin (void *obj, const char *name, const uint8_t *val, int size, int search_flags);
+int av_opt_set_image_size(void *obj, const char *name, int w, int h, int search_flags);
+int av_opt_set_pixel_fmt (void *obj, const char *name, enum AVPixelFormat fmt, int search_flags);
+int av_opt_set_sample_fmt(void *obj, const char *name, enum AVSampleFormat fmt, int search_flags);
/**
* @}
*/
@@ -652,6 +657,9 @@ int av_opt_get (void *obj, const char *name, int search_flags, uint8_t *
int av_opt_get_int (void *obj, const char *name, int search_flags, int64_t *out_val);
int av_opt_get_double(void *obj, const char *name, int search_flags, double *out_val);
int av_opt_get_q (void *obj, const char *name, int search_flags, AVRational *out_val);
+int av_opt_get_image_size(void *obj, const char *name, int search_flags, int *w_out, int *h_out);
+int av_opt_get_pixel_fmt (void *obj, const char *name, int search_flags, enum AVPixelFormat *out_fmt);
+int av_opt_get_sample_fmt(void *obj, const char *name, int search_flags, enum AVSampleFormat *out_fmt);
/**
* @}
*/