vdr 2.7.5
cDvbDevice Class Reference

#include <dvbdevice.h>

Public Member Functions

 cDvbDevice (int Adapter, int Frontend)
virtual ~cDvbDevice () override
int Adapter (void) const
int Frontend (void) const
virtual cString DeviceType (void) const override
virtual cString DeviceName (void) const override
bool Bond (cDvbDevice *Device)
void UnBond (void)
bool BondingOk (const cChannel *Channel, bool ConsiderOccupied=false) const
virtual bool ProvidesDeliverySystem (int DeliverySystem) const
virtual bool ProvidesSource (int Source) const override
virtual bool ProvidesTransponder (const cChannel *Channel) const override
virtual bool ProvidesChannel (const cChannel *Channel, int Priority=IDLEPRIORITY, bool *NeedsDetachReceivers=NULL) const override
virtual bool ProvidesEIT (void) const override
virtual int NumProvidedSystems (void) const override
virtual const cPositionerPositioner (void) const override
virtual bool SignalStats (int &Valid, double *Strength=NULL, double *Cnr=NULL, double *BerPre=NULL, double *BerPost=NULL, double *Per=NULL, int *Status=NULL) const override
virtual int SignalStrength (void) const override
virtual int SignalQuality (void) const override
virtual const cChannelGetCurrentlyTunedTransponder (void) const override
virtual bool IsTunedToTransponder (const cChannel *Channel) const override
virtual bool MaySwitchTransponder (const cChannel *Channel) const override
virtual void SetPowerSaveMode (bool On) override
virtual bool HasLock (int TimeoutMs=0) const override
virtual bool HasCi (void) override
Public Member Functions inherited from cDevice
bool IsPrimaryDevice (bool CheckDecoder=true) const
int CardIndex (void) const
int DeviceNumber (void) const
virtual bool HasDecoder (void) const
virtual bool AvoidRecording (void) const
virtual cSpuDecoderGetSpuDecoder (void)
virtual bool ProvidesTransponderExclusively (const cChannel *Channel) const
void SetPowerSaveIfUnused (void)
bool SwitchChannel (const cChannel *Channel, bool LiveView)
void ForceTransferMode (void)
int Occupied (int Priority=MINPRIORITY) const
void SetOccupied (int Seconds, int Priority=MINPRIORITY, time_t From=0)
virtual bool HasProgramme (void) const
void DelLivePids (void)
virtual int ReadFilter (int Handle, void *Buffer, size_t Length)
void AttachFilter (cFilter *Filter)
void Detach (cFilter *Filter)
const cSdtFilterSdtFilter (void) const
cSectionHandlerSectionHandler (void) const
virtual bool HasInternalCam (void)
void SetCamSlot (cCamSlot *CamSlot)
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 void GetVideoSize (int &Width, int &Height, double &VideoAspect)
virtual void GetOsdSize (int &Width, int &Height, double &PixelAspect)
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
eTrackType GetCurrentAudioTrack (void) const
bool SetCurrentAudioTrack (eTrackType Type)
eTrackType GetCurrentSubtitleTrack (void) const
bool SetCurrentSubtitleTrack (eTrackType Type, bool Manual=false)
void SetTempSubtitles (void)
void EnsureAudioTrack (bool Force=false)
void EnsureSubtitleTrack (void)
void SetKeepTracks (bool KeepTracks)
bool IsMute (void) const
bool ToggleMute (void)
int GetAudioChannel (void)
void SetAudioChannel (int AudioChannel)
void SetVolume (int Volume, bool Absolute=false)
virtual int64_t GetSTC (void)
virtual bool IsPlayingVideo (void) const
virtual cRect CanScaleVideo (const cRect &Rect, int Alignment=taCenter)
virtual void ScaleVideo (const cRect &Rect=cRect::Null)
virtual bool HasIBPTrickSpeed (void)
virtual void TrickSpeed (int Speed, bool Forward)
virtual void Clear (void)
virtual void Play (void)
virtual void Freeze (void)
virtual void Mute (void)
virtual void StillPicture (const uchar *Data, int Length)
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)
virtual int PlayTs (const uchar *Data, int Length, bool VideoOnly=false)
bool Replaying (void) const
bool Transferring (void) const
void StopReplay (void)
bool AttachPlayer (cPlayer *Player)
void Detach (cPlayer *Player)
int Priority (bool IgnoreOccupied=false) const
bool Receiving (bool Dummy=false) const
bool AttachReceiver (cReceiver *Receiver)
void Detach (cReceiver *Receiver, bool ReleaseCam=true)
void DetachAll (int Pid)
Public Member Functions inherited from cThread
 cThread (const char *Description=NULL, bool LowPriority=false)
virtual ~cThread ()
void SetDescription (const char *Description,...) __attribute__((format(printf
void bool Start (void)
bool Active (void)

Static Public Member Functions

static bool Initialize (void)
static bool BondDevices (const char *Bondings)
static void UnBondDevices (void)
static void SetTransferModeForDolbyDigital (int Mode)
Static Public Member Functions inherited from cDevice
static int NumDevices (void)
static bool WaitForAllDevicesReady (int Timeout=0)
static void SetUseDevice (int n)
static bool UseDevice (int n)
static bool SetPrimaryDevice (int n)
static cDevicePrimaryDevice (void)
static cDeviceActualDevice (void)
static cDeviceGetDevice (int Index)
static cDeviceGetDevice (const cChannel *Channel, int Priority, bool LiveView, bool Query=false)
static cDeviceGetDeviceForTransponder (const cChannel *Channel, int Priority)
static void Shutdown (void)
static bool SwitchChannel (int Direction)
static int CurrentChannel (void)
static void SetCurrentChannel (int ChannelNumber)
static int CurrentVolume (void)
Static Public Member Functions inherited from cThread
static tThreadId ThreadId (void)
static tThreadId IsMainThread (void)
static void SetMainThreadId (void)

Static Public Attributes

static bool useDvbDevices = true

Protected Member Functions

virtual bool IsBonded (void) const override
virtual bool SetChannelDevice (const cChannel *Channel, bool LiveView) override
virtual bool SetPid (cPidHandle *Handle, int Type, bool On) override
virtual int OpenFilter (u_short Pid, u_char Tid, u_char Mask) override
virtual void CloseFilter (int Handle) override
virtual bool OpenDvr (void) override
virtual void CloseDvr (void) override
virtual bool GetTSPacket (uchar *&Data) override
virtual void DetachAllReceivers (void) override
Protected Member Functions inherited from cDevice
 cDevice (void)
virtual ~cDevice () override
virtual bool Ready (void)
virtual void MakePrimaryDevice (bool On)
bool DeviceHooksProvidesTransponder (const cChannel *Channel) const
bool DeviceHooksProvidesEIT (void) const
bool HasPid (int Pid) const
bool AddPid (int Pid, ePidType PidType=ptOther, int StreamType=0)
void DelPid (int Pid, ePidType PidType=ptOther)
void StartSectionHandler (void)
void StopSectionHandler (void)
virtual void SetAudioTrackDevice (eTrackType Type)
virtual void SetSubtitleTrackDevice (eTrackType Type)
virtual int GetAudioChannelDevice (void)
virtual void SetAudioChannelDevice (int AudioChannel)
virtual void SetVolumeDevice (int Volume)
virtual void SetDigitalAudioDevice (bool On)
const cPatPmtParserPatPmtParser (void) const
virtual bool CanReplay (void) const
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 int PlayTsVideo (const uchar *Data, int Length)
virtual int PlayTsAudio (const uchar *Data, int Length)
virtual int PlayTsSubtitle (const uchar *Data, int Length)
Protected Member Functions inherited from cThread
void SetPriority (int Priority)
void SetIOPriority (int Priority)
void Lock (void)
void Unlock (void)
bool Running (void)
void Cancel (int WaitSeconds=0)

Protected Attributes

int adapter
int frontend
Protected Attributes inherited from cDevice
cPidHandle pidHandles [MAXPIDHANDLES]

Static Protected Attributes

static int setTransferModeForDolbyDigital = 1
Static Protected Attributes inherited from cDevice
static int currentChannel = 1

Static Private Member Functions

static bool Exists (int Adapter, int Frontend)
static bool Probe (int Adapter, int Frontend)

Private Attributes

int fd_dvr
int fd_ca
bool checkTsBuffer
cDvbDevicebondedDevice
bool needsDetachBondedReceivers
cCiAdapterciAdapter
cDvbTunerdvbTuner
cTSBuffertsBuffer

Static Private Attributes

static cMutex bondMutex

Additional Inherited Members

Protected Types inherited from cDevice
enum  ePidType {
  ptAudio , ptVideo , ptPcr , ptTeletext ,
  ptDolby , ptOther
}
Static Protected Member Functions inherited from cDevice
static int NextCardIndex (int n=0)

Detailed Description

The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.

Definition at line 168 of file dvbdevice.h.

Constructor & Destructor Documentation

◆ cDvbDevice()

◆ ~cDvbDevice()

cDvbDevice::~cDvbDevice ( )
overridevirtual

Definition at line 1906 of file dvbdevice.c.

References ciAdapter, dvbTuner, cDevice::StopSectionHandler(), and UnBond().

Member Function Documentation

◆ Adapter()

int cDvbDevice::Adapter ( void ) const
inline

◆ Bond()

bool cDvbDevice::Bond ( cDvbDevice * Device)

Bonds this device with the given Device, making both of them use the same satellite cable and LNB.

Only DVB-S(2) devices can be bonded. When this function is called, the calling device must not be bonded to any other device. The given Device, however, may already be bonded to an other device. That way several devices can be bonded together. Returns true if the bonding was successful.

Definition at line 2091 of file dvbdevice.c.

References bondedDevice, bondMutex, cDvbDevice(), cDevice::DeviceNumber(), dsyslog, dvbTuner, esyslog, and ProvidesDeliverySystem().

◆ BondDevices()

bool cDvbDevice::BondDevices ( const char * Bondings)
static

Bonds the devices as defined in the given Bondings string.

A bonding is a sequence of device numbers (starting at 1), separated by '+' characters. Several bondings are separated by commas, as in "1+2,3+4+5". Returns false if an error occurred.

Definition at line 2042 of file dvbdevice.c.

References cDevice::cDevice(), cDvbDevice(), esyslog, cSatCableNumbers::FirstDeviceIndex(), cDevice::GetDevice(), MAXDEVICES, cDevice::NumDevices(), and UnBondDevices().

Referenced by main(), and cMenuSetupLNB::ProcessKey().

◆ BondingOk()

bool cDvbDevice::BondingOk ( const cChannel * Channel,
bool ConsiderOccupied = false ) const

Returns true if this device is either not bonded to any other device, or the given Channel is on the same satellite, polarization and band as those the bonded devices are tuned to (if any).

If ConsiderOccupied is true, any bonded devices that are currently occupied but not otherwise receiving will cause this function to return false.

Definition at line 2132 of file dvbdevice.c.

References bondedDevice, bondMutex, dvbTuner, and Positioner().

Referenced by MaySwitchTransponder(), and ProvidesChannel().

◆ CloseDvr()

void cDvbDevice::CloseDvr ( void )
overrideprotectedvirtual

Shuts down the DVR.

Reimplemented from cDevice.

Definition at line 2376 of file dvbdevice.c.

References fd_dvr, and tsBuffer.

Referenced by OpenDvr().

◆ CloseFilter()

void cDvbDevice::CloseFilter ( int Handle)
overrideprotectedvirtual

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 from cDevice.

Definition at line 2215 of file dvbdevice.c.

◆ DetachAllReceivers()

void cDvbDevice::DetachAllReceivers ( void )
overrideprotectedvirtual

Detaches all receivers from this device.

Reimplemented from cDevice.

Definition at line 2407 of file dvbdevice.c.

References bondedDevice, bondMutex, cDvbDevice(), and needsDetachBondedReceivers.

◆ DeviceName()

cString cDvbDevice::DeviceName ( void ) const
overridevirtual

Returns a string identifying the name of this device.

The default implementation returns an empty string.

Reimplemented from cDevice.

Definition at line 1972 of file dvbdevice.c.

References dvbTuner.

◆ DeviceType()

cString cDvbDevice::DeviceType ( void ) const
overridevirtual

Returns a string identifying the type of this device (like "DVB-S").

If this device can receive different delivery systems, the returned string shall be that of the currently used system. The length of the returned string should not exceed 6 characters. The default implementation returns an empty string.

Reimplemented from cDevice.

Definition at line 1965 of file dvbdevice.c.

References dvbTuner, and GetDeliverySystemName().

◆ Exists()

bool cDvbDevice::Exists ( int Adapter,
int Frontend )
staticprivate

Checks whether the given adapter/frontend exists.

Definition at line 1935 of file dvbdevice.c.

References Adapter(), DEV_DVB_FRONTEND, DvbName(), Frontend(), and LOG_ERROR_STR.

Referenced by Initialize().

◆ Frontend()

int cDvbDevice::Frontend ( void ) const

◆ GetCurrentlyTunedTransponder()

const cChannel * cDvbDevice::GetCurrentlyTunedTransponder ( void ) const
overridevirtual

Returns a pointer to the currently tuned transponder.

This is not one of the channels in the global cChannels list, but rather a local copy. The result may be NULL if the device is not tuned to any transponder.

Reimplemented from cDevice.

Definition at line 2328 of file dvbdevice.c.

References dvbTuner.

◆ GetTSPacket()

bool cDvbDevice::GetTSPacket ( uchar *& Data)
overrideprotectedvirtual

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 from cDevice.

Definition at line 2386 of file dvbdevice.c.

References cDevice::CamSlot(), checkTsBuffer, and tsBuffer.

◆ HasCi()

bool cDvbDevice::HasCi ( void )
overridevirtual

Returns true if this device has a Common Interface.

Reimplemented from cDevice.

Definition at line 2140 of file dvbdevice.c.

References ciAdapter.

◆ HasLock()

bool cDvbDevice::HasLock ( int TimeoutMs = 0) const
overridevirtual

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 from cDevice.

Definition at line 2357 of file dvbdevice.c.

References dvbTuner.

◆ Initialize()

bool cDvbDevice::Initialize ( void )
static

Initializes the DVB devices.

Must be called before accessing any DVB functions. Returns true if any devices are available.

Definition at line 1979 of file dvbdevice.c.

References Adapter(), AddDirectory(), cVector< T >::Append(), DEV_DVB_ADAPTER, DEV_DVB_BASE, DEV_DVB_DEMUX, DEV_DVB_FRONTEND, dsyslog, DvbName(), Exists(), Frontend(), isyslog, MAXDEVICES, cReadDir::Next(), cDevice::NextCardIndex(), cReadDir::Ok(), Probe(), cVector< T >::Size(), cStringList::Sort(), cString::sprintf(), cDevice::UseDevice(), and useDvbDevices.

Referenced by main().

◆ IsBonded()

virtual bool cDvbDevice::IsBonded ( void ) const
inlineoverrideprotectedvirtual

Returns true if this device is bonded to an other device.

Only implemented by cDvbDevice and used in GetDeviceForTransponder(). May be dropped in a future version, if a better solution is found. Do not use otherwise!

Reimplemented from cDevice.

Definition at line 182 of file dvbdevice.h.

References bondedDevice.

◆ IsTunedToTransponder()

bool cDvbDevice::IsTunedToTransponder ( const cChannel * Channel) const
overridevirtual

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

Reimplemented from cDevice.

Definition at line 2333 of file dvbdevice.c.

References dvbTuner.

Referenced by cDvbHdFfDevice::SetChannelDevice(), and cDvbSdFfDevice::SetChannelDevice().

◆ MaySwitchTransponder()

bool cDvbDevice::MaySwitchTransponder ( const cChannel * Channel) const
overridevirtual

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

If an occupied timeout has been set for this device, and that timeout has not yet expired, this function returns false.

Reimplemented from cDevice.

Definition at line 2338 of file dvbdevice.c.

References BondingOk(), and cDevice::MaySwitchTransponder().

◆ NumProvidedSystems()

int cDvbDevice::NumProvidedSystems ( void ) const
overridevirtual

Returns the number of individual "delivery systems" this device provides.

The default implementation returns 0, so any derived class that can actually provide channels must implement this function. The result of this function is used when selecting a device, in order to avoid devices that provide more than one system.

Reimplemented from cDevice.

Reimplemented in cDvbHdFfDevice, and cDvbSdFfDevice.

Definition at line 2303 of file dvbdevice.c.

References dvbTuner.

Referenced by cDvbHdFfDevice::NumProvidedSystems(), and cDvbSdFfDevice::NumProvidedSystems().

◆ OpenDvr()

bool cDvbDevice::OpenDvr ( void )
overrideprotectedvirtual

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

Reimplemented from cDevice.

Definition at line 2367 of file dvbdevice.c.

References adapter, CloseDvr(), DEV_DVB_DVR, cDevice::DeviceNumber(), DvbOpen(), fd_dvr, frontend, tsBuffer, and TSBUFFERSIZE.

◆ OpenFilter()

int cDvbDevice::OpenFilter ( u_short Pid,
u_char Tid,
u_char Mask )
overrideprotectedvirtual

Opens a file handle for the given filter data.

A derived device that provides section data must implement this function.

Reimplemented from cDevice.

Definition at line 2187 of file dvbdevice.c.

References adapter, DEV_DVB_DEMUX, dsyslog, DvbName(), EITPID, esyslog, frontend, MAX_SECTION_SIZE, and RB_NUM_SECTIONS.

◆ Positioner()

const cPositioner * cDvbDevice::Positioner ( void ) const
overridevirtual

Returns a pointer to the positioner (if any) this device has used to move the satellite dish to the requested position (only applies to DVB-S devices).

If no positioner is involved, or this is not a DVB-S device, NULL will be returned.

Reimplemented from cDevice.

Definition at line 2308 of file dvbdevice.c.

References dvbTuner.

Referenced by BondingOk().

◆ Probe()

bool cDvbDevice::Probe ( int Adapter,
int Frontend )
staticprivate

Probes for existing DVB devices.

Definition at line 1952 of file dvbdevice.c.

References Adapter(), cDvbDevice(), DEV_DVB_FRONTEND, dsyslog, DvbDeviceProbes, DvbName(), and Frontend().

Referenced by Initialize().

◆ ProvidesChannel()

bool cDvbDevice::ProvidesChannel ( const cChannel * Channel,
int Priority = IDLEPRIORITY,
bool * NeedsDetachReceivers = NULL ) const
overridevirtual

Returns true if this device can provide the given channel.

In case the device has cReceivers attached to it, Priority is used to decide whether the caller's request can be honored. The special Priority value IDLEPRIORITY 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 from cDevice.

Definition at line 2248 of file dvbdevice.c.

References cChannel::Apid(), bondedDevice, BondingOk(), bondMutex, cChannel::Ca(), CA_ENCRYPTED_MIN, cDevice::CamSlot(), cDvbDevice(), cChannel::Dpid(), dvbTuner, cDevice::HasPid(), IDLEPRIORITY, needsDetachBondedReceivers, cDevice::Priority(), ProvidesTransponder(), cDevice::Receiving(), and cChannel::Vpid().

◆ ProvidesDeliverySystem()

bool cDvbDevice::ProvidesDeliverySystem ( int DeliverySystem) const
virtual

Definition at line 2220 of file dvbdevice.c.

References dvbTuner.

Referenced by Bond(), and ProvidesSource().

◆ ProvidesEIT()

bool cDvbDevice::ProvidesEIT ( void ) const
overridevirtual

Returns true if this device provides EIT data and thus wants to be tuned to the channels it can receive regularly to update the data.

The default implementation returns false.

Reimplemented from cDevice.

Definition at line 2298 of file dvbdevice.c.

References cDevice::DeviceHooksProvidesEIT(), and dvbTuner.

◆ ProvidesSource()

bool cDvbDevice::ProvidesSource ( int Source) const
overridevirtual

Returns true if this device can provide the given source.

Reimplemented from cDevice.

Reimplemented in cDvbHdFfDevice, and cDvbSdFfDevice.

Definition at line 2225 of file dvbdevice.c.

References ProvidesDeliverySystem(), cSource::st_Mask, cSource::stAtsc, cSource::stCable, cSource::stNone, cSource::stSat, cSource::stTerr, and SYS_DVBT2.

Referenced by cDvbHdFfDevice::ProvidesSource(), cDvbSdFfDevice::ProvidesSource(), and ProvidesTransponder().

◆ ProvidesTransponder()

bool cDvbDevice::ProvidesTransponder ( const cChannel * Channel) const
overridevirtual

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

Reimplemented from cDevice.

Definition at line 2235 of file dvbdevice.c.

References cDevice::DeviceHooksProvidesTransponder(), cDevice::DeviceNumber(), Diseqcs, dvbTuner, cChannel::Frequency(), cSource::IsSat(), cChannel::Parameters(), cDvbTransponderParameters::Polarization(), ProvidesSource(), Setup, and cChannel::Source().

Referenced by ProvidesChannel().

◆ SetChannelDevice()

bool cDvbDevice::SetChannelDevice ( const cChannel * Channel,
bool LiveView )
overrideprotectedvirtual

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

Reimplemented from cDevice.

Reimplemented in cDvbHdFfDevice, and cDvbSdFfDevice.

Definition at line 2348 of file dvbdevice.c.

References dvbTuner.

Referenced by cDvbHdFfDevice::SetChannelDevice(), and cDvbSdFfDevice::SetChannelDevice().

◆ SetPid()

bool cDvbDevice::SetPid ( cPidHandle * Handle,
int Type,
bool On )
overrideprotectedvirtual

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 from cDevice.

Reimplemented in cDvbHdFfDevice, and cDvbSdFfDevice.

Definition at line 2145 of file dvbdevice.c.

References adapter, CHECK, DEV_DVB_DEMUX, DvbOpen(), frontend, cDevice::cPidHandle::handle, LOG_ERROR, cDevice::cPidHandle::pid, cDevice::ptTeletext, and cDevice::cPidHandle::used.

◆ SetPowerSaveMode()

void cDvbDevice::SetPowerSaveMode ( bool On)
overridevirtual

Puts the device into power save mode, if applicable.

If On is true, power save mode shall be activated, if it is false, normal operating mode shall be restored. The default implementation does nothing.

Reimplemented from cDevice.

Definition at line 2343 of file dvbdevice.c.

References dvbTuner.

◆ SetTransferModeForDolbyDigital()

void cDvbDevice::SetTransferModeForDolbyDigital ( int Mode)
static

Definition at line 2362 of file dvbdevice.c.

References setTransferModeForDolbyDigital.

Referenced by cExternalAudio::cExternalAudio().

◆ SignalQuality()

int cDvbDevice::SignalQuality ( void ) const
overridevirtual

Returns the "quality" of the currently received signal.

This is a value in the range 0 (worst quality) through 100 (best possible quality). A value of -1 indicates that this device has no concept of a "signal quality".

Reimplemented from cDevice.

Definition at line 2323 of file dvbdevice.c.

References dvbTuner.

◆ SignalStats()

bool cDvbDevice::SignalStats ( int & Valid,
double * Strength = NULL,
double * Cnr = NULL,
double * BerPre = NULL,
double * BerPost = NULL,
double * Per = NULL,
int * Status = NULL ) const
overridevirtual

Returns statistics about the currently received signal (if available).

Strength is the signal strength in dBm (typical range -100dBm...0dBm). Cnr is the carrier to noise ratio in dB (typical range 0dB...40dB). BerPre is the bit error rate before the forward error correction (FEC). BerPost is the bit error rate after the forward error correction (FEC). Per is the block error rate after the forward error correction (FEC). Status is the masked frontend status (signal/carrier/viterbi/sync/lock). Typical range for BerPre, BerPost and Per is 0...1. If any of the given pointers is not NULL, the value of the respective signal statistic is returned in it. Upon return, Valid holds a combination of DTV_STAT_VALID_* flags, indicating which of the returned values are actually valid. If the flag for a particular parameter in Valid is 0, the returned value is undefined. It depends on the device which of these parameters (if any) are available. Returns true if any of the requested parameters is valid. If false is returned, the value in Valid is undefined.

Reimplemented from cDevice.

Definition at line 2313 of file dvbdevice.c.

References dvbTuner.

◆ SignalStrength()

int cDvbDevice::SignalStrength ( void ) const
overridevirtual

Returns the "strength" of the currently received signal.

This is a value in the range 0 (no signal at all) through 100 (best possible signal). A value of -1 indicates that this device has no concept of a "signal strength".

Reimplemented from cDevice.

Definition at line 2318 of file dvbdevice.c.

References dvbTuner.

◆ UnBond()

void cDvbDevice::UnBond ( void )

Removes this device from any bonding it might have with other devices.

If this device is not bonded with any other device, nothing happens.

Definition at line 2115 of file dvbdevice.c.

References bondedDevice, bondMutex, cDvbDevice(), cDevice::DeviceNumber(), dsyslog, and dvbTuner.

Referenced by ~cDvbDevice().

◆ UnBondDevices()

void cDvbDevice::UnBondDevices ( void )
static

Unbonds all devices.

Definition at line 2083 of file dvbdevice.c.

References cDvbDevice(), cDevice::GetDevice(), and cDevice::NumDevices().

Referenced by BondDevices().

Member Data Documentation

◆ adapter

◆ bondedDevice

cDvbDevice* cDvbDevice::bondedDevice
private

◆ bondMutex

cMutex cDvbDevice::bondMutex
staticprivate

Definition at line 186 of file dvbdevice.h.

Referenced by Bond(), BondingOk(), DetachAllReceivers(), ProvidesChannel(), and UnBond().

◆ checkTsBuffer

bool cDvbDevice::checkTsBuffer
private

Definition at line 185 of file dvbdevice.h.

Referenced by cDvbDevice(), and GetTSPacket().

◆ ciAdapter

cCiAdapter* cDvbDevice::ciAdapter
private

Definition at line 227 of file dvbdevice.h.

Referenced by cDvbDevice(), HasCi(), and ~cDvbDevice().

◆ dvbTuner

◆ fd_ca

int cDvbDevice::fd_ca
private

Definition at line 184 of file dvbdevice.h.

Referenced by cDvbDevice().

◆ fd_dvr

int cDvbDevice::fd_dvr
private

Definition at line 184 of file dvbdevice.h.

Referenced by cDvbDevice(), CloseDvr(), and OpenDvr().

◆ frontend

◆ needsDetachBondedReceivers

bool cDvbDevice::needsDetachBondedReceivers
mutableprivate

Definition at line 188 of file dvbdevice.h.

Referenced by cDvbDevice(), DetachAllReceivers(), and ProvidesChannel().

◆ setTransferModeForDolbyDigital

int cDvbDevice::setTransferModeForDolbyDigital = 1
staticprotected

◆ tsBuffer

cTSBuffer* cDvbDevice::tsBuffer
private

< Controls how the DVB device handles Transfer Mode when replaying Dolby Digital audio.

0 = don't set "audio bypass" in driver/firmware, don't force Transfer Mode 1 = set "audio bypass" in driver/firmware, force Transfer Mode (default) 2 = don't set "audio bypass" in driver/firmware, force Transfer Mode

Definition at line 284 of file dvbdevice.h.

Referenced by cDvbDevice(), CloseDvr(), GetTSPacket(), OpenDvr(), cDvbHdFfDevice::PlayAudio(), and cDvbHdFfDevice::PlayVideo().

◆ useDvbDevices

bool cDvbDevice::useDvbDevices = true
static

Definition at line 175 of file dvbdevice.h.

Referenced by Initialize(), and main().


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