Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MythTV/mythtv
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Dec 13, 2010
2 parents b7ea1c1 + 604cf0e commit 62cc838
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
6 changes: 2 additions & 4 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -3312,10 +3312,8 @@ bool MythPlayer::IsReallyNearEnd(void) const
}

/** \brief Returns true iff near end of recording.
* \param margin minimum number of frames we want before being near end,
* defaults to 2 seconds of video.
*/
bool MythPlayer::IsNearEnd(int64_t margin)
bool MythPlayer::IsNearEnd(void)
{
uint64_t framesRead, framesLeft = 0;

Expand All @@ -3331,7 +3329,7 @@ bool MythPlayer::IsNearEnd(int64_t margin)
}
player_ctx->UnlockPlayingInfo(__FILE__, __LINE__);

margin = (margin >= 0) ? margin: (long long) (video_frame_rate*2);
long long margin = (long long)(video_frame_rate * 2);
margin = (long long) (margin * audio.GetStretchFactor());
bool watchingTV = watchingrecording && player_ctx->recorder &&
player_ctx->recorder->IsValidRecorder();
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mythplayer.h
Expand Up @@ -194,7 +194,7 @@ class MPUBLIC MythPlayer
bool IsPlaying(uint wait_ms = 0, bool wait_for = true) const;
bool AtNormalSpeed(void) const { return next_normal_speed; }
bool IsReallyNearEnd(void) const;
bool IsNearEnd(int64_t framesRemaining = -1);
bool IsNearEnd(void);
bool HasAudioOut(void) const { return audio.HasAudioOut(); }
bool IsPIPActive(void) const { return pip_active; }
bool IsPIPVisible(void) const { return pip_visible; }
Expand Down
7 changes: 0 additions & 7 deletions mythtv/libs/libmythtv/playercontext.cpp
Expand Up @@ -161,13 +161,6 @@ bool PlayerContext::IsPBPSupported(void) const
return supported;
}

bool PlayerContext::IsOSDFullScreen(void) const
{
// Note: This is to allow future OSD implementations to cover
// two or more PBP screens.
return false;
}

void PlayerContext::CreatePIPWindow(const QRect &rect, int pos,
QWidget *widget)
{
Expand Down
1 change: 0 additions & 1 deletion mythtv/libs/libmythtv/playercontext.h
Expand Up @@ -140,7 +140,6 @@ class MPUBLIC PlayerContext
// Boolean Gets
bool IsPIPSupported(void) const;
bool IsPBPSupported(void) const;
bool IsOSDFullScreen(void) const;
bool IsPIP(void) const
{ return (kPIPonTV == pipState) || (kPIPStandAlone == pipState); }
bool IsPBP(void) const
Expand Down
9 changes: 2 additions & 7 deletions mythtv/libs/libmythtv/tv_play.cpp
Expand Up @@ -7863,13 +7863,8 @@ void TV::DoEditSchedule(int editType)
pause_active = !actx->player || !actx->player->getVideoOutput();
if (actx->player && actx->player->getVideoOutput())
allowEmbedding = actx->player->getVideoOutput()->AllowPreviewEPG();

if (!pause_active)
{
long long margin = (long long)
(actx->last_framerate * actx->player->GetAudioStretchFactor());
isNearEnd = actx->player->IsNearEnd(margin);
}
isNearEnd = actx->player->IsNearEnd();
actx->UnlockDeletePlayer(__FILE__, __LINE__);
}

Expand Down Expand Up @@ -11912,7 +11907,7 @@ OSD *TV::GetOSDL(const PlayerContext *ctx, const char *file, int location)
const PlayerContext *mctx = GetPlayer(ctx, 0);

mctx->LockDeletePlayer(file, location);
if (mctx->player && (ctx->IsPIP() || mctx->IsOSDFullScreen()))
if (mctx->player && ctx->IsPIP())
{
mctx->LockOSD();
OSD *osd = mctx->player->GetOSD();
Expand Down

0 comments on commit 62cc838

Please sign in to comment.