From 88d843f909f00ffd9c25016a9af58546fabbfd2c Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 8 Feb 2013 21:09:18 +0100 Subject: cleanup: replace OPT_FLAG_ON and OPT_MAKE_FLAGS with OPT_FLAG OPT_MAKE_FLAGS() used to emit two options (one with "no" prefixed), but that has been long removed by special casing flag options in the option parser. OPT_FLAG_ON() used to imply that there's no "no-" prefixed option, but this hasn't been the case for a while either. (Conceptually, it has been replaced by OPT_FLAG_STORE().) Remove OPT_FLAG_OFF, which was unused. --- video/decode/vd_lavc.c | 2 +- video/image_writer.c | 4 ++-- video/out/vo_sdl.c | 2 +- video/out/vo_vdpau.c | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'video') diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index e2fc8f47e2..1661ddd210 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -81,7 +81,7 @@ static void uninit(struct sh_video *sh); const m_option_t lavc_decode_opts_conf[] = { OPT_INTRANGE("bug", lavc_param.workaround_bugs, 0, -1, 999999), - OPT_FLAG_ON("gray", lavc_param.gray, 0), + OPT_FLAG("gray", lavc_param.gray, 0), OPT_INTRANGE("idct", lavc_param.idct_algo, 0, 0, 99), OPT_INTRANGE("ec", lavc_param.error_concealment, 0, 0, 99), OPT_INTRANGE("debug", lavc_param.debug, 0, 0, 9999999), diff --git a/video/image_writer.c b/video/image_writer.c index 3a25e91b07..98649c5c34 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -63,8 +63,8 @@ const struct m_sub_options image_writer_conf = { OPT_INTRANGE("jpeg-optimize", jpeg_optimize, 0, 0, 100), OPT_INTRANGE("jpeg-smooth", jpeg_smooth, 0, 0, 100), OPT_INTRANGE("jpeg-dpi", jpeg_dpi, M_OPT_MIN, 1, 99999), - OPT_MAKE_FLAGS("jpeg-progressive", jpeg_progressive, 0), - OPT_MAKE_FLAGS("jpeg-baseline", jpeg_baseline, 0), + OPT_FLAG("jpeg-progressive", jpeg_progressive, 0), + OPT_FLAG("jpeg-baseline", jpeg_baseline, 0), OPT_INTRANGE("png-compression", png_compression, 0, 0, 9), OPT_STRING("format", format, 0), {0}, diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index ec4cc97ca0..e708b3afc6 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -1035,7 +1035,7 @@ const struct vo_driver video_out_sdl = { .renderer_index = -1 }, .options = (const struct m_option []){ - OPT_FLAG_ON("sw", allow_sw, 0), + OPT_FLAG("sw", allow_sw, 0), {NULL} }, .preinit = preinit, diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 295770c80e..d97a4ac48d 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -1642,13 +1642,13 @@ const struct vo_driver video_out_vdpau = { .priv_size = sizeof(struct vdpctx), .options = (const struct m_option []){ OPT_INTRANGE("deint", deint, 0, -4, 4), - OPT_FLAG_ON("chroma-deint", chroma_deint, 0, OPTDEF_INT(1)), - OPT_MAKE_FLAGS("pullup", pullup, 0), + OPT_FLAG("chroma-deint", chroma_deint, 0, OPTDEF_INT(1)), + OPT_FLAG("pullup", pullup, 0), OPT_FLOATRANGE("denoise", denoise, 0, 0, 1), OPT_FLOATRANGE("sharpen", sharpen, 0, -1, 1), OPT_INTRANGE("hqscaling", hqscaling, 0, 0, 9), OPT_FLOAT("fps", user_fps, 0), - OPT_FLAG_ON("composite-detect", composite_detect, 0, OPTDEF_INT(1)), + OPT_FLAG("composite-detect", composite_detect, 0, OPTDEF_INT(1)), OPT_INT("queuetime_windowed", flip_offset_window, 0, OPTDEF_INT(50)), OPT_INT("queuetime_fs", flip_offset_fs, 0, OPTDEF_INT(50)), OPT_INTRANGE("output_surfaces", num_output_surfaces, 0, -- cgit v1.2.3