mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
video: cleanup stereo mode parsing
Use OPT_CHOICE_C() instead of the custom parser. The functionality is pretty much equivalent. (On a side note, it seems --video-stereo-mode can't be removed, because it controls whether to "reduce" stereo video to mono, which is also the default. In fact I'm not sure how this should be handled at all.)
This commit is contained in:
@@ -104,10 +104,10 @@ enum mp_stereo3d_mode {
|
||||
MP_STEREO3D_COUNT = 13, // 12 is last valid mode
|
||||
};
|
||||
|
||||
extern const char *const mp_stereo3d_names[MP_STEREO3D_COUNT];
|
||||
extern const struct m_opt_choice_alternatives mp_stereo3d_names[];
|
||||
|
||||
#define MP_STEREO3D_NAME(x) m_opt_choice_str(mp_stereo3d_names, x)
|
||||
|
||||
#define MP_STEREO3D_NAME(x) \
|
||||
((x) >= 0 && (x) < MP_STEREO3D_COUNT ? (char *)mp_stereo3d_names[(x)] : NULL)
|
||||
#define MP_STEREO3D_NAME_DEF(x, def) \
|
||||
(MP_STEREO3D_NAME(x) ? MP_STEREO3D_NAME(x) : (def))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user