[vdr] Understanding the dataflow
udo_richter at gmx.de
Sat Apr 21 15:02:01 CEST 2012
Am 20.04.2012 23:58, schrieb Roland Tapken:
> What is cPlayer? As cTransfer implements both cReceiver and cTransfer I
> thought about it as some kind of frontend abstraction (FF-output, xine,
> streamdev-server). But it seems that cPlayer directly acts on cDevice, and
> that doesn't make sense to me at the moment.
> Furthermore, I'm still not quote sure where all these components where
> attached to each other.
A cDevice can be both, input device and output device.
A cReceiver can generally receive stream data like video, audio,
subtitles, teletext, EPG, and so on, from a device.
A cPlayer provides video/audio data for replay and feeds it into the
A cControl acts as the controlling interface of a cPlayer. It can handle
keyboard and OSD interaction for a cPlayer device.
A cTransfer is a cReceiver and a cPlayer, and just pumps data between
One thing to understand is that a cDevice can be stream source and
output device at the same time. Generally, if you switch to a channel,
the output device will be asked to show a specific channel. Only if the
device itself is unable to do this on its own, a different device will
provide the video stream, and a cTransfer is created to transport all
the data from the receiving to the output device. 'Full Featured'
devices can handle all of this internally. TT-6400 cards, for example,
even continue to display live TV while the computer is rebooting.
The general way to switch to a channel is:
- cDevice::PrimaryDevice()->SwitchChannel(channel, LiveView)
Instruct the primary device to switch to a channel
- cDevice::SetChannel(Channel, LiveView)
Actually handles the switch
- cDevice::GetDevice(Channel, Priority, LiveView, Query)
Picks the device that will be receiving. Tries hard to prefer the
primary device (output device) as source device too.
If receiving device is an other than the output device, a transfer
control / transfer device is created to link them.
One more thing to be aware of: Old non-HD FF cards can only either
receive or directly display a video stream. If you watch and record a
stream, the recording will usually be on a different device, so two
devices will tune to that channel. If there is no other device, and both
need to use the same receiving device, then live viewing has to be done
using transfer mode. (might break on high bandwidth channels.) I'm not
completely sure where in the code this is handled, though.
AFAIK the TT6400 cards technically can record and display at the same
time, but I'm also not sure whether this is already implemented or still
handled the 'old' way.
More information about the vdr