cDevice Class Reference

The cDevice class is the base from which actual devices can be derived. More...

#include <device.h>

Inheritance diagram for cDevice:

Inheritance graph
[legend]
Collaboration diagram for cDevice:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bool IsPrimaryDevice (void) const
int CardIndex (void) const
 Returns the card index of this device (0 ... MAXDEVICES - 1).
int DeviceNumber (void) const
 Returns the number of this device (0 ... numDevices).
virtual int ProvidesCa (const cChannel *Channel) const
virtual bool HasDecoder (void) const
 Tells whether this device has an MPEG decoder.
virtual cSpuDecoderGetSpuDecoder (void)
virtual bool ProvidesSource (int Source) const
 Returns true if this device can provide the given source.
virtual bool ProvidesTransponder (const cChannel *Channel) const
 XXX -> PLUGINS.html!
virtual bool ProvidesTransponderExclusively (const cChannel *Channel) const
virtual bool ProvidesChannel (const cChannel *Channel, int Priority=-1, bool *NeedsDetachReceivers=NULL) const
virtual bool IsTunedToTransponder (const cChannel *Channel)
virtual bool MaySwitchTransponder (void)
bool SwitchChannel (const cChannel *Channel, bool LiveView)
void ForceTransferMode (void)
 Forces the device into transfermode for the current channel.
virtual bool HasLock (int TimeoutMs=0)
virtual bool HasProgramme (void)
virtual int OpenFilter (u_short Pid, u_char Tid, u_char Mask)
void AttachFilter (cFilter *Filter)
 Attaches the given filter to this device.
void Detach (cFilter *Filter)
 Detaches the given filter from this device.
cCiHandlerCiHandler (void)
virtual ucharGrabImage (int &Size, bool Jpeg=true, int Quality=-1, int SizeX=-1, int SizeY=-1)
bool GrabImageFile (const char *FileName, bool Jpeg=true, int Quality=-1, int SizeX=-1, int SizeY=-1)
virtual void SetVideoDisplayFormat (eVideoDisplayFormat VideoDisplayFormat)
virtual void SetVideoFormat (bool VideoFormat16_9)
virtual eVideoSystem GetVideoSystem (void)
void ClrAvailableTracks (bool DescriptionsOnly=false, bool IdsOnly=false)
bool SetAvailableTrack (eTrackType Type, int Index, uint16_t Id, const char *Language=NULL, const char *Description=NULL)
const tTrackIdGetTrack (eTrackType Type)
int NumAudioTracks (void) const
eTrackType GetCurrentAudioTrack (void)
bool SetCurrentAudioTrack (eTrackType Type)
void EnsureAudioTrack (bool Force=false)
bool IsMute (void) const
bool ToggleMute (void)
 Turns the volume off or on and returns the new mute state.
int GetAudioChannel (void)
void SetAudioChannel (int AudioChannel)
void SetVolume (int Volume, bool Absolute=false)
virtual int64_t GetSTC (void)
virtual void TrickSpeed (int Speed)
virtual void Clear (void)
virtual void Play (void)
virtual void Freeze (void)
 Puts the device into "freeze frame" mode.
virtual void Mute (void)
virtual void StillPicture (const uchar *Data, int Length)
 Displays the given I-frame as a still picture.
virtual bool Poll (cPoller &Poller, int TimeoutMs=0)
virtual bool Flush (int TimeoutMs=0)
virtual int PlayPes (const uchar *Data, int Length, bool VideoOnly=false)
bool Replaying (void) const
 Returns true if we are currently replaying.
bool Transferring (void) const
 Returns true if we are currently in Transfer Mode.
void StopReplay (void)
 Stops the current replay session (if any).
bool AttachPlayer (cPlayer *Player)
 Attaches the given player to this device.
void Detach (cPlayer *Player)
 Detaches the given player from this device.
int Ca (void) const
 Returns the ca of the current receiving session(s).
bool Receiving (bool CheckAny=false) const
 Returns true if we are currently receiving.
bool AttachReceiver (cReceiver *Receiver)
 Attaches the given receiver to this device.
void Detach (cReceiver *Receiver)
 Detaches the given receiver from this device.
void DetachAll (int Pid)
 Detaches all receivers from this device for this pid.
void DetachAllReceivers (void)
 Detaches all receivers from this device.

Static Public Member Functions

static int NumDevices (void)
 Returns the total number of devices.
static bool WaitForAllDevicesReady (int Timeout=0)
static void SetUseDevice (int n)
static bool UseDevice (int n)
static bool SetPrimaryDevice (int n)
static cDevicePrimaryDevice (void)
 Returns the primary device.
static cDeviceActualDevice (void)
static cDeviceGetDevice (int Index)
static cDeviceGetDevice (const cChannel *Channel, int Priority=-1, bool *NeedsDetachReceivers=NULL)
static void Shutdown (void)
static bool SwitchChannel (int Direction)
static int CurrentChannel (void)
 Returns the number of the current channel on the primary device.
static void SetCurrentChannel (const cChannel *Channel)
static int CurrentVolume (void)

Protected Types

enum  ePidType {
  ptAudio, ptVideo, ptPcr, ptTeletext,
  ptDolby, ptOther
}

Protected Member Functions

 cDevice (void)
virtual ~cDevice ()
virtual bool Ready (void)
virtual void MakePrimaryDevice (bool On)
virtual bool SetChannelDevice (const cChannel *Channel, bool LiveView)
 Sets the device to the given channel (actual physical setup).
bool HasPid (int Pid) const
 Returns true if this device is currently receiving the given PID.
bool AddPid (int Pid, ePidType PidType=ptOther)
 Adds a PID to the set of PIDs this device shall receive.
void DelPid (int Pid, ePidType PidType=ptOther)
 Deletes a PID from the set of PIDs this device shall receive.
virtual bool SetPid (cPidHandle *Handle, int Type, bool On)
void StartSectionHandler (void)
virtual void SetAudioTrackDevice (eTrackType Type)
 Sets the current audio track to the given value.
virtual int GetAudioChannelDevice (void)
virtual void SetAudioChannelDevice (int AudioChannel)
 Sets the audio channel to stereo (0), mono left (1) or mono right (2).
virtual void SetVolumeDevice (int Volume)
 Sets the audio volume on this device (Volume = 0...255).
virtual void SetDigitalAudioDevice (bool On)
virtual bool CanReplay (void) const
 Returns true if this device can currently start a replay session.
virtual bool SetPlayMode (ePlayMode PlayMode)
virtual int PlayVideo (const uchar *Data, int Length)
virtual int PlayAudio (const uchar *Data, int Length, uchar Id)
virtual int PlayPesPacket (const uchar *Data, int Length, bool VideoOnly=false)
int Priority (void) const
virtual bool OpenDvr (void)
virtual void CloseDvr (void)
 Shuts down the DVR.
virtual bool GetTSPacket (uchar *&Data)

Static Protected Member Functions

static int NextCardIndex (int n=0)

Protected Attributes

cPidHandle pidHandles [MAXPIDHANDLES]
cCiHandlerciHandler

Static Protected Attributes

static int currentChannel = 1

Private Member Functions

eSetChannelResult SetChannel (const cChannel *Channel, bool LiveView)
 Sets the device to the given channel (general setup).
virtual void Action (void)

Private Attributes

int cardIndex
cSectionHandlersectionHandler
cEitFiltereitFilter
cPatFilterpatFilter
cSdtFiltersdtFilter
cNitFilternitFilter
tTrackId availableTracks [ttMaxTrackTypes]
eTrackType currentAudioTrack
cMutex mutexCurrentAudioTrack
int currentAudioTrackMissingCount
bool pre_1_3_19_PrivateStream
bool mute
int volume
cPlayerplayer
cPesAssemblerpesAssembler
cMutex mutexReceiver
cReceiverreceiver [MAXRECEIVERS]

Static Private Attributes

static int numDevices = 0
static int useDevice = 0
static cDevicedevice [MAXDEVICES] = { NULL }
static cDeviceprimaryDevice = NULL
static int nextCardIndex = 0

Classes

class  cPidHandle


Detailed Description

The cDevice class is the base from which actual devices can be derived.

Definition at line 96 of file device.h.


Member Enumeration Documentation

enum cDevice::ePidType [protected]

Enumerator:
ptAudio 
ptVideo 
ptPcr 
ptTeletext 
ptDolby 
ptOther 

Definition at line 264 of file device.h.


Constructor & Destructor Documentation

cDevice::cDevice ( void   )  [protected]

Definition at line 150 of file device.c.

References CardIndex(), cardIndex, ciHandler, ClrAvailableTracks(), currentAudioTrack, currentAudioTrackMissingCount, cSetup::CurrentVolume, device, eitFilter, esyslog, MAXDEVICES, MAXRECEIVERS, mute, nextCardIndex, nitFilter, numDevices, patFilter, pesAssembler, player, receiver, sdtFilter, sectionHandler, cThread::SetDescription(), Setup, SetVideoFormat(), ttNone, cSetup::VideoFormat, and volume.

Here is the call graph for this function:

cDevice::~cDevice (  )  [protected, virtual]

Definition at line 183 of file device.c.

References ciHandler, Detach(), eitFilter, MAXRECEIVERS, nitFilter, patFilter, pesAssembler, player, receiver, sdtFilter, and sectionHandler.

Here is the call graph for this function:


Member Function Documentation

static int cDevice::NumDevices ( void   )  [inline, static]

Returns the total number of devices.

Definition at line 103 of file device.h.

References numDevices.

Referenced by CamControl(), cMenuSetupCICAM::cMenuSetupCICAM(), cRecordControl::cRecordControl(), main(), cEITScanner::Process(), and cMenuSetupDVB::Setup().

bool cDevice::WaitForAllDevicesReady ( int  Timeout = 0  )  [static]

Waits until all devices have become ready, or the given Timeout (seconds) has expired. While waiting, the Ready() function of each device is called in turn, until they all return true.

Returns:
True if all devices have become ready within the given timeout.

Definition at line 197 of file device.c.

References device, numDevices, and Ready().

Referenced by main().

Here is the call graph for this function:

void cDevice::SetUseDevice ( int  n  )  [static]

Sets the 'useDevice' flag of the given device. If this function is not called before initializing, all devices will be used.

Definition at line 211 of file device.c.

References MAXDEVICES, and useDevice.

Referenced by main().

static bool cDevice::UseDevice ( int  n  )  [inline, static]

Tells whether the device with the given card index shall be used in this instance of VDR.

Definition at line 115 of file device.h.

References useDevice.

Referenced by cDvbDevice::Initialize().

bool cDevice::SetPrimaryDevice ( int  n  )  [static]

Sets the primary device to 'n'.

Parameters:
n must be in the range 1...numDevices.
Returns:
true if this was possible.

Definition at line 242 of file device.c.

References device, esyslog, isyslog, MakePrimaryDevice(), numDevices, primaryDevice, Setup, SetVideoFormat(), and cSetup::VideoFormat.

Referenced by main().

Here is the call graph for this function:

static cDevice* cDevice::PrimaryDevice ( void   )  [inline, static]

Returns the primary device.

Definition at line 122 of file device.h.

References primaryDevice.

Referenced by ActualDevice(), cControl::Attach(), cDisplayTracks::cDisplayTracks(), cDisplayVolume::cDisplayVolume(), cSVDRP::CmdCHAN(), cSVDRP::CmdDELC(), cSVDRP::CmdGRAB(), cSVDRP::CmdMOVC(), cSVDRP::CmdVOLU(), cDisplayTracks::Create(), cRecordControl::cRecordControl(), cMenuChannels::Delete(), cSkinSTTNGDisplayChannel::Flush(), main(), cMenuChannels::Move(), cDisplayChannel::NextAvailableChannel(), cEITScanner::Process(), cDisplayTracks::ProcessKey(), cDisplayVolume::ProcessKey(), cMenuSetupDVB::ProcessKey(), cMenuRecordings::Rewind(), SetTrackDescriptions(), cDisplayVolume::Show(), cMenuWhatsOn::Switch(), cMenuChannels::Switch(), SwitchChannel(), and cChannels::SwitchTo().

cDevice * cDevice::ActualDevice ( void   )  [static]

Returns the actual receiving device in case of Transfer Mode, or the primary device otherwise.

Definition at line 268 of file device.c.

References PrimaryDevice(), and cTransferControl::ReceiverDevice().

Referenced by main(), and cEITScanner::Process().

Here is the call graph for this function:

cDevice * cDevice::GetDevice ( int  Index  )  [static]

Gets the device with the given Index.

Parameters:
Index must be in the range 0..numDevices-1.
Returns:
A pointer to the device, or NULL if the Index was invalid.

Definition at line 276 of file device.c.

References device, and numDevices.

Referenced by CamControl(), cMenuSetupCICAM::cMenuSetupCICAM(), main(), cDisplayChannel::NextAvailableChannel(), cEITScanner::Process(), SetChannel(), cRecordControls::Start(), and SwitchChannel().

cDevice * cDevice::GetDevice ( const cChannel Channel,
int  Priority = -1,
bool *  NeedsDetachReceivers = NULL 
) [static]

Returns a device that is able to receive the given Channel at the given Priority, with the least impact on active recordings and live viewing. See ProvidesChannel() for more information on how priorities are handled, and the meaning of NeedsDetachReceivers.

Definition at line 281 of file device.c.

References device, HasDecoder(), IsPrimaryDevice(), max(), MAXPRIORITY, min(), numDevices, Priority(), ProvidesCa(), ProvidesChannel(), cTransferControl::ReceiverDevice(), and Receiving().

Here is the call graph for this function:

void cDevice::Shutdown ( void   )  [static]

Closes down all devices. Must be called at the end of the program.

Definition at line 314 of file device.c.

References device, numDevices, and primaryDevice.

Referenced by main().

bool cDevice::Ready ( void   )  [protected, virtual]

Returns true if this device is ready. Devices with conditional access hardware may need some time until they are up and running. This function is called in a loop at startup until all devices are ready (see WaitForAllDevicesReady()).

Reimplemented in cDvbDevice.

Definition at line 1166 of file device.c.

Referenced by WaitForAllDevicesReady().

int cDevice::NextCardIndex ( int  n = 0  )  [static, protected]

Calculates the next card index. Each device in a given machine must have a unique card index, which will be used to identify the device for assigning Ca parameters and deciding whether to actually use that device in this particular instance of VDR. Every time a new cDevice is created, it will be given the current nextCardIndex, and then nextCardIndex will be automatically incremented by 1. A derived class can determine whether a given device shall be used by checking UseDevice(NextCardIndex()). If a device is skipped, or if there are possible device indexes left after a derived class has set up all its devices, NextCardIndex(n) must be called, where n is the number of card indexes to skip.

Definition at line 217 of file device.c.

References esyslog, MAXDEVICES, and nextCardIndex.

Referenced by cDvbDevice::Initialize().

void cDevice::MakePrimaryDevice ( bool  On  )  [protected, virtual]

Informs a device that it will be the primary device. If there is anything the device needs to set up when it becomes the primary device (On = true) or to shut down when it no longer is the primary device (On = false), it should do so in this function.

Reimplemented in cDvbDevice.

Definition at line 238 of file device.c.

Referenced by SetPrimaryDevice().

bool cDevice::IsPrimaryDevice ( void   )  const [inline]

Definition at line 169 of file device.h.

References primaryDevice.

Referenced by cRcuRemote::ChannelSwitch(), GetDevice(), cDvbDevice::GetSpuDecoder(), main(), Priority(), cDvbDevice::ProvidesChannel(), SetChannel(), cDvbDevice::SetChannelDevice(), and StopReplay().

int cDevice::CardIndex ( void   )  const [inline]

Returns the card index of this device (0 ... MAXDEVICES - 1).

Definition at line 170 of file device.h.

References cardIndex.

Referenced by AddPid(), AttachReceiver(), cDevice(), cDvbDevice::cDvbDevice(), cStatusTest::ChannelSwitch(), cMenuSetupCICAM::cMenuSetupCICAM(), cRecordControl::cRecordControl(), cDvbDevice::GetSTC(), cDigiboxDevice::OpenDvr(), cDvbDevice::OpenDvr(), cDvbDevice::OpenFilter(), ProvidesCa(), cStatusTest::Recording(), SetChannel(), cDvbDevice::SetChannelDevice(), cDvbDevice::SetPid(), cDvbDevice::SetPlayMode(), and cRecordControls::Stop().

int cDevice::DeviceNumber ( void   )  const

Returns the number of this device (0 ... numDevices).

Definition at line 229 of file device.c.

References device, and numDevices.

Referenced by main(), cEITScanner::Process(), cRcuRemote::Recording(), and cRecordControls::Start().

int cDevice::ProvidesCa ( const cChannel Channel  )  const [virtual]

Checks whether this device provides the conditional access facilities to decrypt the given Channel. Returns 0 if the Channel can't be decrypted, 1 if this is a Free To Air channel or only exactly this device can decrypt it, and > 1 if this device can decrypt the Channel. If the result is greater than 1 and the device has more than one CAM, the value will be increased by the number of CAMs, which allows to select the device with the smallest number of CAMs in order to preserve resources for other recordings.

Reimplemented in cDvbDevice.

Definition at line 1171 of file device.c.

References cChannel::Ca(), Ca(), CA_DVB_MAX, and CardIndex().

Referenced by GetDevice(), and cDvbDevice::ProvidesCa().

Here is the call graph for this function:

bool cDevice::HasDecoder ( void   )  const [virtual]

Tells whether this device has an MPEG decoder.

Reimplemented in cDvbDevice.

Definition at line 258 of file device.c.

Referenced by CanReplay(), GetDevice(), and main().

cSpuDecoder * cDevice::GetSpuDecoder ( void   )  [virtual]

Returns a pointer to the device's SPU decoder (or NULL, if this device doesn't have an SPU decoder).

Reimplemented in cDvbDevice.

Definition at line 263 of file device.c.

Referenced by SetVideoDisplayFormat().

bool cDevice::ProvidesSource ( int  Source  )  const [virtual]

Returns true if this device can provide the given source.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 524 of file device.c.

bool cDevice::ProvidesTransponder ( const cChannel Channel  )  const [virtual]

XXX -> PLUGINS.html!

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 529 of file device.c.

Referenced by main(), cEITScanner::Process(), and ProvidesTransponderExclusively().

bool cDevice::ProvidesTransponderExclusively ( const cChannel Channel  )  const [virtual]

Returns true if this is the only device that is able to provide the given channel's transponder.

Definition at line 534 of file device.c.

References device, numDevices, and ProvidesTransponder().

Referenced by main(), and cEITScanner::Process().

Here is the call graph for this function:

bool cDevice::ProvidesChannel ( const cChannel Channel,
int  Priority = -1,
bool *  NeedsDetachReceivers = NULL 
) const [virtual]

Returns true if this device can provide the given channel. In case the device has cReceivers attached to it or it is the primary device, Priority is used to decide whether the caller's request can be honored. The special Priority value -1 will tell the caller whether this device is principally able to provide the given Channel, regardless of any attached cReceivers. If NeedsDetachReceivers is given, the resulting value in it will tell the caller whether or not it will have to detach any currently attached receivers from this device before calling SwitchChannel. Note that the return value in NeedsDetachReceivers is only meaningful if the function itself actually returns true. The default implementation always returns false, so a derived cDevice class that can provide channels must implement this function.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 543 of file device.c.

Referenced by GetDevice(), cDisplayChannel::NextAvailableChannel(), SetChannel(), and SwitchChannel().

bool cDevice::IsTunedToTransponder ( const cChannel Channel  )  [virtual]

Returns true if this device is currently tuned to the given Channel's transponder.

Reimplemented in cDvbDevice.

Definition at line 548 of file device.c.

Referenced by main().

bool cDevice::MaySwitchTransponder ( void   )  [virtual]

Returns true if it is ok to switch the transponder on this device, without disturbing any other activities.

Definition at line 553 of file device.c.

References cDevice::cPidHandle::pid, pidHandles, ptAudio, ptDolby, ptVideo, and Receiving().

Referenced by main(), and cEITScanner::Process().

Here is the call graph for this function:

bool cDevice::SwitchChannel ( const cChannel Channel,
bool  LiveView 
)

Switches the device to the given Channel, initiating transfer mode if necessary.

Definition at line 558 of file device.c.

References esyslog, isyslog, cSkins::Message(), mtError, mtInfo, cChannel::Number(), scrFailed, scrNotAvailable, scrNoTransfer, scrOk, SetChannel(), Skins, and tr.

Referenced by cSVDRP::CmdCHAN(), main(), cEITScanner::Process(), cRecordControls::Start(), cMenuWhatsOn::Switch(), cMenuChannels::Switch(), SwitchChannel(), and cChannels::SwitchTo().

Here is the call graph for this function:

bool cDevice::SwitchChannel ( int  Direction  )  [static]

Switches the primary device to the next available channel in the given Direction (only the sign of Direction is evaluated, positive values switch to higher channel numbers).

Definition at line 576 of file device.c.

References CanReplay(), Channels, CurrentChannel(), dsyslog, cChannels::GetByNumber(), GetDevice(), cSkins::Message(), mtError, cChannel::Number(), PrimaryDevice(), cSetup::PrimaryLimit, ProvidesChannel(), Setup, sgn(), Skins, SwitchChannel(), and tr.

Here is the call graph for this function:

eSetChannelResult cDevice::SetChannel ( const cChannel Channel,
bool  LiveView 
) [private]

Sets the device to the given channel (general setup).

Definition at line 605 of file device.c.

References cCiHandler::AddPid(), cChannel::Alang(), cChannel::Apid(), cChannel::Apids(), cChannel::Ca(), CA_ENCRYPTED_MIN, cCiHandler::CanDecrypt(), CanReplay(), CardIndex(), Channels, ciHandler, ClrAvailableTracks(), currentChannel, DetachAllReceivers(), cChannel::Dlang(), cChannel::Dpid(), cChannel::Dpids(), dsyslog, EnsureAudioTrack(), GetDevice(), IsPrimaryDevice(), cControl::Launch(), cRwLock::Lock(), MAXAPIDS, MAXDPIDS, cStatus::MsgChannelSwitch(), cChannel::Name(), cChannel::Number(), cSetup::PrimaryLimit, ProvidesChannel(), scrFailed, scrNotAvailable, scrNoTransfer, scrOk, sectionHandler, SetAvailableTrack(), cSectionHandler::SetChannel(), SetChannel(), SetChannelDevice(), cCiHandler::SetSource(), cSectionHandler::SetStatus(), Setup, cChannel::Sid(), cChannel::Source(), cChannel::Spids(), cCiHandler::StartDecrypting(), StopReplay(), cChannel::Transponder(), ttAudio, ttDolby, cRwLock::Unlock(), cSetup::UseDolbyDigital, and cChannel::Vpid().

Referenced by SetChannel(), and SwitchChannel().

Here is the call graph for this function:

bool cDevice::SetChannelDevice ( const cChannel Channel,
bool  LiveView 
) [protected, virtual]

Sets the device to the given channel (actual physical setup).

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 712 of file device.c.

Referenced by ForceTransferMode(), and SetChannel().

static int cDevice::CurrentChannel ( void   )  [inline, static]

Returns the number of the current channel on the primary device.

Definition at line 241 of file device.h.

References currentChannel, and primaryDevice.

Referenced by cDisplayChannel::cDisplayChannel(), cDisplayTracks::cDisplayTracks(), cRcuRemote::ChannelSwitch(), cSVDRP::CmdCHAN(), cSVDRP::CmdDELC(), cSVDRP::CmdMOVC(), cMenuSchedule::cMenuSchedule(), cTimer::cTimer(), cMenuChannels::Delete(), ForceTransferMode(), main(), cMenuChannels::Move(), cMenuSchedule::Number(), cEITScanner::Process(), cDisplayChannel::ProcessKey(), cMenuSchedule::ProcessKey(), cMenuChannels::Setup(), cRecordControls::Start(), and SwitchChannel().

static void cDevice::SetCurrentChannel ( const cChannel Channel  )  [inline, static]

Sets the number of the current channel on the primary device, without actually switching to it. This can be used to correct the current channel number while replaying.

Definition at line 243 of file device.h.

References currentChannel, and cChannel::Number().

Referenced by cSVDRP::CmdDELC(), cSVDRP::CmdMOVC(), cMenuChannels::Delete(), and cMenuChannels::Move().

Here is the call graph for this function:

void cDevice::ForceTransferMode ( void   ) 

Forces the device into transfermode for the current channel.

Definition at line 703 of file device.c.

References Channels, CurrentChannel(), cChannels::GetByNumber(), cTransferControl::ReceiverDevice(), and SetChannelDevice().

Referenced by cDvbDevice::SetAudioTrackDevice().

Here is the call graph for this function:

bool cDevice::HasLock ( int  TimeoutMs = 0  )  [virtual]

Reimplemented in cDvbDevice.

Definition at line 717 of file device.c.

Referenced by cSectionHandler::Action(), AttachReceiver(), and cSectionHandler::SetStatus().

bool cDevice::HasProgramme ( void   )  [virtual]

< Returns true if the device has a lock on the requested transponder. Default is true, a specific device implementation may return false to indicate that it is not ready yet. If TimeoutMs is not zero, waits for the given number of milliseconds before returning false. Returns true if the device is currently showing any programme to the user, either through replaying or live.

Definition at line 722 of file device.c.

References cDevice::cPidHandle::pid, pidHandles, ptAudio, ptVideo, and Replaying().

Referenced by main().

Here is the call graph for this function:

void cDevice::Action ( void   )  [private, virtual]

A derived cThread class must implement the code it wants to execute as a separate thread in this function. If this is a loop, it must check Running() repeatedly to see whether it's time to stop.

Implements cThread.

Definition at line 1190 of file device.c.

References CloseDvr(), GetTSPacket(), cThread::Lock(), MAXRECEIVERS, OpenDvr(), PID_MASK_HI, cReceiver::Receive(), receiver, cThread::Running(), TS_SIZE, and cThread::Unlock().

Here is the call graph for this function:

bool cDevice::HasPid ( int  Pid  )  const [protected]

Returns true if this device is currently receiving the given PID.

Definition at line 389 of file device.c.

References MAXPIDHANDLES, and pidHandles.

Referenced by cDvbDevice::ProvidesChannel(), and cDvbDevice::SetChannelDevice().

bool cDevice::AddPid ( int  Pid,
ePidType  PidType = ptOther 
) [protected]

Adds a PID to the set of PIDs this device shall receive.

Definition at line 398 of file device.c.

References CardIndex(), ciHandler, DelPid(), DetachAll(), esyslog, MAXPIDHANDLES, cDevice::cPidHandle::pid, pidHandles, PRINTPIDS, ptOther, ptPcr, ptTeletext, cCiHandler::SetPid(), SetPid(), and cDevice::cPidHandle::used.

Referenced by AttachReceiver(), and cDvbDevice::SetChannelDevice().

Here is the call graph for this function:

void cDevice::DelPid ( int  Pid,
ePidType  PidType = ptOther 
) [protected]

Deletes a PID from the set of PIDs this device shall receive.

Definition at line 461 of file device.c.

References ciHandler, cDevice::cPidHandle::handle, MAXPIDHANDLES, cDevice::cPidHandle::pid, pidHandles, PRINTPIDS, ptPcr, cCiHandler::SetPid(), and SetPid().

Referenced by AddPid(), AttachReceiver(), Detach(), and cDvbDevice::TurnOffLiveMode().

Here is the call graph for this function:

bool cDevice::SetPid ( cPidHandle Handle,
int  Type,
bool  On 
) [protected, virtual]

Does the actual PID setting on this device. On indicates whether the PID shall be added or deleted. Handle->handle can be used by the device to store information it needs to receive this PID (for instance a file handle). Handle->used indicates how many receivers are using this PID. Type indicates some special types of PIDs, which the device may need to set in a specific way.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 491 of file device.c.

Referenced by AddPid(), and DelPid().

void cDevice::StartSectionHandler ( void   )  [protected]

A derived device that provides section data must call this function to actually set up the section handler.

Definition at line 496 of file device.c.

References AttachFilter(), eitFilter, nitFilter, patFilter, sdtFilter, and sectionHandler.

Referenced by cDvbDevice::cDvbDevice().

Here is the call graph for this function:

int cDevice::OpenFilter ( u_short  Pid,
u_char  Tid,
u_char  Mask 
) [virtual]

Opens a file handle for the given filter data. A derived device that provides section data must implement this function.

Reimplemented in cDvbDevice.

Definition at line 507 of file device.c.

Referenced by cSectionHandler::Add().

void cDevice::AttachFilter ( cFilter Filter  ) 

Attaches the given filter to this device.

Definition at line 512 of file device.c.

References cSectionHandler::Attach(), and sectionHandler.

Referenced by StartSectionHandler().

Here is the call graph for this function:

void cDevice::Detach ( cFilter Filter  ) 

Detaches the given filter from this device.

Definition at line 518 of file device.c.

References cSectionHandler::Detach(), and sectionHandler.

Referenced by AttachPlayer(), cReceiver::Detach(), cPlayer::Detach(), DetachAll(), DetachAllReceivers(), StopReplay(), and ~cDevice().

Here is the call graph for this function:

cCiHandler* cDevice::CiHandler ( void   )  [inline]

Definition at line 315 of file device.h.

References ciHandler.

Referenced by CamControl(), and cMenuSetupCICAM::cMenuSetupCICAM().

uchar * cDevice::GrabImage ( int &  Size,
bool  Jpeg = true,
int  Quality = -1,
int  SizeX = -1,
int  SizeY = -1 
) [virtual]

Grabs the currently visible screen image.

Parameters:
Size The size of the returned data block.
Jpeg If true will write a JPEG file. Otherwise a PNM file will be written.
Quality The compression factor for JPEG. 1 will create a very blocky and small image, 70..80 will yield reasonable quality images while keeping the image file size around 50 KB for a full frame. The default will create a big but very high quality image.
SizeX The number of horizontal pixels in the frame (default is the current screen width).
SizeY The number of vertical pixels in the frame (default is the current screen height).
Returns:
A pointer to the grabbed image data, or NULL in case of an error. The caller takes ownership of the returned memory and must free() it once it isn't needed any more.

Reimplemented in cDvbDevice.

Definition at line 323 of file device.c.

Referenced by cSVDRP::CmdGRAB(), and GrabImageFile().

bool cDevice::GrabImageFile ( const char *  FileName,
bool  Jpeg = true,
int  Quality = -1,
int  SizeX = -1,
int  SizeY = -1 
)

Calls GrabImage() and stores the resulting image in a file with the given name.

Returns:
True if all went well. The caller is responsible for making sure that the given file name doesn't lead to overwriting any important other file.

Definition at line 328 of file device.c.

References GrabImage(), isyslog, LOG_ERROR_STR, and safe_write().

Here is the call graph for this function:

void cDevice::SetVideoDisplayFormat ( eVideoDisplayFormat  VideoDisplayFormat  )  [virtual]

Sets the video display format to the given one (only useful if this device has an MPEG decoder). A derived class must first call the base class function!

Reimplemented in cDvbDevice.

Definition at line 355 of file device.c.

References cSpuDecoder::eSpuLetterBox, cSpuDecoder::eSpuNormal, cSpuDecoder::eSpuPanAndScan, GetSpuDecoder(), cSpuDecoder::setScaleMode(), Setup, vdfCenterCutOut, vdfLetterBox, vdfPanAndScan, and cSetup::VideoFormat.

Referenced by Detach(), cPlayer::DeviceSetVideoDisplayFormat(), cMenuSetupDVB::ProcessKey(), and cDvbDevice::SetVideoDisplayFormat().

Here is the call graph for this function:

void cDevice::SetVideoFormat ( bool  VideoFormat16_9  )  [virtual]

Sets the output video format to either 16:9 or 4:3 (only useful if this device has an MPEG decoder).

Reimplemented in cDvbDevice.

Definition at line 377 of file device.c.

Referenced by cDevice(), cMenuSetupDVB::ProcessKey(), and SetPrimaryDevice().

eVideoSystem cDevice::GetVideoSystem ( void   )  [virtual]

Returns the video system of the currently displayed material (default is PAL).

Reimplemented in cDvbDevice.

Definition at line 381 of file device.c.

References vsPAL.

void cDevice::SetAudioTrackDevice ( eTrackType  Type  )  [protected, virtual]

Sets the current audio track to the given value.

Reimplemented in cDvbDevice.

Definition at line 744 of file device.c.

Referenced by SetCurrentAudioTrack().

void cDevice::ClrAvailableTracks ( bool  DescriptionsOnly = false,
bool  IdsOnly = false 
)

Clears the list of currently availabe tracks. If DescriptionsOnly is true, only the track descriptions will be cleared. With IdsOnly set to true only the ids will be cleared. IdsOnly is only taken into account if DescriptionsOnly is false.

Definition at line 790 of file device.c.

References availableTracks, currentAudioTrack, currentAudioTrackMissingCount, cThread::description, pre_1_3_19_PrivateStream, SetAudioChannel(), ttMaxTrackTypes, and ttNone.

Referenced by AttachPlayer(), cDevice(), cPlayer::DeviceClrAvailableTracks(), PlayPesPacket(), SetChannel(), and SetTrackDescriptions().

Here is the call graph for this function:

bool cDevice::SetAvailableTrack ( eTrackType  Type,
int  Index,
uint16_t  Id,
const char *  Language = NULL,
const char *  Description = NULL 
)

Sets the track of the given Type and Index to the given values. Type must be one of the basic eTrackType values, like ttAudio or ttDolby. Index tells which track of the given basic type is meant. If Id is 0 any existing id will be left untouched and only the given Language and Description will be set.

Returns:
Returns true if the track was set correctly, false otherwise.

Definition at line 810 of file device.c.

References availableTracks, currentAudioTrack, currentAudioTrackMissingCount, cThread::description, EnsureAudioTrack(), esyslog, tTrackId::id, IS_AUDIO_TRACK, IS_DOLBY_TRACK, NumAudioTracks(), strn0cpy(), ttAudio, and ttDolby.

Referenced by cPlayer::DeviceSetAvailableTrack(), PlayPesPacket(), SetChannel(), and SetTrackDescriptions().

Here is the call graph for this function:

const tTrackId * cDevice::GetTrack ( eTrackType  Type  ) 

Returns a pointer to the given track id, or NULL if Type is not less than ttMaxTrackTypes.

Definition at line 834 of file device.c.

References availableTracks, ttMaxTrackTypes, and ttNone.

Referenced by cDisplayTracks::cDisplayTracks(), EnsureAudioTrack(), cSkinSTTNGDisplayChannel::Flush(), cDvbDevice::SetAudioTrackDevice(), and SetCurrentAudioTrack().

int cDevice::NumAudioTracks ( void   )  const

Returns the number of audio tracks that are currently available. This is just for information, to quickly find out whether there is more than one audio track.

Definition at line 839 of file device.c.

References availableTracks, ttAudioFirst, and ttDolbyLast.

Referenced by SetAvailableTrack().

eTrackType cDevice::GetCurrentAudioTrack ( void   )  [inline]

Definition at line 383 of file device.h.

References currentAudioTrack.

Referenced by cDisplayTracks::cDisplayTracks(), EnsureAudioTrack(), and cSkinSTTNGDisplayChannel::Flush().

bool cDevice::SetCurrentAudioTrack ( eTrackType  Type  ) 

Sets the current audio track to the given Type.

Returns:
Returns true if Type is a valid audio track, false otherwise.

Definition at line 849 of file device.c.

References currentAudioTrack, GetTrack(), IS_AUDIO_TRACK, IS_DOLBY_TRACK, mutexCurrentAudioTrack, player, cPlayer::SetAudioTrack(), SetAudioTrackDevice(), SetDigitalAudioDevice(), ttDolbyLast, and ttNone.

Referenced by cPlayer::DeviceSetCurrentAudioTrack(), EnsureAudioTrack(), and cDisplayTracks::ProcessKey().

Here is the call graph for this function:

void cDevice::EnsureAudioTrack ( bool  Force = false  ) 

Makes sure an audio track is selected that is actually available. If Force is true, the language and Dolby Digital settings will be verified even if the current audio track is available.

Definition at line 867 of file device.c.

References cSetup::AudioLanguages, availableTracks, currentAudioTrack, cSetup::CurrentDolby, dsyslog, GetCurrentAudioTrack(), GetTrack(), I18nIsPreferredLanguage(), tTrackId::id, tTrackId::language, SetAudioChannel(), SetCurrentAudioTrack(), Setup, ttAudioFirst, ttAudioLast, ttDolbyFirst, and ttDolbyLast.

Referenced by cDisplayTracks::cDisplayTracks(), SetAvailableTrack(), and SetChannel().

Here is the call graph for this function:

int cDevice::GetAudioChannelDevice ( void   )  [protected, virtual]

Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).

Reimplemented in cDvbDevice.

Definition at line 727 of file device.c.

Referenced by GetAudioChannel().

void cDevice::SetAudioChannelDevice ( int  AudioChannel  )  [protected, virtual]

Sets the audio channel to stereo (0), mono left (1) or mono right (2).

Reimplemented in cDvbDevice.

Definition at line 732 of file device.c.

Referenced by SetAudioChannel().

void cDevice::SetVolumeDevice ( int  Volume  )  [protected, virtual]

Sets the audio volume on this device (Volume = 0...255).

Reimplemented in cDvbDevice.

Definition at line 736 of file device.c.

Referenced by SetVolume().

void cDevice::SetDigitalAudioDevice ( bool  On  )  [protected, virtual]

Tells the actual device that digital audio output shall be switched on or off.

Reimplemented in cDvbDevice.

Definition at line 740 of file device.c.

Referenced by SetCurrentAudioTrack().

bool cDevice::IsMute ( void   )  const [inline]

Definition at line 409 of file device.h.

References mute.

Referenced by cDvbDevice::SetDigitalAudioDevice().

bool cDevice::ToggleMute ( void   ) 

Turns the volume off or on and returns the new mute state.

Definition at line 748 of file device.c.

References Audios, mute, cAudios::MuteAudio(), SetVolume(), and volume.

Referenced by cSVDRP::CmdVOLU(), and main().

Here is the call graph for this function:

int cDevice::GetAudioChannel ( void   ) 

Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).

Definition at line 765 of file device.c.

References GetAudioChannelDevice().

Referenced by cDisplayTracks::cDisplayTracks(), and cDisplayTracks::ProcessKey().

Here is the call graph for this function:

void cDevice::SetAudioChannel ( int  AudioChannel  ) 

Sets the audio channel to stereo (0), mono left (1) or mono right (2). Any other values will be silently ignored.

Definition at line 771 of file device.c.

References SetAudioChannelDevice().

Referenced by ClrAvailableTracks(), EnsureAudioTrack(), and cDisplayTracks::ProcessKey().

Here is the call graph for this function:

void cDevice::SetVolume ( int  Volume,
bool  Absolute = false 
)

Sets the volume to the given value, either absolutely or relative to the current volume.

Definition at line 777 of file device.c.

References Audios, max(), MAXVOLUME, min(), cStatus::MsgSetVolume(), mute, cAudios::MuteAudio(), SetVolumeDevice(), and volume.

Referenced by cSVDRP::CmdVOLU(), main(), and ToggleMute().

Here is the call graph for this function:

static int cDevice::CurrentVolume ( void   )  [inline, static]

Definition at line 421 of file device.h.

References primaryDevice, and volume.

Referenced by cSVDRP::CmdVOLU(), main(), cDvbDevice::SetDigitalAudioDevice(), and cDisplayVolume::Show().

bool cDevice::CanReplay ( void   )  const [protected, virtual]

Returns true if this device can currently start a replay session.

Reimplemented in cDvbDevice.

Definition at line 898 of file device.c.

References HasDecoder().

Referenced by AttachPlayer(), cDvbDevice::CanReplay(), SetChannel(), and SwitchChannel().

Here is the call graph for this function:

bool cDevice::SetPlayMode ( ePlayMode  PlayMode  )  [protected, virtual]

Sets the device into the given play mode.

Returns:
true if the operation was successful.

Reimplemented in cDvbDevice.

Definition at line 903 of file device.c.

Referenced by AttachPlayer(), and Detach().

int cDevice::PlayVideo ( const uchar Data,
int  Length 
) [protected, virtual]

Plays the given data block as video. Data points to exactly one complete PES packet of the given Length. PlayVideo() shall process the packet either as a whole (returning Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).

Returns:
Returns the number of bytes actually taken from Data, or -1 in case of an error.

Reimplemented in cDvbDevice.

Definition at line 999 of file device.c.

Referenced by PlayPesPacket().

int cDevice::PlayAudio ( const uchar Data,
int  Length,
uchar  Id 
) [protected, virtual]

Plays the given data block as audio. Data points to exactly one complete PES packet of the given Length. Id indicates the type of audio data this packet holds. PlayAudio() shall process the packet either as a whole (returning Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).

Returns:
Returns the number of bytes actually taken from Data, or -1 in case of an error.

Reimplemented in cDvbDevice.

Definition at line 1004 of file device.c.

Referenced by PlayPesPacket().

int cDevice::PlayPesPacket ( const uchar Data,
int  Length,
bool  VideoOnly = false 
) [protected, virtual]

Plays the single PES packet in Data with the given Length. If VideoOnly is true, only the video will be displayed, which is necessary for trick modes like 'fast forward'. Data must point to one single, complete PES packet.

Definition at line 1009 of file device.c.

References Audios, availableTracks, ClrAvailableTracks(), currentAudioTrack, dsyslog, esyslog, mutexCurrentAudioTrack, cAudios::PlayAudio(), PlayAudio(), PlayVideo(), pre_1_3_19_PrivateStream, SetAvailableTrack(), Setup, cThread::Start(), ttAudio, ttDolby, and cSetup::UseDolbyDigital.

Referenced by PlayPes().

Here is the call graph for this function:

int64_t cDevice::GetSTC ( void   )  [virtual]

Gets the current System Time Counter, which can be used to synchronize audio and video. If this device is unable to provide the STC, -1 will be returned.

Reimplemented in cDvbDevice.

Definition at line 908 of file device.c.

void cDevice::TrickSpeed ( int  Speed  )  [virtual]

Sets the device into a mode where replay is done slower. Every single frame shall then be displayed the given number of times.

Reimplemented in cDvbDevice.

Definition at line 913 of file device.c.

Referenced by cPlayer::DeviceTrickSpeed().

void cDevice::Clear ( void   )  [virtual]

Clears all video and audio data from the device. A derived class must call the base class function to make sure all registered cAudio objects are notified.

Reimplemented in cDvbDevice.

Definition at line 917 of file device.c.

References Audios, and cAudios::ClearAudio().

Referenced by cDvbDevice::Clear(), and cPlayer::DeviceClear().

Here is the call graph for this function:

void cDevice::Play ( void   )  [virtual]

Sets the device into play mode (after a previous trick mode).

Reimplemented in cDvbDevice.

Definition at line 922 of file device.c.

References Audios, mute, and cAudios::MuteAudio().

Referenced by cPlayer::DevicePlay(), and cDvbDevice::Play().

Here is the call graph for this function:

void cDevice::Freeze ( void   )  [virtual]

Puts the device into "freeze frame" mode.

Reimplemented in cDvbDevice.

Definition at line 927 of file device.c.

References Audios, and cAudios::MuteAudio().

Referenced by cPlayer::DeviceFreeze(), and cDvbDevice::Freeze().

Here is the call graph for this function:

void cDevice::Mute ( void   )  [virtual]

Turns off audio while replaying. A derived class must call the base class function to make sure all registered cAudio objects are notified.

Reimplemented in cDvbDevice.

Definition at line 932 of file device.c.

References Audios, and cAudios::MuteAudio().

Referenced by cPlayer::DeviceMute(), and cDvbDevice::Mute().

Here is the call graph for this function:

void cDevice::StillPicture ( const uchar Data,
int  Length 
) [virtual]

Displays the given I-frame as a still picture.

Reimplemented in cDvbDevice.

Definition at line 937 of file device.c.

Referenced by cPlayer::DeviceStillPicture().

bool cDevice::Poll ( cPoller Poller,
int  TimeoutMs = 0 
) [virtual]

Returns true if the device itself or any of the file handles in Poller is ready for further action. If TimeoutMs is not zero, the device will wait up to the given number of milleseconds before returning in case it can't accept any data.

Reimplemented in cDvbDevice.

Definition at line 989 of file device.c.

Referenced by cPlayer::DevicePoll().

bool cDevice::Flush ( int  TimeoutMs = 0  )  [virtual]

Returns true if the device's output buffers are empty, i. e. any data which was bufferd so far has been processed. If TimeoutMs is not zero, the device will wait up to the given number of milliseconds before returning in case there is still data in the buffers..

Reimplemented in cDvbDevice.

Definition at line 994 of file device.c.

Referenced by cPlayer::DeviceFlush().

int cDevice::PlayPes ( const uchar Data,
int  Length,
bool  VideoOnly = false 
) [virtual]

Plays all valid PES packets in Data with the given Length. If Data is NULL any leftover data from a previous call will be discarded. If VideoOnly is true, only the video will be displayed, which is necessary for trick modes like 'fast forward'. Data should point to a sequence of complete PES packets. If the last packet in Data is not complete, it will be copied and combined to a complete packet with data from the next call to PlayPes(). That way any functions called from within PlayPes() will be guaranteed to always receive complete PES packets.

Definition at line 1093 of file device.c.

References cPesAssembler::Data(), cPesAssembler::ExpectedLength(), cPesAssembler::Length(), min(), cPesAssembler::PacketSize(), pesAssembler, PlayPesPacket(), cPesAssembler::Put(), and cPesAssembler::Reset().

Referenced by cPlayer::PlayPes().

Here is the call graph for this function:

bool cDevice::Replaying ( void   )  const

Returns true if we are currently replaying.

Definition at line 941 of file device.c.

References player.

Referenced by cSVDRP::CmdDELC(), cSVDRP::CmdMOVC(), cMenuChannels::Delete(), HasProgramme(), main(), and cMenuChannels::Move().

bool cDevice::Transferring ( void   )  const

Returns true if we are currently in Transfer Mode.

Definition at line 946 of file device.c.

References player.

Referenced by AttachPlayer(), cSVDRP::CmdDELC(), cSVDRP::CmdMOVC(), cMenuChannels::Delete(), main(), and cMenuChannels::Move().

void cDevice::StopReplay ( void   ) 

Stops the current replay session (if any).

Definition at line 980 of file device.c.

References Detach(), IsPrimaryDevice(), player, and cControl::Shutdown().

Referenced by main(), cEITScanner::Process(), cMenuRecordings::Rewind(), and SetChannel().

Here is the call graph for this function:

bool cDevice::AttachPlayer ( cPlayer Player  ) 

Attaches the given player to this device.

Definition at line 951 of file device.c.

References cPlayer::Activate(), CanReplay(), ClrAvailableTracks(), Detach(), cPlayer::device, pesAssembler, player, cPlayer::playMode, cPesAssembler::Reset(), SetPlayMode(), and Transferring().

Referenced by cControl::Attach().

Here is the call graph for this function:

void cDevice::Detach ( cPlayer Player  ) 

Detaches the given player from this device.

Definition at line 968 of file device.c.

References cPlayer::Activate(), Audios, cAudios::ClearAudio(), cPlayer::device, player, pmNone, SetPlayMode(), Setup, SetVideoDisplayFormat(), and cSetup::VideoDisplayFormat.

Here is the call graph for this function:

int cDevice::Priority ( void   )  const [protected]

Returns the priority of the current receiving session (0..MAXPRIORITY), or -1 if no receiver is currently active. The primary device will always return at least Setup.PrimaryLimit-1.

Definition at line 1156 of file device.c.

References DEFAULTPRIORITY, IsPrimaryDevice(), max(), MAXRECEIVERS, cSetup::PrimaryLimit, receiver, and Setup.

Referenced by GetDevice(), cDigiboxDevice::ProvidesChannel(), and cDvbDevice::ProvidesChannel().

Here is the call graph for this function:

bool cDevice::OpenDvr ( void   )  [protected, virtual]

Opens the DVR of this device and prepares it to deliver a Transport Stream for use in a cReceiver.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 1215 of file device.c.

Referenced by Action().

void cDevice::CloseDvr ( void   )  [protected, virtual]

Shuts down the DVR.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 1220 of file device.c.

Referenced by Action().

bool cDevice::GetTSPacket ( uchar *&  Data  )  [protected, virtual]

Gets exactly one TS packet from the DVR of this device and returns a pointer to it in Data. Only the first 188 bytes (TS_SIZE) Data points to are valid and may be accessed. If there is currently no new data available, Data will be set to NULL. The function returns false in case of a non recoverable error, otherwise it returns true, even if Data is NULL.

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 1224 of file device.c.

Referenced by Action().

int cDevice::Ca ( void   )  const

Returns the ca of the current receiving session(s).

Definition at line 1146 of file device.c.

References MAXRECEIVERS, and receiver.

Referenced by ProvidesCa(), and cDvbDevice::ProvidesChannel().

bool cDevice::Receiving ( bool  CheckAny = false  )  const

Returns true if we are currently receiving.

Definition at line 1181 of file device.c.

References MAXRECEIVERS, and receiver.

Referenced by cDvbDevice::CanReplay(), GetDevice(), main(), MaySwitchTransponder(), cEITScanner::Process(), cDigiboxDevice::ProvidesChannel(), cDvbDevice::ProvidesChannel(), cRcuRemote::Recording(), and cDigiboxDevice::SetChannelDevice().

bool cDevice::AttachReceiver ( cReceiver Receiver  ) 

Attaches the given receiver to this device.

Definition at line 1229 of file device.c.

References cReceiver::Activate(), AddPid(), CardIndex(), ciHandler, DelPid(), cReceiver::device, esyslog, HasLock(), cThread::Lock(), MAXRECEIVERS, mutexReceiver, cReceiver::numPids, cReceiver::pids, receiver, cThread::Running(), cThread::Start(), cCiHandler::StartDecrypting(), and cThread::Unlock().

Referenced by cRecordControl::cRecordControl(), and cTransferControl::cTransferControl().

Here is the call graph for this function:

void cDevice::Detach ( cReceiver Receiver  ) 

Detaches the given receiver from this device.

Definition at line 1270 of file device.c.

References cReceiver::Activate(), cThread::Cancel(), ciHandler, DelPid(), cReceiver::device, cThread::Lock(), MAXRECEIVERS, mutexReceiver, cReceiver::numPids, cReceiver::pids, receiver, cCiHandler::StartDecrypting(), and cThread::Unlock().

Here is the call graph for this function:

void cDevice::DetachAll ( int  Pid  ) 

Detaches all receivers from this device for this pid.

Definition at line 1295 of file device.c.

References Detach(), MAXRECEIVERS, mutexReceiver, receiver, and cReceiver::WantsPid().

Referenced by AddPid(), cDvbDevice::SetAudioTrackDevice(), and cDvbDevice::TurnOffLiveMode().

Here is the call graph for this function:

void cDevice::DetachAllReceivers ( void   ) 

Detaches all receivers from this device.

Definition at line 1307 of file device.c.

References Detach(), MAXRECEIVERS, mutexReceiver, and receiver.

Referenced by SetChannel().

Here is the call graph for this function:


Member Data Documentation

int cDevice::numDevices = 0 [static, private]

Definition at line 98 of file device.h.

Referenced by cDevice(), DeviceNumber(), GetDevice(), NumDevices(), ProvidesTransponderExclusively(), SetPrimaryDevice(), Shutdown(), and WaitForAllDevicesReady().

int cDevice::useDevice = 0 [static, private]

Definition at line 99 of file device.h.

Referenced by SetUseDevice(), and UseDevice().

cDevice * cDevice::device = { NULL } [static, private]

Definition at line 100 of file device.h.

Referenced by cDevice(), DeviceNumber(), GetDevice(), ProvidesTransponderExclusively(), SetPrimaryDevice(), Shutdown(), and WaitForAllDevicesReady().

cDevice * cDevice::primaryDevice = NULL [static, private]

Definition at line 101 of file device.h.

Referenced by CurrentChannel(), CurrentVolume(), IsPrimaryDevice(), PrimaryDevice(), SetPrimaryDevice(), and Shutdown().

int cDevice::nextCardIndex = 0 [static, private]

Definition at line 141 of file device.h.

Referenced by cDevice(), and NextCardIndex().

int cDevice::cardIndex [private]

Definition at line 142 of file device.h.

Referenced by CardIndex(), and cDevice().

int cDevice::currentChannel = 1 [static, protected]

Definition at line 197 of file device.h.

Referenced by CurrentChannel(), SetChannel(), and SetCurrentChannel().

cPidHandle cDevice::pidHandles[MAXPIDHANDLES] [protected]

Definition at line 272 of file device.h.

Referenced by AddPid(), DelPid(), HasPid(), HasProgramme(), MaySwitchTransponder(), cDvbDevice::SetAudioTrackDevice(), cDvbDevice::SetChannelDevice(), and cDvbDevice::TurnOffLiveMode().

cSectionHandler* cDevice::sectionHandler [private]

Definition at line 291 of file device.h.

Referenced by AttachFilter(), cDevice(), Detach(), SetChannel(), StartSectionHandler(), and ~cDevice().

cEitFilter* cDevice::eitFilter [private]

Definition at line 292 of file device.h.

Referenced by cDevice(), StartSectionHandler(), and ~cDevice().

cPatFilter* cDevice::patFilter [private]

Definition at line 293 of file device.h.

Referenced by cDevice(), StartSectionHandler(), and ~cDevice().

cSdtFilter* cDevice::sdtFilter [private]

Definition at line 294 of file device.h.

Referenced by cDevice(), StartSectionHandler(), and ~cDevice().

cNitFilter* cDevice::nitFilter [private]

Definition at line 295 of file device.h.

Referenced by cDevice(), StartSectionHandler(), and ~cDevice().

cCiHandler* cDevice::ciHandler [protected]

Definition at line 313 of file device.h.

Referenced by AddPid(), AttachReceiver(), cDevice(), cDvbDevice::cDvbDevice(), CiHandler(), DelPid(), Detach(), cDvbDevice::ProvidesCa(), cDvbDevice::Ready(), cDvbDevice::SetAudioTrackDevice(), SetChannel(), and ~cDevice().

tTrackId cDevice::availableTracks[ttMaxTrackTypes] [private]

Definition at line 355 of file device.h.

Referenced by ClrAvailableTracks(), EnsureAudioTrack(), GetTrack(), NumAudioTracks(), PlayPesPacket(), and SetAvailableTrack().

eTrackType cDevice::currentAudioTrack [private]

Definition at line 356 of file device.h.

Referenced by cDevice(), ClrAvailableTracks(), EnsureAudioTrack(), GetCurrentAudioTrack(), PlayPesPacket(), SetAvailableTrack(), and SetCurrentAudioTrack().

cMutex cDevice::mutexCurrentAudioTrack [private]

Definition at line 357 of file device.h.

Referenced by PlayPesPacket(), and SetCurrentAudioTrack().

int cDevice::currentAudioTrackMissingCount [private]

Definition at line 358 of file device.h.

Referenced by cDevice(), ClrAvailableTracks(), and SetAvailableTrack().

bool cDevice::pre_1_3_19_PrivateStream [private]

Definition at line 359 of file device.h.

Referenced by ClrAvailableTracks(), and PlayPesPacket().

bool cDevice::mute [private]

Definition at line 395 of file device.h.

Referenced by cDevice(), IsMute(), Play(), SetVolume(), and ToggleMute().

int cDevice::volume [private]

Definition at line 396 of file device.h.

Referenced by cDevice(), CurrentVolume(), SetVolume(), and ToggleMute().

cPlayer* cDevice::player [private]

Definition at line 426 of file device.h.

Referenced by AttachPlayer(), cDevice(), Detach(), Replaying(), SetCurrentAudioTrack(), StopReplay(), Transferring(), and ~cDevice().

cPesAssembler* cDevice::pesAssembler [private]

Definition at line 427 of file device.h.

Referenced by AttachPlayer(), cDevice(), PlayPes(), and ~cDevice().

cMutex cDevice::mutexReceiver [private]

Definition at line 513 of file device.h.

Referenced by AttachReceiver(), Detach(), DetachAll(), and DetachAllReceivers().

cReceiver* cDevice::receiver[MAXRECEIVERS] [private]

Definition at line 514 of file device.h.

Referenced by Action(), AttachReceiver(), Ca(), cDevice(), Detach(), DetachAll(), DetachAllReceivers(), Priority(), Receiving(), and ~cDevice().


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 20:08:00 2007 for VDR by  doxygen 1.5.3-20071008