diff options
author | wm4 <wm4@nowhere> | 2012-09-06 07:19:41 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-12 10:10:30 +0200 |
commit | e41378ea7186a4be1d5ed3f0d55a1d4cb93f2f10 (patch) | |
tree | 92b2ba7d4a0e661435591b8c33f33c7e3e6a4b92 /input/input.h | |
parent | 0a54f5e741e395ffb14a1305529c70e817679596 (diff) | |
download | mpv-e41378ea7186a4be1d5ed3f0d55a1d4cb93f2f10.tar.bz2 mpv-e41378ea7186a4be1d5ed3f0d55a1d4cb93f2f10.tar.xz |
commands: simplify legacy command-to-property bridge
There are many input commands which are redundant to properties. They
were parsed like normal commands, but set_property_command() in
command.c handled them automatically using the property mechanism. This
still required having the command specifications around, and the code in
command.c was quite messy.
Replace this with a text based replacement mechanism. Some corner cases
are not handled: commands of form "seek_chapter 3 1" are supposed to set
the "chapter" property to 3. This use is probably rare, and doesn't show
up in the default input.conf.
The reason compatibility is kept is because breaking input.conf is quite
annoying, so a minimal effort is made to avoid this. Currently we print
an annoying warning every time a legacy command is used, though.
Also add a compatibility entry for "pt_step", which was removed some
time ago. Variations in whitespace are not handled, but it's good enough
to deal with old input.conf entries.
Diffstat (limited to 'input/input.h')
-rw-r--r-- | input/input.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/input/input.h b/input/input.h index 8672728598..719fdf840a 100644 --- a/input/input.h +++ b/input/input.h @@ -24,68 +24,38 @@ // All command IDs enum mp_command_type { MP_CMD_SEEK, - MP_CMD_AUDIO_DELAY, MP_CMD_QUIT, - MP_CMD_PAUSE, - MP_CMD_GRAB_FRAMES, // deprecated: was a no-op command for years MP_CMD_PLAYLIST_NEXT, MP_CMD_PLAYLIST_PREV, - MP_CMD_SUB_DELAY, MP_CMD_OSD, - MP_CMD_VOLUME, MP_CMD_MIXER_USEMASTER, - MP_CMD_CONTRAST, - MP_CMD_BRIGHTNESS, - MP_CMD_HUE, - MP_CMD_SATURATION, - MP_CMD_FRAMEDROPPING, MP_CMD_TV_STEP_CHANNEL, MP_CMD_TV_STEP_NORM, MP_CMD_TV_STEP_CHANNEL_LIST, - MP_CMD_VO_FULLSCREEN, - MP_CMD_SUB_POS, MP_CMD_SCREENSHOT, - MP_CMD_PANSCAN, - MP_CMD_MUTE, MP_CMD_LOADFILE, MP_CMD_LOADLIST, MP_CMD_PLAYLIST_CLEAR, - MP_CMD_GAMMA, - MP_CMD_SUB_VISIBILITY, - MP_CMD_VOBSUB_LANG, // deprecated: combined with SUB_SELECT MP_CMD_SUB_STEP, MP_CMD_TV_SET_CHANNEL, MP_CMD_EDL_MARK, - MP_CMD_SUB_ALIGNMENT, MP_CMD_TV_LAST_CHANNEL, MP_CMD_OSD_SHOW_TEXT, MP_CMD_TV_SET_FREQ, MP_CMD_TV_SET_NORM, - MP_CMD_TV_SET_BRIGHTNESS, - MP_CMD_TV_SET_CONTRAST, - MP_CMD_TV_SET_HUE, - MP_CMD_TV_SET_SATURATION, - MP_CMD_SUB_FORCED_ONLY, - MP_CMD_VO_ONTOP, - MP_CMD_SUB_SELECT, - MP_CMD_VO_ROOTWIN, - MP_CMD_SWITCH_VSYNC, MP_CMD_SWITCH_RATIO, MP_CMD_FRAME_STEP, MP_CMD_SPEED_INCR, MP_CMD_SPEED_MULT, MP_CMD_SPEED_SET, MP_CMD_RUN, - MP_CMD_SWITCH_AUDIO, MP_CMD_SUB_LOAD, MP_CMD_KEYDOWN_EVENTS, - MP_CMD_VO_BORDER, MP_CMD_SET_PROPERTY, MP_CMD_SET_PROPERTY_OSD, MP_CMD_GET_PROPERTY, MP_CMD_OSD_SHOW_PROPERTY_TEXT, MP_CMD_OSD_SHOW_PROGRESSION, - MP_CMD_SEEK_CHAPTER, MP_CMD_RADIO_STEP_CHANNEL, MP_CMD_RADIO_SET_CHANNEL, MP_CMD_RADIO_SET_FREQ, @@ -94,13 +64,7 @@ enum mp_command_type { MP_CMD_STEP_PROPERTY_OSD, MP_CMD_RADIO_STEP_FREQ, MP_CMD_TV_STEP_FREQ, - MP_CMD_LOOP, - MP_CMD_BALANCE, - MP_CMD_SUB_SCALE, MP_CMD_TV_START_SCAN, - MP_CMD_SWITCH_ANGLE, - MP_CMD_ASS_USE_MARGINS, - MP_CMD_SWITCH_TITLE, MP_CMD_STOP, /// DVB commands |