cosmetics: replace "CTRL" defines by enums

Because why not.
This commit is contained in:
wm4 2013-10-02 21:19:16 +02:00
parent 93b712fa8a
commit ef9c5300ef
5 changed files with 61 additions and 51 deletions

View File

@ -39,6 +39,8 @@ struct ad_functions {
int maxlen);
};
#define ADCTRL_RESYNC_STREAM 1 // resync, called after seeking
enum ad_ctrl {
ADCTRL_RESYNC_STREAM = 1, // resync, called after seeking
};
#endif /* MPLAYER_AD_H */

View File

@ -55,14 +55,16 @@ enum timestamp_type {
#define DEMUXER_CTRL_OK 1
#define DEMUXER_CTRL_GUESS 2
#define DEMUXER_CTRL_UPDATE_INFO 8
#define DEMUXER_CTRL_SWITCHED_TRACKS 9
#define DEMUXER_CTRL_GET_TIME_LENGTH 10
#define DEMUXER_CTRL_GET_START_TIME 11
#define DEMUXER_CTRL_SWITCH_AUDIO 12
#define DEMUXER_CTRL_RESYNC 13
#define DEMUXER_CTRL_SWITCH_VIDEO 14
#define DEMUXER_CTRL_IDENTIFY_PROGRAM 15
enum demux_ctrl {
DEMUXER_CTRL_UPDATE_INFO = 1,
DEMUXER_CTRL_SWITCHED_TRACKS,
DEMUXER_CTRL_GET_TIME_LENGTH,
DEMUXER_CTRL_GET_START_TIME,
DEMUXER_CTRL_SWITCH_AUDIO,
DEMUXER_CTRL_RESYNC,
DEMUXER_CTRL_SWITCH_VIDEO,
DEMUXER_CTRL_IDENTIFY_PROGRAM,
};
#define SEEK_ABSOLUTE (1 << 0)
#define SEEK_FACTOR (1 << 1)

View File

@ -73,31 +73,33 @@ enum streamtype {
#define MAX_STREAM_PROTOCOLS 20
#define STREAM_CTRL_GET_TIME_LENGTH 1
#define STREAM_CTRL_SEEK_TO_CHAPTER 2
#define STREAM_CTRL_GET_CURRENT_CHAPTER 3
#define STREAM_CTRL_GET_NUM_CHAPTERS 4
#define STREAM_CTRL_GET_CURRENT_TIME 5
#define STREAM_CTRL_SEEK_TO_TIME 6
#define STREAM_CTRL_GET_SIZE 7
#define STREAM_CTRL_GET_ASPECT_RATIO 8
#define STREAM_CTRL_GET_NUM_ANGLES 9
#define STREAM_CTRL_GET_ANGLE 10
#define STREAM_CTRL_SET_ANGLE 11
#define STREAM_CTRL_GET_NUM_TITLES 12
#define STREAM_CTRL_GET_LANG 13
#define STREAM_CTRL_GET_CURRENT_TITLE 14
#define STREAM_CTRL_GET_CACHE_SIZE 15
#define STREAM_CTRL_GET_CACHE_FILL 16
#define STREAM_CTRL_GET_CACHE_IDLE 17
#define STREAM_CTRL_RECONNECT 18
// DVD/Bluray, signal general support for GET_CURRENT_TIME etc.
#define STREAM_CTRL_MANAGES_TIMELINE 19
#define STREAM_CTRL_GET_START_TIME 20
#define STREAM_CTRL_GET_CHAPTER_TIME 21
#define STREAM_CTRL_GET_DVD_INFO 22
#define STREAM_CTRL_SET_CONTENTS 23
#define STREAM_CTRL_GET_METADATA 24
enum stream_ctrl {
STREAM_CTRL_GET_TIME_LENGTH = 1,
STREAM_CTRL_SEEK_TO_CHAPTER,
STREAM_CTRL_GET_CURRENT_CHAPTER,
STREAM_CTRL_GET_NUM_CHAPTERS,
STREAM_CTRL_GET_CURRENT_TIME,
STREAM_CTRL_SEEK_TO_TIME,
STREAM_CTRL_GET_SIZE,
STREAM_CTRL_GET_ASPECT_RATIO,
STREAM_CTRL_GET_NUM_ANGLES,
STREAM_CTRL_GET_ANGLE,
STREAM_CTRL_SET_ANGLE,
STREAM_CTRL_GET_NUM_TITLES,
STREAM_CTRL_GET_LANG,
STREAM_CTRL_GET_CURRENT_TITLE,
STREAM_CTRL_GET_CACHE_SIZE,
STREAM_CTRL_GET_CACHE_FILL,
STREAM_CTRL_GET_CACHE_IDLE,
STREAM_CTRL_RECONNECT,
// DVD/Bluray, signal general support for GET_CURRENT_TIME etc.
STREAM_CTRL_MANAGES_TIMELINE,
STREAM_CTRL_GET_START_TIME,
STREAM_CTRL_GET_CHAPTER_TIME,
STREAM_CTRL_GET_DVD_INFO,
STREAM_CTRL_SET_CONTENTS,
STREAM_CTRL_GET_METADATA,
};
struct stream_lang_req {
int type; // STREAM_AUDIO, STREAM_SUB

View File

@ -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);

View File

@ -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);