summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c
index 941dd34ec5..470fcc7b0f 100644
--- a/player/command.c
+++ b/player/command.c
@@ -2999,6 +2999,27 @@ static int mp_property_dvb_channel(void *ctx, struct m_property *prop,
return M_PROPERTY_NOT_IMPLEMENTED;
}
+static int mp_property_dvb_channel_name(void *ctx, struct m_property *prop,
+ int action, void *arg)
+{
+ MPContext *mpctx = ctx;
+ int r;
+ switch (action) {
+ case M_PROPERTY_SET:
+ r = prop_stream_ctrl(mpctx, STREAM_CTRL_DVB_SET_CHANNEL_NAME, arg);
+ if (r == M_PROPERTY_OK && !mpctx->stop_play)
+ mpctx->stop_play = PT_RELOAD_FILE;
+ return r;
+ case M_PROPERTY_GET: {
+ return prop_stream_ctrl(mpctx, STREAM_CTRL_DVB_GET_CHANNEL_NAME, arg);
+ }
+ case M_PROPERTY_GET_TYPE:
+ *(struct m_option *)arg = (struct m_option){.type = CONF_TYPE_STRING};
+ return M_PROPERTY_OK;
+ }
+ return M_PROPERTY_NOT_IMPLEMENTED;
+}
+
static int mp_property_playlist_pos(void *ctx, struct m_property *prop,
int action, void *arg)
{
@@ -3626,6 +3647,7 @@ static const struct m_property mp_properties[] = {
{"tv-scan", mp_property_tv_scan},
{"tv-channel", mp_property_tv_channel},
{"dvb-channel", mp_property_dvb_channel},
+ {"dvb-channel-name", mp_property_dvb_channel_name},
{"cursor-autohide", mp_property_cursor_autohide},