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 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
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)
virtual void CloseFilter (int Handle)
void AttachFilter (cFilter *Filter)
 Attaches the given filter to this device.
void Detach (cFilter *Filter)
 Detaches the given filter from this device.
virtual bool HasCi (void)
 Returns true if this device has a Common Interface.
void SetCamSlot (cCamSlot *CamSlot)
 Sets the given CamSlot to be used with this device.
cCamSlotCamSlot (void) const
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 NumTracks (eTrackType FirstTrack, eTrackType LastTrack) const
int NumAudioTracks (void) const
int NumSubtitleTracks (void) const
 Returns the number of subtitle tracks that are currently available.
eTrackType GetCurrentAudioTrack (void)
bool SetCurrentAudioTrack (eTrackType Type)
eTrackType GetCurrentSubtitleTrack (void)
bool SetCurrentSubtitleTrack (eTrackType Type, bool Manual=false)
void EnsureAudioTrack (bool Force=false)
void EnsureSubtitleTrack (void)
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 bool HasIBPTrickSpeed (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 Priority (void) const
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, bool LiveView)
static void SetAvoidDevice (cDevice *Device)
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)
void StopSectionHandler (void)
virtual void SetAudioTrackDevice (eTrackType Type)
 Sets the current audio track to the given value.
virtual void SetSubtitleTrackDevice (eTrackType Type)
 Sets the current subtitle 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 PlaySubtitle (const uchar *Data, int Length)
virtual int PlayPesPacket (const uchar *Data, int Length, bool VideoOnly=false)
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]

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
cLiveSubtitleliveSubtitle
cDvbSubtitleConverterdvbSubtitleConverter
cSectionHandlersectionHandler
cEitFiltereitFilter
cPatFilterpatFilter
cSdtFiltersdtFilter
cNitFilternitFilter
time_t startScrambleDetection
cCamSlotcamSlot
tTrackId availableTracks [ttMaxTrackTypes]
eTrackType currentAudioTrack
eTrackType currentSubtitleTrack
cMutex mutexCurrentAudioTrack
cMutex mutexCurrentSubtitleTrack
int currentAudioTrackMissingCount
bool autoSelectPreferredSubtitleLanguage
int 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 cDeviceavoidDevice = NULL
static int nextCardIndex = 0

Friends

class cLiveSubtitle

Classes

class  cPidHandle


Detailed Description

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

Definition at line 97 of file device.h.


Member Enumeration Documentation

enum cDevice::ePidType [protected]

Enumerator:
ptAudio 
ptVideo 
ptPcr 
ptTeletext 
ptDolby 
ptOther 

Definition at line 274 of file device.h.


Constructor & Destructor Documentation

cDevice::cDevice ( void   )  [protected]

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

Definition at line 262 of file device.c.

References Detach(), DetachAllReceivers(), dvbSubtitleConverter, liveSubtitle, pesAssembler, and player.

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 106 of file device.h.

References numDevices.

Referenced by 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 271 of file device.c.

References device, numDevices, Ready(), and cCondWait::SleepMs().

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 287 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 118 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 318 of file device.c.

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

Referenced by main().

Here is the call graph for this function:

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

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

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

Definition at line 345 of file device.c.

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

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

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 353 of file device.c.

References device, and numDevices.

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

cDevice * cDevice::GetDevice ( const cChannel Channel,
int  Priority,
bool  LiveView 
) [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. The LiveView parameter tells whether the device will be used for live viewing or a recording. If the Channel is encrypted, a CAM slot that claims to be able to decrypt the channel is automatically selected and assigned to the returned device. Whether or not this combination of device and CAM slot is actually able to decrypt the channel can only be determined by checking the "scrambling control" bits of the received TS packets. The Action() function automatically does this and takes care that after detaching any receivers because the channel can't be decrypted, this device/CAM combination will be skipped in the next call to GetDevice(). See also ProvidesChannel().

Definition at line 358 of file device.c.

References cCamSlot::Assign(), avoidDevice, cChannel::Ca(), CA_DVB_MAX, CA_ENCRYPTED_MIN, cChannel::Caids(), cChannelCamRelations::CamChecked(), cChannelCamRelations::CamDecrypt(), CamSlot(), CamSlots, CardIndex(), ChannelCamRelations, cListBase::Count(), DetachAllReceivers(), cCamSlot::Device(), device, cList< T >::First(), cList< T >::Get(), cChannel::GetChannelID(), HasCi(), HasDecoder(), cListObject::Index(), cCamSlot::IsDecrypting(), IsPrimaryDevice(), max(), MAXPRIORITY, min(), cCamSlot::ModuleStatus(), msReady, cList< T >::Next(), numDevices, Priority(), cCamSlot::Priority(), cCamSlot::ProvidesCa(), ProvidesChannel(), cTransferControl::ReceiverDevice(), Receiving(), and cCamSlot::SlotNumber().

Here is the call graph for this function:

static void cDevice::SetAvoidDevice ( cDevice Device  )  [inline, static]

Sets the given Device to be temporarily avoided in the next call to GetDevice(const cChannel, int, bool).

Definition at line 149 of file device.h.

References avoidDevice.

Referenced by main().

void cDevice::Shutdown ( void   )  [static]

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

Definition at line 460 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 1404 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 293 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 314 of file device.c.

Referenced by SetPrimaryDevice().

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

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

int cDevice::DeviceNumber ( void   )  const

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

Tells whether this device has an MPEG decoder.

Reimplemented in cDvbDevice.

Definition at line 335 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 340 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 691 of file device.c.

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

Returns true if this device can provide the transponder of the given Channel (which implies that it can provide the Channel's source).

Reimplemented in cDvbDevice, and cDigiboxDevice.

Definition at line 696 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 701 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 710 of file device.c.

Referenced by GetDevice().

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 715 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 720 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 725 of file device.c.

References esyslog, isyslog, cSkins::Message(), mtError, mtInfo, cChannel::Number(), scrFailed, scrNotAvailable, scrNoTransfer, scrOk, SetChannel(), cControl::Shutdown(), 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 745 of file device.c.

References Channels, CurrentChannel(), dsyslog, cChannels::GetByNumber(), GetDevice(), cSkins::Message(), mtError, cChannel::Number(), PrimaryDevice(), sgn(), cControl::Shutdown(), Skins, SwitchChannel(), and tr.

Here is the call graph for this function:

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

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 862 of file device.c.

Referenced by ForceTransferMode(), and SetChannel().

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

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 253 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 853 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]

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.

Reimplemented in cDvbDevice.

Definition at line 867 of file device.c.

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

bool cDevice::HasProgramme ( void   )  [virtual]

Returns true if the device is currently showing any programme to the user, either through replaying or live.

Definition at line 872 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 1422 of file device.c.

References CamSlot(), ChannelCamRelations, CloseDvr(), Detach(), GetTSPacket(), cThread::Lock(), MAXRECEIVERS, OpenDvr(), PID_MASK_HI, cReceiver::Receive(), receiver, cThread::Running(), cChannelCamRelations::SetChecked(), cChannelCamRelations::SetDecrypt(), cCamSlot::SlotNumber(), startScrambleDetection, TS_SCRAMBLING_CONTROL, TS_SCRAMBLING_TIME_OK, TS_SCRAMBLING_TIMEOUT, 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 535 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 544 of file device.c.

References camSlot, CardIndex(), DelPid(), DetachAll(), esyslog, MAXPIDHANDLES, cDevice::cPidHandle::pid, pidHandles, PRINTPIDS, ptOther, ptPcr, ptTeletext, cCamSlot::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 607 of file device.c.

References camSlot, cDevice::cPidHandle::handle, MAXPIDHANDLES, cDevice::cPidHandle::pid, pidHandles, PRINTPIDS, ptPcr, cCamSlot::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 637 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 (typically in its constructor) to actually set up the section handler.

Definition at line 642 of file device.c.

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

Referenced by cDvbDevice::cDvbDevice().

Here is the call graph for this function:

void cDevice::StopSectionHandler ( void   )  [protected]

A device that has called StartSectionHandler() must call this function (typically in its destructor) to stop the section handler.

Definition at line 653 of file device.c.

References eitFilter, nitFilter, patFilter, sdtFilter, and sectionHandler.

Referenced by cDvbDevice::~cDvbDevice().

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 669 of file device.c.

Referenced by cSectionHandler::Add().

void cDevice::CloseFilter ( int  Handle  )  [virtual]

Closes a file handle that has previously been opened by OpenFilter(). If this is as simple as calling close(Handle), a derived class need not implement this function, because this is done by the default implementation.

Reimplemented in cDvbDevice.

Definition at line 674 of file device.c.

Referenced by cSectionHandler::Del().

void cDevice::AttachFilter ( cFilter Filter  ) 

Attaches the given filter to this device.

Definition at line 679 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 685 of file device.c.

References cSectionHandler::Detach(), and sectionHandler.

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

Here is the call graph for this function:

bool cDevice::HasCi ( void   )  [virtual]

Returns true if this device has a Common Interface.

Reimplemented in cDvbDevice.

Definition at line 450 of file device.c.

Referenced by GetDevice().

void cDevice::SetCamSlot ( cCamSlot CamSlot  ) 

Sets the given CamSlot to be used with this device.

Definition at line 455 of file device.c.

References camSlot.

Referenced by cCamSlot::Assign().

cCamSlot* cDevice::CamSlot ( void   )  const [inline]

Returns the CAM slot that is currently used with this device, or NULL if no CAM slot is in use.

Definition at line 340 of file device.h.

References camSlot.

Referenced by Action(), cCamSlot::Device(), GetDevice(), cDvbDevice::ProvidesChannel(), cDvbDevice::SetAudioTrackDevice(), and cDvbDevice::SetChannelDevice().

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 469 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 474 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 501 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 523 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 527 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 894 of file device.c.

Referenced by SetCurrentAudioTrack().

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

Sets the current subtitle track to the given value.

Definition at line 898 of file device.c.

Referenced by SetCurrentSubtitleTrack().

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 944 of file device.c.

References availableTracks, currentAudioTrack, currentAudioTrackMissingCount, currentSubtitleTrack, 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 965 of file device.c.

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

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

Here is the call graph for this function:

const tTrackId * cDevice::GetTrack ( eTrackType  Type  ) 

int cDevice::NumTracks ( eTrackType  FirstTrack,
eTrackType  LastTrack 
) const

Returns the number of tracks in the given range that are currently available.

Definition at line 999 of file device.c.

References availableTracks.

Referenced by NumAudioTracks(), and NumSubtitleTracks().

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 1009 of file device.c.

References NumTracks(), ttAudioFirst, and ttDolbyLast.

Referenced by SetAvailableTrack().

Here is the call graph for this function:

int cDevice::NumSubtitleTracks ( void   )  const

Returns the number of subtitle tracks that are currently available.

Definition at line 1014 of file device.c.

References NumTracks(), ttSubtitleFirst, and ttSubtitleLast.

Here is the call graph for this function:

eTrackType cDevice::GetCurrentAudioTrack ( void   )  [inline]

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 1019 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:

eTrackType cDevice::GetCurrentSubtitleTrack ( void   )  [inline]

bool cDevice::SetCurrentSubtitleTrack ( eTrackType  Type,
bool  Manual = false 
)

Sets the current subtitle track to the given Type. IF Manual is true, no automatic preferred subtitle language selection will be done for the rest of the current replay session, or until the channel is changed.

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

Definition at line 1037 of file device.c.

References AttachReceiver(), autoSelectPreferredSubtitleLanguage, cLiveSubtitle, currentSubtitleTrack, DELETENULL, dvbSubtitleConverter, GetTrack(), tTrackId::id, IS_SUBTITLE_TRACK, liveSubtitle, mutexCurrentSubtitleTrack, player, Replaying(), cDvbSubtitleConverter::Reset(), cPlayer::SetSubtitleTrack(), SetSubtitleTrackDevice(), Transferring(), and ttNone.

Referenced by cPlayer::DeviceSetCurrentSubtitleTrack(), EnsureSubtitleTrack(), and cDisplaySubtitleTracks::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 1065 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:

void cDevice::EnsureSubtitleTrack ( void   ) 

Makes sure one of the preferred language subtitle tracks is selected. Only has an effect if Setup.DisplaySubtitles is on.

Definition at line 1096 of file device.c.

References cSetup::DisplaySubtitles, GetCurrentSubtitleTrack(), GetTrack(), I18nIsPreferredLanguage(), tTrackId::id, tTrackId::language, SetCurrentSubtitleTrack(), Setup, cSetup::SubtitleLanguages, ttNone, ttSubtitleFirst, and ttSubtitleLast.

Referenced by cMenuSetupDVB::ProcessKey(), 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 877 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 882 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 886 of file device.c.

Referenced by SetPrimaryDevice(), and 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 890 of file device.c.

Referenced by SetCurrentAudioTrack().

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

Definition at line 456 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 902 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 919 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 925 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 931 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 468 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 1115 of file device.c.

References HasDecoder().

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

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 1120 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 1224 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 1229 of file device.c.

Referenced by PlayPesPacket().

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

Plays the given data block as a subtitle. Data points to exactly one complete PES packet of the given Length. PlaySubtitle() 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.

Definition at line 1234 of file device.c.

References cDvbSubtitleConverter::Convert(), and dvbSubtitleConverter.

Referenced by cLiveSubtitle::Action(), and PlayPesPacket().

Here is the call graph for this function:

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 1241 of file device.c.

References Audios, availableTracks, ClrAvailableTracks(), currentAudioTrack, currentSubtitleTrack, dsyslog, esyslog, HasIBPTrickSpeed(), MIN_PRE_1_3_19_PRIVATESTREAM, mutexCurrentAudioTrack, cAudios::PlayAudio(), PlayAudio(), PlaySubtitle(), PlayVideo(), pre_1_3_19_PrivateStream, SetAvailableTrack(), Setup, cThread::Start(), ttAudio, ttDolby, ttNone, ttSubtitle, 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 1125 of file device.c.

Referenced by cDvbSubtitleConverter::Action().

virtual bool cDevice::HasIBPTrickSpeed ( void   )  [inline, virtual]

Returns true if this device can handle all frames in 'fast forward' trick speeds.

Definition at line 513 of file device.h.

Referenced by cPlayer::DeviceHasIBPTrickSpeed(), and PlayPesPacket().

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. The cDvbPlayer uses the following values for the various speeds: 1x 2x 3x Fast Forward 6 3 1 Fast Reverse 6 3 1 Slow Forward 8 4 2 Slow Reverse 63 48 24

Reimplemented in cDvbDevice.

Definition at line 1130 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 1134 of file device.c.

References Audios, cAudios::ClearAudio(), dvbSubtitleConverter, and cDvbSubtitleConverter::Reset().

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 1141 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 1146 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 1151 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 1156 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 1214 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 1219 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 1339 of file device.c.

References cPesAssembler::Data(), dvbSubtitleConverter, cPesAssembler::ExpectedLength(), cPesAssembler::Length(), min(), cPesAssembler::PacketSize(), pesAssembler, PlayPesPacket(), cPesAssembler::Put(), cDvbSubtitleConverter::Reset(), 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 1160 of file device.c.

References player.

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

bool cDevice::Transferring ( void   )  const

Returns true if we are currently in Transfer Mode.

Definition at line 1165 of file device.c.

References ActualDevice(), and PrimaryDevice().

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

Here is the call graph for this function:

void cDevice::StopReplay ( void   ) 

Stops the current replay session (if any).

Definition at line 1205 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 1170 of file device.c.

References cPlayer::Activate(), CanReplay(), ClrAvailableTracks(), DELETENULL, Detach(), cPlayer::device, dvbSubtitleConverter, liveSubtitle, 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 1189 of file device.c.

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

Here is the call graph for this function:

int cDevice::Priority ( void   )  const

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 1394 of file device.c.

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

Referenced by GetDevice(), cCamSlot::Priority(), 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 1475 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 1480 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 1484 of file device.c.

Referenced by Action().

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

bool cDevice::AttachReceiver ( cReceiver Receiver  ) 

void cDevice::Detach ( cReceiver Receiver  ) 

Detaches the given receiver from this device.

Definition at line 1531 of file device.c.

References cReceiver::Activate(), camSlot, cThread::Cancel(), DelPid(), cReceiver::device, cThread::Lock(), MAXRECEIVERS, mutexReceiver, cReceiver::numPids, cReceiver::pids, receiver, cCamSlot::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 1556 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 1568 of file device.c.

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

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

Here is the call graph for this function:


Friends And Related Function Documentation

friend class cLiveSubtitle [friend]

Definition at line 98 of file device.h.

Referenced by SetCurrentSubtitleTrack().


Member Data Documentation

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

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

Definition at line 101 of file device.h.

Referenced by SetUseDevice(), and UseDevice().

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

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

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

Definition at line 104 of file device.h.

Referenced by GetDevice(), and SetAvoidDevice().

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

Definition at line 156 of file device.h.

Referenced by cDevice(), and NextCardIndex().

int cDevice::cardIndex [private]

Definition at line 157 of file device.h.

Referenced by CardIndex(), and cDevice().

Definition at line 195 of file device.h.

Referenced by AttachPlayer(), cDevice(), SetChannel(), SetCurrentSubtitleTrack(), and ~cDevice().

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

Definition at line 205 of file device.h.

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

cPidHandle cDevice::pidHandles[MAXPIDHANDLES] [protected]

Definition at line 302 of file device.h.

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

Definition at line 303 of file device.h.

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

Definition at line 304 of file device.h.

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

Definition at line 305 of file device.h.

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

Definition at line 333 of file device.h.

Referenced by Action(), AttachReceiver(), and cDevice().

Definition at line 334 of file device.h.

Referenced by AddPid(), AttachReceiver(), CamSlot(), cDevice(), DelPid(), Detach(), SetCamSlot(), and SetChannel().

tTrackId cDevice::availableTracks[ttMaxTrackTypes] [private]

Definition at line 385 of file device.h.

Referenced by PlayPesPacket(), and SetCurrentAudioTrack().

Definition at line 386 of file device.h.

Referenced by Detach(), and SetCurrentSubtitleTrack().

Definition at line 387 of file device.h.

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

Definition at line 388 of file device.h.

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

Definition at line 389 of file device.h.

Referenced by ClrAvailableTracks(), and PlayPesPacket().

bool cDevice::mute [private]

Definition at line 442 of file device.h.

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

int cDevice::volume [private]

Definition at line 443 of file device.h.

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

Definition at line 474 of file device.h.

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

Definition at line 576 of file device.h.

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

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


The documentation for this class was generated from the following files:

Generated on Tue Nov 4 19:58:13 2008 for VDR by  doxygen 1.5.6