On Friday 09 February 2007 21:03, Marko Mäkelä wrote:
> On Thu, Feb 08, 2007 at 10:26:00AM +0200, Marko Mäkelä wrote:
> > On Thu, Feb 08, 2007 at 08:50:00AM +0100, Stefan Lucke wrote:
> > > Transferring() was introduced in vdr-1.3.42. So this needs an extra #if
> > > # if VDRVERSNUM >= 10342
> > > 
> > > Looking at the implementation of Transferring() in device.c I'm just
> > > wondering of the difference compared to Replaying() 
> > > !Transferring() == true -> no player (player == NULL) or
> > > player is not derived from cTransfer.
> > > 
> > > device.c around line 948:
> > > 
> > > bool cDevice::Replaying(void) const
> > > {
> > >   return player != NULL;
> > > }
> > > 
> > > bool cDevice::Transferring(void) const
> > > {
> > >   return dynamic_cast<cTransfer *>(player) != NULL;
> > > }
> > 
> > It seems to me that Replaying() would always return true when called
> > from cSoftDevice::PlayVideo() or PlayAudio().  I would guess that
> > player != NULL when playing a recording or a live stream.
> > 
> > Are you suggesting that we should replace Transferring()
> > with dynamic_cast<cTransfer*>(player) to avoid the VDRVERSNUM check?
> 
> Hmm, the dynamic_cast won't work, because player is a private member of
> cDevice.
> 
> > There is another method that could possibly be used, something like
> > cPlayerControl::NowReplaying().  I don't have the source tree at hand
> > right now, but I can check it tonight.
> 
> cReplayControl::NowReplaying() looks efficient: a static method that
> references two static variables.  I tried replacing !Transferring()
> with cReplayControl::NowReplaying(), and it works.

NowReplaying() is even newer than Transferring(), appeared is 1.4.4 ;-) .

> 
> Conclusion: use !Transferring() with an appropriate VDRVERSNUM check.

Yes.

> Or does softdevice need to support the old development version of vdr?

Yes.

> The stable 1.4 series has been around for a while now.

softdevice-0.3.1 last release, had support for vdr.1.2.x .
We should support some older versions.

I know we have to make a new release. But I'm still busy on tv-out
sync issue., will soon commit some logging helper functions.

-- 
Stefan Lucke
_______________________________________________
Softdevice-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/softdevice-devel

Reply via email to