mirror of https://github.com/mpv-player/mpv
options: move dvd options to stream_dvdnav
The options and struct are only used in stream_dvdnav.c. Also use dvd prefix for dvd_conf.
This commit is contained in:
parent
354ad7f27d
commit
9543426889
|
@ -88,6 +88,8 @@ extern const struct m_obj_list vo_obj_list;
|
|||
|
||||
extern const struct m_sub_options ao_conf;
|
||||
|
||||
extern const struct m_sub_options dvd_conf;
|
||||
|
||||
extern const struct m_sub_options opengl_conf;
|
||||
extern const struct m_sub_options vulkan_conf;
|
||||
extern const struct m_sub_options vulkan_display_conf;
|
||||
|
@ -420,22 +422,6 @@ const struct m_sub_options cuda_conf = {
|
|||
},
|
||||
};
|
||||
|
||||
#undef OPT_BASE_STRUCT
|
||||
#define OPT_BASE_STRUCT struct dvd_opts
|
||||
|
||||
const struct m_sub_options dvd_conf = {
|
||||
.opts = (const struct m_option[]){
|
||||
{"dvd-device", OPT_STRING(device), .flags = M_OPT_FILE},
|
||||
{"dvd-speed", OPT_INT(speed)},
|
||||
{"dvd-angle", OPT_INT(angle), M_RANGE(1, 99)},
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(struct dvd_opts),
|
||||
.defaults = &(const struct dvd_opts){
|
||||
.angle = 1,
|
||||
},
|
||||
};
|
||||
|
||||
#undef OPT_BASE_STRUCT
|
||||
#define OPT_BASE_STRUCT struct filter_opts
|
||||
|
||||
|
@ -556,7 +542,7 @@ static const m_option_t mp_opts[] = {
|
|||
// ------------------------- stream options --------------------
|
||||
|
||||
#if HAVE_DVDNAV
|
||||
{"", OPT_SUBSTRUCT(dvd_opts, dvd_conf)},
|
||||
{"dvd", OPT_SUBSTRUCT(dvd_opts, dvd_conf)},
|
||||
#endif
|
||||
{"edition", OPT_CHOICE(edition_id, {"auto", -1}), M_RANGE(0, 8190)},
|
||||
#if HAVE_LIBBLURAY
|
||||
|
|
|
@ -390,12 +390,6 @@ struct cuda_opts {
|
|||
int cuda_device;
|
||||
};
|
||||
|
||||
struct dvd_opts {
|
||||
int angle;
|
||||
int speed;
|
||||
char *device;
|
||||
};
|
||||
|
||||
struct filter_opts {
|
||||
int deinterlace;
|
||||
int field_parity;
|
||||
|
@ -403,7 +397,6 @@ struct filter_opts {
|
|||
|
||||
extern const struct m_sub_options vo_sub_opts;
|
||||
extern const struct m_sub_options cuda_conf;
|
||||
extern const struct m_sub_options dvd_conf;
|
||||
extern const struct m_sub_options mp_subtitle_sub_opts;
|
||||
extern const struct m_sub_options mp_subtitle_shared_sub_opts;
|
||||
extern const struct m_sub_options mp_osd_render_sub_opts;
|
||||
|
|
|
@ -72,6 +72,27 @@ struct priv {
|
|||
struct dvd_opts *opts;
|
||||
};
|
||||
|
||||
struct dvd_opts {
|
||||
int angle;
|
||||
int speed;
|
||||
char *device;
|
||||
};
|
||||
|
||||
#define OPT_BASE_STRUCT struct dvd_opts
|
||||
|
||||
const struct m_sub_options dvd_conf = {
|
||||
.opts = (const struct m_option[]){
|
||||
{"device", OPT_STRING(device), .flags = M_OPT_FILE},
|
||||
{"speed", OPT_INT(speed)},
|
||||
{"angle", OPT_INT(angle), M_RANGE(1, 99)},
|
||||
{0}
|
||||
},
|
||||
.size = sizeof(struct dvd_opts),
|
||||
.defaults = &(const struct dvd_opts){
|
||||
.angle = 1,
|
||||
},
|
||||
};
|
||||
|
||||
#define DNE(e) [e] = # e
|
||||
static const char *const mp_dvdnav_events[] = {
|
||||
DNE(DVDNAV_BLOCK_OK),
|
||||
|
|
Loading…
Reference in New Issue