From 4e2fab5846d2fe7f51a799abb4118515efac854b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 15 Sep 2012 01:10:59 +0200 Subject: commands: rename properties, update input.conf Use "-" instead of "_" in property names. The intent is that property names and options names should be the same (if they refer to the same thing), and options use "-" as word separator. Rename some other properties too, e.g. "switch_audio" -> "audio". Add a way to translate the old property names to the new ones, similar to the input command legacy bridge. Update input.conf. Use the new property names, and don't use legacy commands. --- TOOLS/mplayer2_identify.sh | 24 ++++---- command.c | 138 ++++++++++++++++++++++++++++----------------- etc/input.conf | 129 +++++++++++++++++++++--------------------- input/input.c | 77 +++++++++++++------------ mplayer.c | 4 +- 5 files changed, 203 insertions(+), 169 deletions(-) diff --git a/TOOLS/mplayer2_identify.sh b/TOOLS/mplayer2_identify.sh index 04902124ab..32f9fc279f 100755 --- a/TOOLS/mplayer2_identify.sh +++ b/TOOLS/mplayer2_identify.sh @@ -59,30 +59,30 @@ fi __midentify__allprops=" filename path - stream_start - stream_end - stream_length + stream-start + stream-end + stream-length demuxer - switch_program + program length chapters editions titles - switch_audio - audio_bitrate - audio_codec - audio_format + audio + audio-bitrate + audio-codec + audio-format channels samplerate - switch_video + video angle - video_bitrate - video_codec - video_format + video-bitrate + video-codec + video-format aspect fps width diff --git a/command.c b/command.c index 9a94ceea08..dcf7634ead 100644 --- a/command.c +++ b/command.c @@ -1019,8 +1019,8 @@ static int mp_property_program(m_option_t *prop, int action, void *arg, "Selected program contains no audio or video streams!\n"); return M_PROPERTY_ERROR; } - mp_property_do("switch_audio", M_PROPERTY_SET, &prog.aid, mpctx); - mp_property_do("switch_video", M_PROPERTY_SET, &prog.vid, mpctx); + mp_property_do("audio", M_PROPERTY_SET, &prog.aid, mpctx); + mp_property_do("video", M_PROPERTY_SET, &prog.vid, mpctx); return M_PROPERTY_OK; default: @@ -1352,7 +1352,7 @@ static int mp_property_gamma(m_option_t *prop, int action, void *arg, if (mpctx->sh_video->gsh->demuxer->type == DEMUXER_TYPE_TV) { int l = strlen(prop->name); char tv_prop[3 + l + 1]; - sprintf(tv_prop, "tv_%s", prop->name); + sprintf(tv_prop, "tv-%s", prop->name); return mp_property_do(tv_prop, action, arg, mpctx); } #endif @@ -1677,21 +1677,21 @@ static const m_option_t mp_properties[] = { 0, 0, 0, NULL }, { "demuxer", mp_property_demuxer, CONF_TYPE_STRING, 0, 0, 0, NULL }, - { "stream_pos", mp_property_stream_pos, CONF_TYPE_POSITION, + { "stream-pos", mp_property_stream_pos, CONF_TYPE_POSITION, M_OPT_MIN, 0, 0, NULL }, - { "stream_start", mp_property_stream_start, CONF_TYPE_POSITION, + { "stream-start", mp_property_stream_start, CONF_TYPE_POSITION, M_OPT_MIN, 0, 0, NULL }, - { "stream_end", mp_property_stream_end, CONF_TYPE_POSITION, + { "stream-end", mp_property_stream_end, CONF_TYPE_POSITION, M_OPT_MIN, 0, 0, NULL }, - { "stream_length", mp_property_stream_length, CONF_TYPE_POSITION, + { "stream-length", mp_property_stream_length, CONF_TYPE_POSITION, M_OPT_MIN, 0, 0, NULL }, - { "stream_time_pos", mp_property_stream_time_pos, CONF_TYPE_TIME, + { "stream-time-pos", mp_property_stream_time_pos, CONF_TYPE_TIME, M_OPT_MIN, 0, 0, NULL }, { "length", mp_property_length, CONF_TYPE_TIME, M_OPT_MIN, 0, 0, NULL }, - { "percent_pos", mp_property_percent_pos, CONF_TYPE_INT, + { "percent-pos", mp_property_percent_pos, CONF_TYPE_INT, M_OPT_RANGE, 0, 100, NULL }, - { "time_pos", mp_property_time_pos, CONF_TYPE_TIME, + { "time-pos", mp_property_time_pos, CONF_TYPE_TIME, M_OPT_MIN, 0, 0, NULL }, { "chapter", mp_property_chapter, CONF_TYPE_INT, M_OPT_MIN, 0, 0, NULL }, @@ -1708,9 +1708,9 @@ static const m_option_t mp_properties[] = { 0, 0, 0, NULL }, { "pause", mp_property_pause, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "pts_association_mode", mp_property_generic_option, &m_option_type_choice, + { "pts-association-mode", mp_property_generic_option, &m_option_type_choice, 0, 0, 0, "pts-association-mode" }, - { "hr_seek", mp_property_generic_option, &m_option_type_choice, + { "hr-seek", mp_property_generic_option, &m_option_type_choice, 0, 0, 0, "hr-seek" }, // Audio @@ -1718,19 +1718,19 @@ static const m_option_t mp_properties[] = { M_OPT_RANGE, 0, 100, NULL }, { "mute", mp_property_mute, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "audio_delay", mp_property_audio_delay, CONF_TYPE_FLOAT, + { "audio-delay", mp_property_audio_delay, CONF_TYPE_FLOAT, M_OPT_RANGE, -100, 100, NULL }, - { "audio_format", mp_property_audio_format, CONF_TYPE_INT, + { "audio-format", mp_property_audio_format, CONF_TYPE_INT, 0, 0, 0, NULL }, - { "audio_codec", mp_property_audio_codec, CONF_TYPE_STRING, + { "audio-codec", mp_property_audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL }, - { "audio_bitrate", mp_property_audio_bitrate, CONF_TYPE_INT, + { "audio-bitrate", mp_property_audio_bitrate, CONF_TYPE_INT, 0, 0, 0, NULL }, { "samplerate", mp_property_samplerate, CONF_TYPE_INT, 0, 0, 0, NULL }, { "channels", mp_property_channels, CONF_TYPE_INT, 0, 0, 0, NULL }, - { "switch_audio", mp_property_audio, CONF_TYPE_INT, + { "audio", mp_property_audio, CONF_TYPE_INT, CONF_RANGE, -2, 65535, NULL }, { "balance", mp_property_balance, CONF_TYPE_FLOAT, M_OPT_RANGE, -1, 1, NULL }, @@ -1742,9 +1742,9 @@ static const m_option_t mp_properties[] = { M_OPT_RANGE, 0, 1, NULL }, { "colormatrix", mp_property_colormatrix, &m_option_type_choice, 0, 0, 0, "colormatrix" }, - { "colormatrix_input_range", mp_property_colormatrix_input_range, &m_option_type_choice, + { "colormatrix-input-range", mp_property_colormatrix_input_range, &m_option_type_choice, 0, 0, 0, "colormatrix-input-range" }, - { "colormatrix_output_range", mp_property_colormatrix_output_range, &m_option_type_choice, + { "colormatrix-output-range", mp_property_colormatrix_output_range, &m_option_type_choice, 0, 0, 0, "colormatrix-output-range" }, { "ontop", mp_property_ontop, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, @@ -1768,11 +1768,11 @@ static const m_option_t mp_properties[] = { M_OPT_RANGE, 0, 1, NULL }, { "vsync", mp_property_vsync, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "video_format", mp_property_video_format, CONF_TYPE_INT, + { "video-format", mp_property_video_format, CONF_TYPE_INT, 0, 0, 0, NULL }, - { "video_codec", mp_property_video_codec, CONF_TYPE_STRING, + { "video-codec", mp_property_video_codec, CONF_TYPE_STRING, 0, 0, 0, NULL }, - { "video_bitrate", mp_property_video_bitrate, CONF_TYPE_INT, + { "video-bitrate", mp_property_video_bitrate, CONF_TYPE_INT, 0, 0, 0, NULL }, { "width", mp_property_width, CONF_TYPE_INT, 0, 0, 0, NULL }, @@ -1782,45 +1782,78 @@ static const m_option_t mp_properties[] = { 0, 0, 0, NULL }, { "aspect", mp_property_aspect, CONF_TYPE_FLOAT, 0, 0, 0, NULL }, - { "switch_video", mp_property_video, CONF_TYPE_INT, + { "video", mp_property_video, CONF_TYPE_INT, CONF_RANGE, -2, 65535, NULL }, - { "switch_program", mp_property_program, CONF_TYPE_INT, + { "program", mp_property_program, CONF_TYPE_INT, CONF_RANGE, -1, 65535, NULL }, // Subs { "sub", mp_property_sub, CONF_TYPE_INT, M_OPT_MIN, -1, 0, NULL }, - { "sub_delay", mp_property_sub_delay, CONF_TYPE_FLOAT, + { "sub-delay", mp_property_sub_delay, CONF_TYPE_FLOAT, 0, 0, 0, NULL }, - { "sub_pos", mp_property_sub_pos, CONF_TYPE_INT, + { "sub-pos", mp_property_sub_pos, CONF_TYPE_INT, M_OPT_RANGE, 0, 100, NULL }, - { "sub_visibility", mp_property_sub_visibility, CONF_TYPE_FLAG, + { "sub-visibility", mp_property_sub_visibility, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "sub_forced_only", mp_property_sub_forced_only, CONF_TYPE_FLAG, + { "sub-forced-only", mp_property_sub_forced_only, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "sub_scale", mp_property_sub_scale, CONF_TYPE_FLOAT, + { "sub-scale", mp_property_sub_scale, CONF_TYPE_FLOAT, M_OPT_RANGE, 0, 100, NULL }, #ifdef CONFIG_ASS - { "ass_use_margins", mp_property_ass_use_margins, CONF_TYPE_FLAG, + { "ass-use-margins", mp_property_ass_use_margins, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, - { "ass_vsfilter_aspect_compat", mp_property_ass_vsfilter_aspect_compat, + { "ass-vsfilter-aspect-compat", mp_property_ass_vsfilter_aspect_compat, CONF_TYPE_FLAG, M_OPT_RANGE, 0, 1, NULL }, #endif #ifdef CONFIG_TV - { "tv_brightness", mp_property_tv_color, CONF_TYPE_INT, + { "tv-brightness", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = TV_COLOR_BRIGHTNESS }, - { "tv_contrast", mp_property_tv_color, CONF_TYPE_INT, + { "tv-contrast", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = TV_COLOR_CONTRAST }, - { "tv_saturation", mp_property_tv_color, CONF_TYPE_INT, + { "tv-saturation", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = TV_COLOR_SATURATION }, - { "tv_hue", mp_property_tv_color, CONF_TYPE_INT, + { "tv-hue", mp_property_tv_color, CONF_TYPE_INT, M_OPT_RANGE, -100, 100, .offset = TV_COLOR_HUE }, #endif {0}, }; +struct legacy_prop { + const char *old, *new; +}; +static const struct legacy_prop legacy_props[] = { + {"switch_video", "video"}, + {"switch_audio", "audio"}, + {"switch_program", "program"}, + {0} +}; + +static char *translate_legacy_property(void *talloc_ctx, const char *name) +{ + char *new_name = NULL; + for (int n = 0; legacy_props[n].new; n++) { + if (strcmp(name, legacy_props[n].old) == 0) { + new_name = (char *)legacy_props[n].new; + break; + } + } + if (!new_name && strchr(name, '_')) { + // Old names used "_" instead of "-" + new_name = talloc_strdup(talloc_ctx, name); + for (int n = 0; new_name[n]; n++) { + if (new_name[n] == '_') + new_name[n] = '-'; + } + } + if (new_name) { + mp_msg(MSGT_CPLAYER, MSGL_ERR, "Warning: property '%s' is deprecated, " + "replaced with '%s'. Fix your input.conf!\n", name, new_name); + } + return new_name ? new_name : (char *)name; +} int mp_property_do(const char *name, int action, void *val, void *ctx) { @@ -1869,14 +1902,14 @@ static struct property_osd_display { // general { "loop", _("Loop: %s") }, { "chapter", NULL, .osd_progbar = -1 }, - { "pts_association_mode", "PTS association mode: %s" }, - { "hr_seek", "hr-seek: %s" }, + { "pts-association-mode", "PTS association mode: %s" }, + { "hr-seek", "hr-seek: %s" }, { "speed", _("Speed: x %6s") }, // audio { "volume", _("Volume"), .osd_progbar = OSD_VOLUME }, { "mute", _("Mute: %s") }, - { "audio_delay", _("A-V delay: %s") }, - { "switch_audio", _("Audio: %s") }, + { "audio-delay", _("A-V delay: %s") }, + { "audio", _("Audio: %s") }, { "balance", _("Balance"), .osd_progbar = OSD_BALANCE }, // video { "panscan", _("Panscan"), .osd_progbar = OSD_PANSCAN }, @@ -1886,8 +1919,8 @@ static struct property_osd_display { { "framedropping", _("Framedropping: %s") }, { "deinterlace", _("Deinterlace: %s") }, { "colormatrix", _("YUV colormatrix: %s") }, - { "colormatrix_input_range", _("YUV input range: %s") }, - { "colormatrix_output_range", _("RGB output range: %s") }, + { "colormatrix-input-range", _("YUV input range: %s") }, + { "colormatrix-output-range", _("RGB output range: %s") }, { "gamma", _("Gamma"), .osd_progbar = OSD_BRIGHTNESS }, { "brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS }, { "contrast", _("Contrast"), .osd_progbar = OSD_CONTRAST }, @@ -1897,17 +1930,17 @@ static struct property_osd_display { { "angle", _("Angle: %s") }, // subs { "sub", _("Subtitles: %s") }, - { "sub_pos", _("Sub position: %s/100") }, - { "sub_delay", _("Sub delay: %s"), .osd_id = OSD_MSG_SUB_DELAY }, - { "sub_visibility", _("Subtitles: %s") }, - { "sub_forced_only", _("Forced sub only: %s") }, - { "sub_scale", _("Sub Scale: %s")}, - { "ass_vsfilter_aspect_compat", _("Subtitle VSFilter aspect compat: %s")}, + { "sub-pos", _("Sub position: %s/100") }, + { "sub-delay", _("Sub delay: %s"), .osd_id = OSD_MSG_SUB_DELAY }, + { "sub-visibility", _("Subtitles: %s") }, + { "sub-forced-only", _("Forced sub only: %s") }, + { "sub-scale", _("Sub Scale: %s")}, + { "ass-vsfilter-aspect-compat", _("Subtitle VSFilter aspect compat: %s")}, #ifdef CONFIG_TV - { "tv_brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS }, - { "tv_hue", _("Hue"), .osd_progbar = OSD_HUE}, - { "tv_saturation", _("Saturation"), .osd_progbar = OSD_SATURATION }, - { "tv_contrast", _("Contrast"), .osd_progbar = OSD_CONTRAST }, + { "tv-brightness", _("Brightness"), .osd_progbar = OSD_BRIGHTNESS }, + { "tv-hue", _("Hue"), .osd_progbar = OSD_HUE}, + { "tv-saturation", _("Saturation"), .osd_progbar = OSD_SATURATION }, + { "tv-contrast", _("Contrast"), .osd_progbar = OSD_CONTRAST }, #endif {} }; @@ -2089,6 +2122,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } case MP_CMD_SET: { + cmd->args[0].v.s = translate_legacy_property(cmd, cmd->args[0].v.s); int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_PARSE, cmd->args[1].v.s, mpctx); if (r == M_PROPERTY_UNKNOWN) @@ -2111,6 +2145,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) int r, i; double d; off_t o; + cmd->args[0].v.s = translate_legacy_property(cmd, cmd->args[0].v.s); if (cmd->args[1].v.f) { m_option_t *prop; if ((r = mp_property_do(cmd->args[0].v.s, @@ -2154,6 +2189,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd) } case MP_CMD_GET_PROPERTY: { + cmd->args[0].v.s = translate_legacy_property(cmd, cmd->args[0].v.s); char *tmp; int r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_TO_STRING, &tmp, mpctx); diff --git a/etc/input.conf b/etc/input.conf index 2dd9fee758..8c23bcde96 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -26,12 +26,12 @@ # key combinations is only supported through the video windows of certain # output drivers (not in output windows of other drivers or in a terminal). -MOUSE_BTN0_DBL vo_fullscreen # toggle fullscreen on/off -MOUSE_BTN2 pause # toggle pause on/off +MOUSE_BTN0_DBL switch fullscreen # toggle fullscreen on/off +MOUSE_BTN2 switch pause # toggle pause on/off MOUSE_BTN3 seek 10 MOUSE_BTN4 seek -10 -MOUSE_BTN5 volume 1 -MOUSE_BTN6 volume -1 +MOUSE_BTN5 switch volume 1 +MOUSE_BTN6 switch volume -1 # Seek units are in seconds, but note that these are limited by keyframes RIGHT seek 10 @@ -45,8 +45,8 @@ Shift+UP seek 5 0 1 Shift+DOWN seek -5 0 1 PGUP seek 600 PGDWN seek -600 -+ audio_delay 0.100 # this changes audio/video sync -- audio_delay -0.100 ++ switch audio-delay 0.100 # this changes audio/video sync +- switch audio-delay -0.100 [ speed_mult 0.9091 # scale playback speed ] speed_mult 1.1 { speed_mult 0.5 @@ -55,79 +55,78 @@ BS speed_set 1.0 # reset speed to normal q quit q {encode} quit ESC quit -p pause # toggle pause/playback mode +p switch pause # toggle pause/playback mode . frame_step # advance one frame and pause -SPACE pause +SPACE switch pause > playlist_next # skip to next file ENTER playlist_next 1 # skip to next file or quit < playlist_prev # skip to previous file o osd # cycle through OSD mode I osd_show_property_text "${filename}" # display filename in osd P osd_show_progression -z sub_delay -0.1 # subtract 100 ms delay from subs -x sub_delay +0.1 # add +z switch sub-delay -0.1 # subtract 100 ms delay from subs +x switch sub-delay +0.1 # add g sub_step -1 # immediately display next subtitle y sub_step +1 # previous -9 volume -1 -/ volume -1 -0 volume 1 -* volume 1 -( balance -0.1 # adjust audio balance in favor of left -) balance 0.1 # right -m mute -1 contrast -1 -2 contrast 1 -3 brightness -1 -4 brightness 1 -5 hue -1 -6 hue 1 -7 saturation -1 -8 saturation 1 -d frame_drop # cycle through framedrop modes +9 switch volume -1 +/ switch volume -1 +0 switch volume 1 +* switch volume 1 +( switch balance -0.1 # adjust audio balance in favor of left +) switch balance 0.1 # right +m switch mute +1 switch contrast -1 +2 switch contrast 1 +3 switch brightness -1 +4 switch brightness 1 +5 switch hue -1 +6 switch hue 1 +7 switch saturation -1 +8 switch saturation 1 +d switch frame_drop # cycle through framedrop modes # toggle deinterlacer; requires either vdpau output, -vf yadif or kerndeint -D step_property_osd deinterlace -c step_property_osd colormatrix +D switch deinterlace +c switch colormatrix # Next 3 currently only work with --no-ass -r sub_pos -1 # move subtitles up -t sub_pos +1 # down -v sub_visibility +r switch sub-pos -1 # move subtitles up +t switch sub-pos +1 # down +v switch sub-visibility # stretch SSA/ASS subtitles with anamorphic videos to match historical -V step_property_osd ass_vsfilter_aspect_compat -j sub_select # cycle through subtitles -J sub_select -3 # ...backwards -F forced_subs_only -SHARP switch_audio # switch audio streams -_ step_property switch_video -TAB step_property switch_program +V switch ass-vsfilter-aspect-compat +j switch sub # cycle through subtitles +J switch sub -1 # ...backwards +F switch sub-forced-only +SHARP switch audio # switch audio streams +_ switch video +TAB switch program i edl_mark # for use with --edlout mode -T vo_ontop # toggle video window ontop of other windows -f vo_fullscreen # toggle fullscreen -C step_property_osd capturing +T switch ontop # toggle video window ontop of other windows +f switch fullscreen # toggle fullscreen s screenshot 0 # take a png screenshot S screenshot 1 # ...on every frame Alt+s screenshot 0 1 # take a screenshot of window contents Alt+S screenshot 1 1 # ...on every frame -w panscan -0.1 # zoom out with -panscan 0 -fs -e panscan +0.1 # in +w switch panscan -0.1 # zoom out with -panscan 0 -fs +e switch panscan +0.1 # in POWER quit -MENU osd -PLAY pause -PAUSE pause -PLAYPAUSE pause +MENU switch osd +PLAY switch pause +PAUSE switch pause +PLAYPAUSE switch pause STOP quit FORWARD seek 60 REWIND seek -60 NEXT playlist_next PREV playlist_prev -VOLUME_UP volume 1 -VOLUME_DOWN volume -1 -MUTE mute +VOLUME_UP switch volume 1 +VOLUME_DOWN switch volume -1 +MUTE switch mute CLOSE_WIN quit CLOSE_WIN {encode} quit -! seek_chapter -1 # skip to previous chapter -@ seek_chapter 1 # next -E step_property_osd edition # next edition -A switch_angle 1 +! switch chapter -1 # skip to previous chapter +@ switch chapter 1 # next +E switch edition # next edition +A switch angle 1 U stop # TV @@ -140,16 +139,16 @@ u tv_step_chanlist # Apple Remote section # -AR_PLAY pause +AR_PLAY switch pause AR_PLAY_HOLD quit AR_NEXT seek 30 AR_NEXT_HOLD seek 120 AR_PREV seek -10 AR_PREV_HOLD seek -120 -AR_MENU osd -AR_MENU_HOLD mute -AR_VUP volume 1 -AR_VDOWN volume -1 +AR_MENU switch osd +AR_MENU_HOLD switch mute +AR_VUP switch volume 1 +AR_VDOWN switch volume -1 # # Joystick section @@ -161,15 +160,15 @@ JOY_AXIS0_PLUS seek 10 JOY_AXIS0_MINUS seek -10 JOY_AXIS1_MINUS seek 60 JOY_AXIS1_PLUS seek -60 -JOY_BTN0 pause -JOY_BTN1 osd -JOY_BTN2 volume 1 -JOY_BTN3 volume -1 +JOY_BTN0 switch pause +JOY_BTN1 switch osd +JOY_BTN2 switch volume 1 +JOY_BTN3 switch volume -1 # # Not assigned by default # (not an exhaustive list of unbound commands) # -#? sub_scale +0.1 # increase subtitle font size -#? sub_scale -0.1 # decrease subtitle font size +#? switch sub-scale +0.1 # increase subtitle font size +#? switch sub-scale -0.1 # decrease subtitle font size diff --git a/input/input.c b/input/input.c index 97d6a6b25a..7d751ea1bf 100644 --- a/input/input.c +++ b/input/input.c @@ -161,46 +161,45 @@ static const mp_cmd_t mp_cmds[] = { struct legacy_cmd { const char *old, *new; }; -#define LEGACY_STEP(old) {old, "switch " old} static const struct legacy_cmd legacy_cmds[] = { - LEGACY_STEP("loop"), - {"seek_chapter", "switch chapter"}, - {"switch_angle", "switch angle"}, - LEGACY_STEP("pause"), - LEGACY_STEP("volume"), - LEGACY_STEP("mute"), - LEGACY_STEP("audio_delay"), - LEGACY_STEP("switch_audio"), - LEGACY_STEP("balance"), - {"vo_fullscreen", "no-osd switch fullscreen"}, - LEGACY_STEP("panscan"), - {"vo_ontop", "switch ontop"}, - {"vo_rootwin", "switch rootwin"}, - {"vo_border", "switch border"}, - {"frame_drop", "switch framedropping"}, - LEGACY_STEP("gamma"), - LEGACY_STEP("brightness"), - LEGACY_STEP("contrast"), - LEGACY_STEP("saturation"), - LEGACY_STEP("hue"), - {"switch_vsync", "switch vsync"}, - {"sub_select", "switch sub"}, - LEGACY_STEP("sub_pos"), - LEGACY_STEP("sub_delay"), - LEGACY_STEP("sub_visibility"), - {"forced_subs_only", "switch sub_forced_only"}, - LEGACY_STEP("sub_scale"), - LEGACY_STEP("ass_use_margins"), - {"tv_set_brightness", "tv_brightness"}, - {"tv_set_hue", "tv_hue"}, - {"tv_set_saturation", "tv_saturation"}, - {"tv_set_contrast", "tv_contrast"}, - {"step_property_osd", "switch"}, - {"step_property", "no-osd switch"}, - {"set_property", "no-osd set"}, - {"set_property_osd", "set"}, - {"pt_step 1", "playlist_next"}, - {"pt_step -1", "playlist_prev"}, + {"loop", "switch loop"}, + {"seek_chapter", "switch chapter"}, + {"switch_angle", "switch angle"}, + {"pause", "switch pause"}, + {"volume", "switch volume"}, + {"mute", "switch mute"}, + {"audio_delay", "switch audio-delay"}, + {"switch_audio", "switch audio"}, + {"balance", "switch balance"}, + {"vo_fullscreen", "no-osd switch fullscreen"}, + {"panscan", "switch panscan"}, + {"vo_ontop", "switch ontop"}, + {"vo_rootwin", "switch rootwin"}, + {"vo_border", "switch border"}, + {"frame_drop", "switch framedropping"}, + {"gamma", "switch gamma"}, + {"brightness", "switch brightness"}, + {"contrast", "switch contrast"}, + {"saturation", "switch saturation"}, + {"hue", "switch hue"}, + {"switch_vsync", "switch vsync"}, + {"sub_select", "switch sub"}, + {"sub_pos", "switch sub-pos"}, + {"sub_delay", "switch sub-delay"}, + {"sub_visibility", "switch sub-visibility"}, + {"forced_subs_only", "switch sub-forced-only"}, + {"sub_scale", "switch sub-scale"}, + {"ass_use_margins", "switch ass-use-margins"}, + {"tv_set_brightness", "switch tv-brightness"}, + {"tv_set_hue", "switch tv-hue"}, + {"tv_set_saturation", "switch tv-saturation"}, + {"tv_set_contrast", "switch tv-contrast"}, + {"step_property_osd", "switch"}, + {"step_property", "no-osd switch"}, + {"set_property", "no-osd set"}, + {"set_property_osd", "set"}, + {"pt_step 1", "playlist_next"}, + {"pt_step -1", "playlist_prev"}, {0} }; diff --git a/mplayer.c b/mplayer.c index 2d1843203f..d910611d71 100644 --- a/mplayer.c +++ b/mplayer.c @@ -1003,7 +1003,7 @@ void init_vo_spudec(struct MPContext *mpctx) if (vo_spudec != NULL) { mpctx->initialized_flags |= INITIALIZED_SPUDEC; - mp_property_do("sub_forced_only", M_PROPERTY_SET, &forced_subs_only, + mp_property_do("sub-forced-only", M_PROPERTY_SET, &forced_subs_only, mpctx); } } @@ -3486,7 +3486,7 @@ static void open_vobsubs_from_options(struct MPContext *mpctx) mpctx->initialized_flags |= INITIALIZED_VOBSUB; // TODO: let frontend do the selection vobsub_set_from_lang(vo_vobsub, mpctx->opts.sub_lang); - mp_property_do("sub_forced_only", M_PROPERTY_SET, &forced_subs_only, + mp_property_do("sub-forced-only", M_PROPERTY_SET, &forced_subs_only, mpctx); for (int i = 0; i < vobsub_get_indexes_count(vo_vobsub); i++) { -- cgit v1.2.3