Skip to content

Commit

Permalink
TV: Disable tuning OSD after changing channel via NETWORK_CONTROL CHANID
Browse files Browse the repository at this point in the history
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. Refs #9867.

Signed-off-by: Paul Harrison <pharrison@mythtv.org>
  • Loading branch information
Lawrence Rust authored and Paul Harrison committed Jul 9, 2011
1 parent fc8ab7f commit 226d272
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -6766,7 +6766,7 @@ void TV::ChangeChannel(PlayerContext *ctx, uint chanid, const QString &chan)
if (ctx->player)
ctx->player->GetAudio()->Reset();

UnpauseLiveTV(ctx);
UnpauseLiveTV(ctx, chanid && GetQueuedChanID());

if (oldinputname != ctx->recorder->GetInput())
UpdateOSDInput(ctx);
Expand Down Expand Up @@ -8403,16 +8403,21 @@ void TV::customEvent(QEvent *e)
QStringList signalList = me->ExtraDataList();

PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__);
for (uint i = 0; mctx && (i < player.size()); i++)
OSD *osd = GetOSDLock(mctx);
if (osd && osd->IsWindowVisible("program_info"))
{
PlayerContext *ctx = GetPlayer(mctx, i);
bool tc = ctx->recorder && (ctx->GetCardID() == cardnum);
if (tc && !signalList.empty())
for (uint i = 0; mctx && (i < player.size()); i++)
{
UpdateOSDSignal(ctx, signalList);
UpdateOSDTimeoutMessage(ctx);
PlayerContext *ctx = GetPlayer(mctx, i);
bool tc = ctx->recorder && (ctx->GetCardID() == cardnum);
if (tc && !signalList.empty())
{
UpdateOSDSignal(ctx, signalList);
UpdateOSDTimeoutMessage(ctx);
}
}
}
ReturnOSDLock(mctx, osd);
ReturnPlayerLock(mctx);
}

Expand Down Expand Up @@ -11280,7 +11285,7 @@ void TV::PauseLiveTV(PlayerContext *ctx)
* \brief Used in ChangeChannel(), ChangeChannel(),
* and ToggleInputs() to restart video output.
*/
void TV::UnpauseLiveTV(PlayerContext *ctx)
void TV::UnpauseLiveTV(PlayerContext *ctx, bool bQuietly /*=false*/)
{
LOG(VB_PLAYBACK, LOG_INFO, LOC + QString("UnpauseLiveTV() player ctx %1")
.arg(find_player_index(ctx)));
Expand All @@ -11300,7 +11305,7 @@ void TV::UnpauseLiveTV(PlayerContext *ctx)

ITVRestart(ctx, true);

if (ctx->HasPlayer())
if (ctx->HasPlayer() && !bQuietly)
{
UpdateOSDProgInfo(ctx, "program_info");
UpdateLCD();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/tv_play.h
Expand Up @@ -334,7 +334,7 @@ class MTV_PUBLIC TV : public QObject
void ChangeChannel(PlayerContext*, int direction);
void ChangeChannel(PlayerContext*, uint chanid, const QString &channum);
void PauseLiveTV(PlayerContext*);
void UnpauseLiveTV(PlayerContext*);
void UnpauseLiveTV(PlayerContext*, bool bQuietly = false);

void ShowPreviousChannel(PlayerContext*);
void PopPreviousChannel(PlayerContext*, bool immediate_change);
Expand Down

0 comments on commit 226d272

Please sign in to comment.