Skip to content

Commit

Permalink
Revert mythplayer portion of 7c7852f and tv_rec portion of 0349883.
Browse files Browse the repository at this point in the history
Refs #10490
  • Loading branch information
stichnot committed Apr 23, 2012
1 parent 2e56c25 commit 3564049
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
26 changes: 0 additions & 26 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -2446,7 +2446,6 @@ void MythPlayer::SwitchToProgram(void)
return;
}

#if 0
player_ctx->buffer->OpenFile(
pginfo->GetPlaybackURL(), RingBuffer::kLiveTVOpenTimeout);

Expand All @@ -2461,7 +2460,6 @@ void MythPlayer::SwitchToProgram(void)
delete pginfo;
return;
}
#endif

if (GetEof())
{
Expand All @@ -2478,30 +2476,6 @@ void MythPlayer::SwitchToProgram(void)
player_ctx->tvchain->SetProgram(*pginfo);
if (decoder)
decoder->SetProgramInfo(*pginfo);
}

player_ctx->buffer->OpenFile(
pginfo->GetPlaybackURL(), RingBuffer::kLiveTVOpenTimeout);

if (!player_ctx->buffer->IsOpen())
{
LOG(VB_GENERAL, LOG_ERR, LOC + "SwitchToProgram's OpenFile failed " +
QString("(card type: %1).")
.arg(player_ctx->tvchain->GetCardType(newid)));
LOG(VB_GENERAL, LOG_ERR, player_ctx->tvchain->toString());
SetEof(true);
SetErrored(QObject::tr("Error opening switch program buffer"));
delete pginfo;
return;
}

if (discontinuity || newtype)
{
#if 0
player_ctx->tvchain->SetProgram(*pginfo);
if (decoder)
decoder->SetProgramInfo(*pginfo);
#endif

player_ctx->buffer->Reset(true);
if (newtype)
Expand Down
11 changes: 1 addition & 10 deletions mythtv/libs/libmythtv/tv_rec.cpp
Expand Up @@ -4445,19 +4445,15 @@ bool TVRec::SwitchLiveTVRingBuffer(const QString & channum,
pginfo->MarkAsInUse(true, kRecorderInUseID);
pginfo->SaveAutoExpire(kLiveTVAutoExpire);
pginfo->ApplyRecordRecGroupChange("LiveTV");
#if 0
tvchain->AppendNewProgram(pginfo, channel->GetCurrentName(),
channel->GetCurrentInput(), discont);
#endif
bool delete_pg = false;

if (set_rec && recorder)
{
recorder->SetNextRecording(pginfo, rb);
if (discont)
recorder->CheckForRingBufferSwitch();
//delete pginfo;
delete_pg = true;
delete pginfo;
SetFlags(kFlagRingBufferReady);
}
else if (!set_rec)
Expand All @@ -4474,11 +4470,6 @@ bool TVRec::SwitchLiveTVRingBuffer(const QString & channum,
SetRingBuffer(rb);
}

tvchain->AppendNewProgram(pginfo, channel->GetCurrentName(),
channel->GetCurrentInput(), discont);
if (delete_pg)
delete pginfo;

return true;
}

Expand Down

0 comments on commit 3564049

Please sign in to comment.