Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Calculate current playback position using frame count and frame rate.

According to Taylor Ralph, the code which uses timestamps is not
finished and shouldn't be used yet.  For one thing, it doesn't handle
discontinuities in the timestamps.

Note: timestamps are still used sometimes to calculate recording
lengths.  That will need to be fixed in a future commit.

(cherry picked from commit 2861862)
  • Loading branch information...
commit 099533dacc0faef47aadfbe7b45ab93ff57f5125 1 parent 96af9b0
David Engel gigem authored

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. +4 0 mythtv/libs/libmythtv/mythplayer.cpp
4 mythtv/libs/libmythtv/mythplayer.cpp
@@ -4598,9 +4598,13 @@ int MythPlayer::GetSecondsBehind(void) const
4598 4598
4599 4599 int64_t MythPlayer::GetSecondsPlayed(void)
4600 4600 {
  4601 +#if 0
4601 4602 return decoder->IsCodecMPEG() ?
4602 4603 (disp_timecode / 1000.f) :
4603 4604 (framesPlayed / video_frame_rate);
  4605 +#else
  4606 + return framesPlayed / video_frame_rate;
  4607 +#endif
4604 4608 }
4605 4609
4606 4610 int64_t MythPlayer::GetTotalSeconds(void) const

0 comments on commit 099533d

Please sign in to comment.
Something went wrong with that request. Please try again.