Ticket #13383: 20190215_1358_liveTV_delay.patch

File 20190215_1358_liveTV_delay.patch, 2.7 KB (added by Peter Bennett, 20 months ago)

Patch for Live TV delay setting.

  • mythtv/libs/libmythtv/tv_play.cpp

    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index ea0aa806d59..0ad00a335ba 100644
    a b bool TV::StartTV(ProgramInfo *tvrec, uint flags, 
    409409                startSysEventSent = true;
    410410                startLivetvEventSent = true;
    411411                gCoreContext->SendSystemEvent("LIVETV_STARTED");
     412                usleep(gCoreContext->GetNumSetting("LiveTVWaitMS", 0)*1000);
    412413            }
    413414
    414415            LOG(VB_PLAYBACK, LOG_DEBUG, LOC + "tv->LiveTV() -- end");
    void TV::SwitchInputs(PlayerContext *ctx, 
    74797480        delete testrec;
    74807481    }
    74817482
     7483    usleep(gCoreContext->GetNumSetting("LiveTVWaitMS", 0)*1000);
    74827484    UnpauseLiveTV(ctx);
    74837485    UpdateOSDInput(ctx);
    74847486
    void TV::ChangeChannel(PlayerContext *ctx, ChannelChangeDirection direction) 
    77957797    if (ctx->player)
    77967798        ctx->player->GetAudio()->Reset();
    77977799
     7800    usleep(gCoreContext->GetNumSetting("LiveTVWaitMS", 0)*1000);
    77987801    UnpauseLiveTV(ctx);
    77997802
    78007803    if (oldinputname != ctx->recorder->GetInput())
    void TV::ChangeChannel(PlayerContext *ctx, uint chanid, const QString &chan) 
    79647967    if (ctx->player)
    79657968        ctx->player->GetAudio()->Reset();
    79667969
     7970    usleep(gCoreContext->GetNumSetting("LiveTVWaitMS", 0)*1000);
    79677971    UnpauseLiveTV(ctx, chanid && GetQueuedChanID());
    79687972
    79697973    if (oldinputname != ctx->recorder->GetInput())
  • mythtv/programs/mythfrontend/globalsettings.cpp

    diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
    index e0551ef2840..b963a8dce87 100644
    a b static HostSpinBoxSetting *LiveTVIdleTimeout() 
    18101810    return gs;
    18111811}
    18121812
     1813static HostSpinBoxSetting *LiveTVWaitMS()
     1814{
     1815    HostSpinBoxSetting *gs = new HostSpinBoxSetting("LiveTVWaitMS", 0, 10000, 100);
     1816
     1817    gs->setLabel(PlaybackSettings::tr("Live TV wait (milliseconds)"));
     1818
     1819    gs->setValue(0);
     1820
     1821    gs->setHelpText(PlaybackSettings::tr("Wait the specified number of milliseconds "
     1822                                         "before beginning playback of Live TV "
     1823                                         "to avoid stuttering during the first minute"));
     1824    return gs;
     1825}
     1826
     1827
    18131828// static HostCheckBoxSetting *PlaybackPreview()
    18141829// {
    18151830//     HostCheckBoxSetting *gc = new HostCheckBoxSetting("PlaybackPreview");
    void PlaybackSettings::Load(void) 
    42244239    general->addChild(UseProgStartMark());
    42254240    general->addChild(AutomaticSetWatched());
    42264241    general->addChild(ContinueEmbeddedTVPlay());
     4242    general->addChild(LiveTVWaitMS());
    42274243    general->addChild(LiveTVIdleTimeout());
    42284244
    42294245#if CONFIG_DEBUGTYPE