Ticket #9867: 0045-TV-Disable-tuning-OSD-after-changing-channel-via-NET.patch

File 0045-TV-Disable-tuning-OSD-after-changing-channel-via-NET.patch, 3.5 KB (added by Lawrence Rust <lvr@…>, 9 years ago)
  • mythtv/libs/libmythtv/tv_play.cpp

    From b7b1ea567b8a5a22d097c1b54804d6d4c3f12c0a Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Fri, 24 Jun 2011 17:48:21 +0200
    Subject: [PATCH 45/47] TV: Disable tuning OSD after changing channel via NETWORK_CONTROL CHANID
    
    This disables the tuning OSD display when changing channel via a MythEvent.
    The intention is to provide a cleaner display for MHEG programs that change
    streams.
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/libs/libmythtv/tv_play.cpp |   23 ++++++++++++++---------
     mythtv/libs/libmythtv/tv_play.h   |    2 +-
     2 files changed, 15 insertions(+), 10 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
    index 004db3e..9b4e0bf 100644
    a b void TV::ChangeChannel(PlayerContext *ctx, uint chanid, const QString &chan) 
    69116911    if (ctx->player)
    69126912        ctx->player->GetAudio()->Reset();
    69136913
    6914     UnpauseLiveTV(ctx);
     6914    UnpauseLiveTV(ctx, chanid && GetQueuedChanID());
    69156915    PauseAudioUntilBuffered(ctx);
    69166916
    69176917    if (oldinputname != ctx->recorder->GetInput())
    void TV::customEvent(QEvent *e) 
    84568456        QStringList signalList = me->ExtraDataList();
    84578457
    84588458        PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__);
    8459         for (uint i = 0; mctx && (i < player.size()); i++)
     8459        OSD *osd = GetOSDLock(mctx);
     8460        if (osd && osd->IsWindowVisible("program_info"))
    84608461        {
    8461             PlayerContext *ctx = GetPlayer(mctx, i);
    8462             bool tc = ctx->recorder && (ctx->GetCardID() == cardnum);
    8463             if (tc && !signalList.empty())
     8462            for (uint i = 0; mctx && (i < player.size()); i++)
    84648463            {
    8465                 UpdateOSDSignal(ctx, signalList);
    8466                 UpdateOSDTimeoutMessage(ctx);
     8464                PlayerContext *ctx = GetPlayer(mctx, i);
     8465                bool tc = ctx->recorder && (ctx->GetCardID() == cardnum);
     8466                if (tc && !signalList.empty())
     8467                {
     8468                    UpdateOSDSignal(ctx, signalList);
     8469                    UpdateOSDTimeoutMessage(ctx);
     8470                }
    84678471            }
    84688472        }
     8473        ReturnOSDLock(mctx, osd);
    84698474        ReturnPlayerLock(mctx);
    84708475    }
    84718476
    void TV::PauseLiveTV(PlayerContext *ctx) 
    1118311188 *  \brief Used in ChangeChannel(), ChangeChannel(),
    1118411189 *         and ToggleInputs() to restart video output.
    1118511190 */
    11186 void TV::UnpauseLiveTV(PlayerContext *ctx)
     11191void TV::UnpauseLiveTV(PlayerContext *ctx, bool bQuietly /*=false*/)
    1118711192{
    1118811193    VERBOSE(VB_PLAYBACK, LOC + QString("UnpauseLiveTV() player ctx %1")
    1118911194            .arg(find_player_index(ctx)));
    void TV::UnpauseLiveTV(PlayerContext *ctx) 
    1120311208
    1120411209    ITVRestart(ctx, true);
    1120511210
    11206     if (ctx->HasPlayer())
     11211    if (ctx->HasPlayer() && !bQuietly)
    1120711212    {
    1120811213        UpdateOSDProgInfo(ctx, "program_info");
    1120911214        UpdateLCD();
  • mythtv/libs/libmythtv/tv_play.h

    diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
    index cece539..89230cf 100644
    a b class MPUBLIC TV : public QObject 
    361361    void ChangeChannel(PlayerContext*, int direction);
    362362    void ChangeChannel(PlayerContext*, uint chanid, const QString &channum);
    363363    void PauseLiveTV(PlayerContext*);
    364     void UnpauseLiveTV(PlayerContext*);
     364    void UnpauseLiveTV(PlayerContext*, bool bQuietly = false);
    365365
    366366    void ShowPreviousChannel(PlayerContext*);
    367367    void PopPreviousChannel(PlayerContext*, bool immediate_change);