From ef9c5300ef02427db606273ac1f461a68c6c95ec Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 2 Oct 2013 21:19:16 +0200 Subject: cosmetics: replace "CTRL" defines by enums Because why not. --- video/decode/vd.h | 10 ++++++---- video/filter/vf.h | 28 +++++++++++++++------------- 2 files changed, 21 insertions(+), 17 deletions(-) (limited to 'video') diff --git a/video/decode/vd.h b/video/decode/vd.h index 3142151373..488f9fa061 100644 --- a/video/decode/vd.h +++ b/video/decode/vd.h @@ -40,10 +40,12 @@ typedef struct vd_functions // NULL terminated array of all drivers extern const vd_functions_t *const mpcodecs_vd_drivers[]; -#define VDCTRL_GET_PARAMS 1 // retrieve struct mp_image_params -#define VDCTRL_RESYNC_STREAM 8 // reset decode state after seeking -#define VDCTRL_QUERY_UNSEEN_FRAMES 9 // current decoder lag -#define VDCTRL_REINIT_VO 10 // reinit filter/VO chain +enum vd_ctrl { + VDCTRL_GET_PARAMS = 1, // retrieve struct mp_image_params + VDCTRL_RESYNC_STREAM, // reset decode state after seeking + VDCTRL_QUERY_UNSEEN_FRAMES, // current decoder lag + VDCTRL_REINIT_VO, // reinit filter/VO chain +}; int mpcodecs_reconfig_vo(sh_video_t *sh, const struct mp_image_params *params); diff --git a/video/filter/vf.h b/video/filter/vf.h index f61bb8be80..9f041a79b4 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -94,19 +94,21 @@ typedef struct vf_seteq { int value; } vf_equalizer_t; -#define VFCTRL_SEEK_RESET 1 // reset on picture and PTS discontinuities -#define VFCTRL_QUERY_MAX_PP_LEVEL 4 // query max postprocessing level (if any) -#define VFCTRL_SET_PP_LEVEL 5 // set postprocessing level -#define VFCTRL_SET_EQUALIZER 6 // set color options (brightness,contrast etc) -#define VFCTRL_GET_EQUALIZER 8 // get color options (brightness,contrast etc) -#define VFCTRL_SCREENSHOT 14 // Take screenshot, arg is voctrl_screenshot_args -#define VFCTRL_INIT_OSD 15 // Filter OSD renderer present? -#define VFCTRL_SET_DEINTERLACE 18 // Set deinterlacing status -#define VFCTRL_GET_DEINTERLACE 19 // Get deinterlacing status -/* Hack to make the OSD state object available to vf_sub which - * access OSD/subtitle state outside of normal OSD draw time. */ -#define VFCTRL_SET_OSD_OBJ 20 -#define VFCTRL_GET_HWDEC_INFO 21 // for hwdec filters +enum vf_ctrl { + VFCTRL_SEEK_RESET = 1, // reset on picture and PTS discontinuities + VFCTRL_QUERY_MAX_PP_LEVEL, // query max postprocessing level (if any) + VFCTRL_SET_PP_LEVEL, // set postprocessing level + VFCTRL_SET_EQUALIZER, // set color options (brightness,contrast etc) + VFCTRL_GET_EQUALIZER, // get color options (brightness,contrast etc) + VFCTRL_SCREENSHOT, // Take screenshot, arg is voctrl_screenshot_args + VFCTRL_INIT_OSD, // Filter OSD renderer present? + VFCTRL_SET_DEINTERLACE, // Set deinterlacing status + VFCTRL_GET_DEINTERLACE, // Get deinterlacing status + /* Hack to make the OSD state object available to vf_sub which + * access OSD/subtitle state outside of normal OSD draw time. */ + VFCTRL_SET_OSD_OBJ, + VFCTRL_GET_HWDEC_INFO, // for hwdec filters +}; int vf_control(struct vf_instance *vf, int cmd, void *arg); -- cgit v1.2.3