LinuxTV Patchwork cSoftDevice::StillPicture() not updating video in VDR 2.0

login
register
mail settings
Submitter Marko Mäkelä
Date May 31, 2014, 9:52 a.m.
Message ID <20140531095258.GA3411@x60s>
Download mbox | patch
Permalink /patch/24112/
State New
Headers show

Comments

Marko Mäkelä - May 31, 2014, 9:52 a.m.
On Wed, Dec 25, 2013 at 04:50:39PM +0200, Marko Mäkelä wrote:
>After upgrading to VDR 2.0, I got Softdevice to almost work (see the 
>mail archive a couple of months ago). Sometimes it is showing garbage 
>(really random noise) on the MGA350 OSD layer; I can live with that, 
>as this box is only used for infrequent recordings.

I guess that I removed some memset() call that was essential, when I was 
trying to debug the display of subtitles. Apparently when no OSD layer 
is displayed on top of the video layer, the memory can be reused for 
something else, and I have to clear it again before enabling the OSD 
layer display.

>The last annoying problem is that going to the next or previous I-frame 
>when editing (buttons 4 and 6 on the remote control) are not updating 
>the video screen at all. Only the edit mark is moving on the OSD layer.  
>If I press Play, it will start playing from the current edit mark. So, 
>it is possible but much more clumsy to cut recordings.

Today I found an old PES recording from VDR 1.6, and to my surprise I 
did see the still frames when moving the edit mark around by pressing 4 
or 6.

So, it seems that in order to fix this for TS video, I would have to do 
something differently. That something is actually documented in 
device.h:

  virtual void StillPicture(const uchar *Data, int Length);
       ///< Displays the given I-frame as a still picture.
       ///< Data points either to TS (first byte is 0x47) or PES (first 
       //byte
       ///< is 0x00) data of the given Length. The default 
       //implementation
       ///< converts TS to PES and calls itself again, allowing a 
       //derived class
       ///< to display PES if it can't handle TS directly.

SoftHDDevice is implementing the TS to PES conversion exactly like that.  
With the following patch, also Softdevice is doing the trick:


I guess I might soon set up a repository on vdr-developer.org for the 
revived Softdevice. If not for anything else, it would be the Linus 
method of backing up. :)

	Marko

Patch

--- softdevice.c	2011-04-17 20:22:19.000000000 +0300
+++ softdevice.c	2014-05-31 12:00:21.159478808 +0300
@@ -527,7 +527,9 @@  void cSoftDevice::SetVolumeDevice(int Vo
 void cSoftDevice::StillPicture(const uchar *Data, int Length)
 {
     SOFTDEB("StillPicture...\n");
-    if (decoder)
+    if (Data[0] == 0x47) // TS packet?
+      cDevice::StillPicture(Data, Length); // convert to PES and call 
us again
+    else if (decoder)
       decoder->StillPicture((uchar *)Data,Length);
 }

Privacy Policy