diff options
author | Thomas Günther <tom@toms-cafe.de> | 2009-07-17 00:58:49 +0200 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-07-17 01:17:52 +0200 |
commit | 56ecb9dadf63f61d227c6b8acd05dcc1da17365f (patch) | |
tree | f1ff697bceb66877e08c18b55c897f875cc3e320 /display.c | |
parent | 97c5f35c27dc65f3bc2ee9fe338f7341d65f1446 (diff) | |
download | vdr-plugin-text2skin-56ecb9dadf63f61d227c6b8acd05dcc1da17365f.tar.gz vdr-plugin-text2skin-56ecb9dadf63f61d227c6b8acd05dcc1da17365f.tar.bz2 |
Adapted to new recording format and variable frame rate (VDR >= 1.7.3)
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 42 |
1 files changed, 28 insertions, 14 deletions
@@ -165,20 +165,20 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) case tPresentProgress: return mPresent != NULL - ? (cxType)DurationType((time(NULL) - mPresent->StartTime()) * FRAMESPERSEC, + ? (cxType)DurationType(time(NULL) - mPresent->StartTime(), Token.Attrib.Text) : (cxType)false; case tPresentDuration: return mPresent != NULL - ? (cxType)DurationType(mPresent->Duration() * FRAMESPERSEC, Token.Attrib.Text) + ? (cxType)DurationType(mPresent->Duration(), Token.Attrib.Text) : (cxType)false; case tPresentRemaining: if (mPresent != NULL && time(NULL) - mPresent->StartTime() <= mPresent->Duration()) { - return (cxType)DurationType((mPresent->Duration() - (time(NULL) - mPresent->StartTime())) - * FRAMESPERSEC, Token.Attrib.Text); + return (cxType)DurationType(mPresent->Duration() - (time(NULL) - mPresent->StartTime()), + Token.Attrib.Text); } return false; @@ -214,7 +214,7 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) case tFollowingDuration: return mFollowing != NULL - ? (cxType)DurationType(mFollowing->Duration() * FRAMESPERSEC, Token.Attrib.Text) + ? (cxType)DurationType(mFollowing->Duration(), Token.Attrib.Text) : (cxType)false; case tFollowingTitle: @@ -511,10 +511,14 @@ cxType cText2SkinDisplayReplay::GetTokenData(const txToken &Token) return mTitle; case tReplayPositionIndex: - return DurationType(mCurrent, Token.Attrib.Text); + return DurationType(mCurrent, + Text2SkinStatus.ReplayFramesPerSecond(), + Token.Attrib.Text); case tReplayDurationIndex: - return DurationType(mTotal, Token.Attrib.Text); + return DurationType(mTotal, + Text2SkinStatus.ReplayFramesPerSecond(), + Token.Attrib.Text); case tReplayPosition: return mPosition; @@ -523,7 +527,9 @@ cxType cText2SkinDisplayReplay::GetTokenData(const txToken &Token) return mDuration; case tReplayRemaining: - return DurationType(mTotal - mCurrent, Token.Attrib.Text); + return DurationType(mTotal - mCurrent, + Text2SkinStatus.ReplayFramesPerSecond(), + Token.Attrib.Text); case tReplayPrompt: return mPrompt; @@ -1060,19 +1066,19 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) case tPresentProgress: return mEvent != NULL - ? (cxType)DurationType((time(NULL) - mEvent->StartTime()) * FRAMESPERSEC, + ? (cxType)DurationType(time(NULL) - mEvent->StartTime(), Token.Attrib.Text) : (cxType)false; case tPresentDuration: return mEvent != NULL - ? (cxType)DurationType(mEvent->Duration() * FRAMESPERSEC, Token.Attrib.Text) + ? (cxType)DurationType(mEvent->Duration(), Token.Attrib.Text) : (cxType)false; case tPresentRemaining: return mEvent != NULL - ? (cxType)DurationType((mEvent->Duration() - (time(NULL) - mEvent->StartTime())) - * FRAMESPERSEC, Token.Attrib.Text) + ? (cxType)DurationType(mEvent->Duration() - (time(NULL) - mEvent->StartTime()), + Token.Attrib.Text) : (cxType)false; case tPresentTitle: @@ -1330,12 +1336,20 @@ cxType cText2SkinDisplayMenu::GetTokenData(const txToken &Token) case tRecordingLength: return mRecording != NULL - ? (cxType)GetRecordingLength(mRecording->FileName()) +#if VDRVERSNUM >= 10703 + ? (cxType)GetRecordingLength(mRecording->FileName(), mRecording->FramesPerSecond(), mRecording->IsPesRecording()) +#else + ? (cxType)GetRecordingLength(mRecording->FileName(), FRAMESPERSEC, true) +#endif : (cxType)false; case tRecordingCuttedLength: return mRecording != NULL - ? (cxType)GetRecordingCuttedLength(mRecording->FileName()) +#if VDRVERSNUM >= 10703 + ? (cxType)GetRecordingCuttedLength(mRecording->FileName(), mRecording->FramesPerSecond(), mRecording->IsPesRecording()) +#else + ? (cxType)GetRecordingCuttedLength(mRecording->FileName(), FRAMESPERSEC, true) +#endif : (cxType)false; default: |