Opened 10 years ago
Closed 10 years ago
Last modified 9 years ago
#12146 closed Developer Task (fixed)
In progress recordings do not always have up to date size/duration
Reported by: | JYA | Owned by: | jpoet |
---|---|---|---|
Priority: | minor | Milestone: | 0.27 |
Component: | MythTV - Video Playback | Version: | Unspecified |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
MythPlayer? keeps internally the total number of frames of the video being played and its duration.
Those two values will be updated when the position map is updated by the decoder, when it finds an inconsistencies between the position being played and its size.
When the position map is updated, the decoder will call back MythPlayer::SetFileLength? is called.
MythPlayer? itself can force an update to the position map when calling TranslatePositionFrameToMs? or TranslatePositionMsToFrame?.
this will call DecoderBase::TranslatePositionFrameToMs? which in turn will check that the position map has information required. If not it will force a call to SyncPositionMap?() which in turn will call back MythPlayer::SetFileLength?
There is an issue however, in that from time to time, a call to TranslatePositionFrameToMs? with a total frame count that is completely inaccurate doesn't trigger a call to SyncPositionMap?() which results in an incorrect calculated value.
This cause failure to seek in an in progress recording (or last liveTV program).
Why would the position map not be refreshed when you attempt to seek into a position is the core issue.
Right now, I've added some workaround in places that required an up to date value of MythPlayer::totalFrames: in MythPlayer::CalcMaxFFTime and MythPlayer::FindFrame? but I feel that this is just a dirty work around, and that earlier call to TranslatePositionFrameToMs? and TranslatePositionFrameToMs? should have forced an update...
To test, attached is a patch that makes the backend records 3 minutes recordings in liveTV.
To test, start liveTV and let it go until it jumps to the next program (it will occur before 3 minutes). Make sure you are playing live (within a few seconds of the actual end position). After about a minute rewind.
In MythPlayer::Rewind() have a breakpoint on
float current = ComputeSecs(framesPlayed, true);
You can verify here that framesPlayed is superior to totalFrames , which signal an inconsistency.
ComputeSecs? calls TranslatePositionFrameToMs?, which should force an update to the position map. but it doesn't
Attachments (1)
Change History (5)
Changed 10 years ago by
Attachment: | livetv3min.patch added |
---|
comment:1 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 10 years ago by
Actually, what fix the issue was: 632cf60862dd106f89db4121b7c592e37694cd58
comment:4 Changed 9 years ago by
Milestone: | unknown → 0.27 |
---|
In 244ce4feecd1df80c915023540a73684140d037a/mythtv: