News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

missing some seconds at the end of a recording

Started by avvdr, December 26, 2008, 13:04:30

Previous topic - Next topic

avvdr

In the german vdr forum we had some reports about missing the last seconds when playing a VDR recording.
See http://www.vdr-portal.de/board/thread.php?postid=766497#post766497

As I understand the code, this is related to the buffers in the stream classes. The playerlivetv will stop it's thread (and this way dismiss) as soon as it has delivered the last packet to the demuxer. But afterwards there is still a lot of data in the buffers...

My solution in the playermedia is the following:
1. remember the last parsed PTS in the demuxer (i.e. the packet just delivered to the stream)
2. when the last chunk of data has been delivered to the demux I start a timer (max. 15s) and in parallel wait until video has seen the last delivered PTS.
3. if video has seen the last PTS I start another timer of 3s to have the last frames
4. if either the first or the second (short) timer fire I will stop

I guess the same solution could be used for the recordings player.

Regards
Andreas