From e033f3c8bcf66de44b0cc25e543a85f19fc9f964 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 9 Jun 2014 23:38:28 +0200 Subject: command: redo ancient TV/DVB/PVR commands Convert all these commands to properties. (Except tv_last_channel, not sure what to do with this.) Also, internally, don't access stream details directly, but dispatch commands with stream ctrls. Many of the new properties are a bit strange, because they're write- only. Also remove some OSD output these commands produced, because I couldn't be bothered to port these. In general, this makes everything much cleaner, and will also make it easier to e.g. move the demuxer to its own thread. Don't bother updating input.conf, but changes.rst documents how old commands map to the new ones. Mostly untested, due to lack of hardware. --- player/loadfile.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'player/loadfile.c') diff --git a/player/loadfile.c b/player/loadfile.c index cc65aedd6d..26f6c3a0c5 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -1257,20 +1257,13 @@ goto_reopen_demuxer: ; //==================== START PLAYING ======================= if (!mpctx->d_video && !mpctx->d_audio) { + struct stream *s = mpctx->stream; MP_FATAL(mpctx, "No video or audio streams selected.\n"); -#if HAVE_DVBIN - if (mpctx->stream->type == STREAMTYPE_DVB) { - int dir; - int v = mpctx->last_dvb_step; - if (v > 0) - dir = DVB_CHANNEL_HIGHER; - else - dir = DVB_CHANNEL_LOWER; - - if (dvb_step_channel(mpctx->stream, dir)) + if (s->uncached_type == STREAMTYPE_DVB) { + int dir = mpctx->last_dvb_step; + if (stream_control(s, STREAM_CTRL_DVB_STEP_CHANNEL, &dir) > 0) mpctx->stop_play = PT_RELOAD_DEMUXER; } -#endif goto terminate_playback; } -- cgit v1.2.3