1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

command: remove radio commands

Remove these because I'm too lazy to convert them to proper
STREAM_CTRLs. Considering that probably nobody uses radio://, caring
about this is a complete waste of time. I will add these commands back
if someone asks for them, but I don't expect this to happen.
This commit is contained in:
wm4 2013-12-19 21:25:40 +01:00
parent d2e750ccd6
commit 1fe39b75db
4 changed files with 1 additions and 50 deletions

View File

@ -445,8 +445,7 @@ Input Commands that are Possibly Subject to Change
Undocumented commands: ``tv_start_scan``, ``tv_step_channel``, ``tv_step_norm``,
``tv_step_chanlist``, ``tv_set_channel``, ``tv_last_channel``, ``tv_set_freq``,
``tv_step_freq``, ``tv_set_norm``, ``dvb_set_channel``, ``radio_step_channel``,
``radio_set_channel``, ``radio_set_freq``, ``radio_step_freq`` (all of these
``tv_step_freq``, ``tv_set_norm``, ``dvb_set_channel`` (all of these
should be replaced by properties), ``stop`` (questionable use), ``get_property``
(?), ``vo_cmdline`` (experimental).

View File

@ -130,11 +130,6 @@ struct mp_cmd_def {
static const struct mp_cmd_def mp_cmds[] = {
{ MP_CMD_IGNORE, "ignore", },
{ MP_CMD_RADIO_STEP_CHANNEL, "radio_step_channel", { ARG_INT } },
{ MP_CMD_RADIO_SET_CHANNEL, "radio_set_channel", { ARG_STRING } },
{ MP_CMD_RADIO_SET_FREQ, "radio_set_freq", { ARG_FLOAT } },
{ MP_CMD_RADIO_STEP_FREQ, "radio_step_freq", {ARG_FLOAT } },
{ MP_CMD_SEEK, "seek", {
ARG_TIME,
OARG_CHOICE(0, ({"relative", 0}, {"0", 0}, {"-", 0},

View File

@ -60,14 +60,10 @@ enum mp_command_type {
MP_CMD_PRINT_TEXT,
MP_CMD_SHOW_TEXT,
MP_CMD_SHOW_PROGRESS,
MP_CMD_RADIO_STEP_CHANNEL,
MP_CMD_RADIO_SET_CHANNEL,
MP_CMD_RADIO_SET_FREQ,
MP_CMD_ADD,
MP_CMD_CYCLE,
MP_CMD_MULTIPLY,
MP_CMD_CYCLE_VALUES,
MP_CMD_RADIO_STEP_FREQ,
MP_CMD_TV_STEP_FREQ,
MP_CMD_TV_START_SCAN,
MP_CMD_STOP,

View File

@ -57,7 +57,6 @@
#include "audio/decode/dec_audio.h"
#include "options/path.h"
#include "stream/tv.h"
#include "stream/stream_radio.h"
#include "stream/pvr.h"
#if HAVE_DVBIN
#include "stream/dvbin.h"
@ -2868,44 +2867,6 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
(bar_osd ? OSD_SEEK_INFO_BAR : 0);
break;
#if HAVE_RADIO
case MP_CMD_RADIO_STEP_CHANNEL:
if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO) {
int v = cmd->args[0].v.i;
if (v > 0)
radio_step_channel(mpctx->stream, RADIO_CHANNEL_HIGHER);
else
radio_step_channel(mpctx->stream, RADIO_CHANNEL_LOWER);
if (radio_get_channel_name(mpctx->stream)) {
set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
"Channel: %s",
radio_get_channel_name(mpctx->stream));
}
}
break;
case MP_CMD_RADIO_SET_CHANNEL:
if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO) {
radio_set_channel(mpctx->stream, cmd->args[0].v.s);
if (radio_get_channel_name(mpctx->stream)) {
set_osd_msg(mpctx, OSD_MSG_RADIO_CHANNEL, osdl, osd_duration,
"Channel: %s",
radio_get_channel_name(mpctx->stream));
}
}
break;
case MP_CMD_RADIO_SET_FREQ:
if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO)
radio_set_freq(mpctx->stream, cmd->args[0].v.f);
break;
case MP_CMD_RADIO_STEP_FREQ:
if (mpctx->stream && mpctx->stream->type == STREAMTYPE_RADIO)
radio_step_freq(mpctx->stream, cmd->args[0].v.f);
break;
#endif
#if HAVE_TV
case MP_CMD_TV_START_SCAN:
if (get_tvh(mpctx))