summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-25 04:09:04 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-25 04:09:04 +0000
commit595de9b1fc9db7748036f0a6480d661d2a8c9d07 (patch)
treeb5587ee7947cf03b7c24053f756a7f7e23821683 /input
parentf540e17b34a51b35ed4f0f54d31d534ae21310ca (diff)
downloadmpv-595de9b1fc9db7748036f0a6480d661d2a8c9d07.tar.bz2
mpv-595de9b1fc9db7748036f0a6480d661d2a8c9d07.tar.xz
Support select subtitle by source, add 4 properties:
1. sub_source for current sub source (sub file, vobsub, or from demuxer). 2. sub_file for all subtitles from files. 3. sub_vobsub for all subtitles from vobsub. 4. sub_demux for all subtitles from demuxer. Now mplayer can supply a stable and clear interface to external programs using mplayer in slave mode to select a subtitle by its source and its unique id for that source printed by mplayer using -identify parameter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25157 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input')
-rw-r--r--input/input.c4
-rw-r--r--input/input.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/input/input.c b/input/input.c
index 835b97c916..35292aa061 100644
--- a/input/input.c
+++ b/input/input.c
@@ -92,6 +92,10 @@ static mp_cmd_t mp_cmds[] = {
{ MP_CMD_SUB_REMOVE, "sub_remove", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
{ MP_CMD_SUB_SELECT, "vobsub_lang", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } }, // for compatibility
{ MP_CMD_SUB_SELECT, "sub_select", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
+ { MP_CMD_SUB_SOURCE, "sub_source", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
+ { MP_CMD_SUB_VOB, "sub_vob", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
+ { MP_CMD_SUB_DEMUX, "sub_demux", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
+ { MP_CMD_SUB_FILE, "sub_file", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
{ MP_CMD_SUB_LOG, "sub_log", 0, { {-1,{0}} } },
{ MP_CMD_SUB_SCALE, "sub_scale",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_GET_PERCENT_POS, "get_percent_pos", 0, { {-1,{0}} } },
diff --git a/input/input.h b/input/input.h
index 469ad48713..3dc7598f64 100644
--- a/input/input.h
+++ b/input/input.h
@@ -99,6 +99,10 @@
#define MP_CMD_TV_TELETEXT_ADD_DEC 98
#define MP_CMD_TV_TELETEXT_GO_LINK 99
#define MP_CMD_TV_START_SCAN 100
+#define MP_CMD_SUB_SOURCE 101
+#define MP_CMD_SUB_FILE 102
+#define MP_CMD_SUB_VOB 103
+#define MP_CMD_SUB_DEMUX 104
#define MP_CMD_GUI_EVENTS 5000
#define MP_CMD_GUI_LOADFILE 5001