summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_format.c')
-rw-r--r--video/filter/vf_format.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index d37778e38d..639a564113 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -29,11 +29,10 @@
#include "vf.h"
#include "core/m_option.h"
-#include "core/m_struct.h"
static struct vf_priv_s {
- unsigned int fmt;
- unsigned int outfmt;
+ int fmt;
+ int outfmt;
} const vf_priv_dflt = {
IMGFMT_YUYV,
0
@@ -73,18 +72,11 @@ static int vf_open(vf_instance_t *vf, char *args){
return 1;
}
-#define ST_OFF(f) M_ST_OFF(struct vf_priv_s,f)
+#define OPT_BASE_STRUCT struct vf_priv_s
static const m_option_t vf_opts_fields[] = {
- {"fmt", ST_OFF(fmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL},
- {"outfmt", ST_OFF(outfmt), CONF_TYPE_IMGFMT, 0,0 ,0, NULL},
- { NULL, NULL, 0, 0, 0, 0, NULL }
-};
-
-static const m_struct_t vf_opts = {
- "format",
- sizeof(struct vf_priv_s),
- &vf_priv_dflt,
- vf_opts_fields
+ OPT_IMAGEFORMAT("fmt", fmt, 0),
+ OPT_IMAGEFORMAT("outfmt", outfmt, 0),
+ {0}
};
const vf_info_t vf_info_format = {
@@ -93,7 +85,9 @@ const vf_info_t vf_info_format = {
"A'rpi",
"FIXME! get_image()/put_image()",
vf_open,
- &vf_opts
+ .priv_size = sizeof(struct vf_priv_s),
+ .priv_defaults = &vf_priv_dflt,
+ .options = vf_opts_fields,
};
//===========================================================================//