[vdr] Improve SVDRP GRAB ...

Herbert Poetzl herbert at 13thfloor.at
Wed Jun 11 15:41:00 CEST 2008


Greetings!

I would like to 'improve' (or simply extend)
the SVDRP Grab command to allow for grabbing
a picture from a given channel, if possible,
without disturbing normal operations

basic idea:

 get a device which is capable of tuning
 the specified channel (optionally shared
 transponder)

 tune to the channel/stream, and wait until
 data is available (or some timeout has been
 reached)

 grab a screenshot (similar to current grab)


now, what I tried so far is the following
(with little success :)

  cChannel *gChan = Channels.GetByNumber(ChanNum);
  cDevice *gDev = cDevice::GetDevice(gChan, 0, 1);
  gDev->SwitchChannel(gChan, 1);
  if (gDev->HasLock(5000) && gDev->HasProgramme())
     Image = gDev->GrabImage(ImageSize, Jpeg, Quality, SizeX, SizeY);

the problems with this approach are:

  the primary device changes, even if the
  transponder is the same

  the grabbed image is black, because the 
  data is not available when the actual grab
  happens

any suggestions how to do that properly?

TIA,
Herbert




More information about the vdr mailing list