mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed the PremiereContentTransmissionDescriptor in 'libsi' (thanks to Stefan Huelswitt). - Removed all the compatibility '#if APIVERSNUM...' stuff and instead increased the API version number - plugins will have to be recompiled. - Removed the call to pthread_setschedparam(childTid, SCHED_RR, 0) in thread.c, because it caused a compiler warning with post-2.4 glibc (reported by Ville Skyttä). Since the third parameter has to be non-null to have any effect, the call was presumably a NOP, anyway. - Fixed the 'clean-plugins' target in the Makefile to also remove additional plugin libraries (thanks to Wayne Keer). - Applied the fixes to moving and deleting channels from version 1.4.0-2 to the SVDRP commands MOVC and DELC as well. - Fixed handling the display of the '*' indicator in the "What's on now/next?" menu, so that events that haven't been "seen" in the data stream within 30 seconds won't be shown as "running". - Fixed handling tabbed item display in 'skincurses'. - Increased the column spacing in the "Recordings" menu (was too small for the 'skincurses' plugin). - When the 'skincurses' plugin is loaded, it automatically sets the 'curses' skin as the current one. This doesn't modify the Setup.OSDSkin parameter, so that after using 'skincurses' (for instance for debugging) the previously selected skin will be used again. - Added some log messages when setting the current skin. - Only making a second attempt to set the current skin at startup if the first attempt has failed. - Now switching to non-VPS timers' channels 60 seconds before the timer starts (if a free device is available), to allow for the updating of EPG data and CA descriptors before the actual recording starts.
151 lines
4.1 KiB
C++
151 lines
4.1 KiB
C++
/*
|
|
* dvbdevice.h: The DVB device interface
|
|
*
|
|
* See the main source file 'vdr.c' for copyright information and
|
|
* how to reach the author.
|
|
*
|
|
* $Id: dvbdevice.h 1.41 2006/05/28 15:05:19 kls Exp $
|
|
*/
|
|
|
|
#ifndef __DVBDEVICE_H
|
|
#define __DVBDEVICE_H
|
|
|
|
#include <linux/dvb/frontend.h>
|
|
#include <linux/dvb/version.h>
|
|
#include "device.h"
|
|
#include "dvbspu.h"
|
|
|
|
#if DVB_API_VERSION != 3
|
|
#error VDR requires Linux DVB driver API version 3!
|
|
#endif
|
|
|
|
#define MAXDVBDEVICES 4
|
|
|
|
class cDvbTuner;
|
|
|
|
/// The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
|
|
|
|
class cDvbDevice : public cDevice {
|
|
private:
|
|
static bool Probe(const char *FileName);
|
|
///< Probes for existing DVB devices.
|
|
public:
|
|
static bool Initialize(void);
|
|
///< Initializes the DVB devices.
|
|
///< Must be called before accessing any DVB functions.
|
|
///< \return True if any devices are available.
|
|
private:
|
|
fe_type_t frontendType;
|
|
int fd_osd, fd_audio, fd_video, fd_dvr, fd_stc;
|
|
protected:
|
|
virtual void MakePrimaryDevice(bool On);
|
|
public:
|
|
cDvbDevice(int n);
|
|
virtual ~cDvbDevice();
|
|
virtual bool Ready(void);
|
|
virtual int ProvidesCa(const cChannel *Channel) const;
|
|
virtual bool HasDecoder(void) const;
|
|
|
|
// SPU facilities
|
|
|
|
private:
|
|
cDvbSpuDecoder *spuDecoder;
|
|
public:
|
|
virtual cSpuDecoder *GetSpuDecoder(void);
|
|
|
|
// Channel facilities
|
|
|
|
private:
|
|
cDvbTuner *dvbTuner;
|
|
void TurnOffLiveMode(bool LiveView);
|
|
public:
|
|
virtual bool ProvidesSource(int Source) const;
|
|
virtual bool ProvidesTransponder(const cChannel *Channel) const;
|
|
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
|
|
virtual bool IsTunedToTransponder(const cChannel *Channel);
|
|
protected:
|
|
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
|
|
public:
|
|
virtual bool HasLock(int TimeoutMs = 0);
|
|
|
|
// PID handle facilities
|
|
|
|
private:
|
|
bool SetAudioBypass(bool On);
|
|
protected:
|
|
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
|
|
|
|
// Section filter facilities
|
|
|
|
protected:
|
|
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
|
|
|
|
// Image Grab facilities
|
|
|
|
private:
|
|
static int devVideoOffset;
|
|
int devVideoIndex;
|
|
public:
|
|
virtual uchar *GrabImage(int &Size, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
|
|
|
|
// Video format facilities
|
|
|
|
public:
|
|
virtual void SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat);
|
|
virtual void SetVideoFormat(bool VideoFormat16_9);
|
|
virtual eVideoSystem GetVideoSystem(void);
|
|
|
|
// Track facilities
|
|
|
|
protected:
|
|
virtual void SetAudioTrackDevice(eTrackType Type);
|
|
|
|
// Audio facilities
|
|
|
|
private:
|
|
bool digitalAudio;
|
|
static int setTransferModeForDolbyDigital;
|
|
protected:
|
|
virtual int GetAudioChannelDevice(void);
|
|
virtual void SetAudioChannelDevice(int AudioChannel);
|
|
virtual void SetVolumeDevice(int Volume);
|
|
virtual void SetDigitalAudioDevice(bool On);
|
|
public:
|
|
static void SetTransferModeForDolbyDigital(int Mode);
|
|
///< 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
|
|
|
|
// Player facilities
|
|
|
|
protected:
|
|
ePlayMode playMode;
|
|
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);
|
|
public:
|
|
virtual int64_t GetSTC(void);
|
|
virtual void TrickSpeed(int Speed);
|
|
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);
|
|
|
|
// Receiver facilities
|
|
|
|
private:
|
|
cTSBuffer *tsBuffer;
|
|
protected:
|
|
virtual bool OpenDvr(void);
|
|
virtual void CloseDvr(void);
|
|
virtual bool GetTSPacket(uchar *&Data);
|
|
};
|
|
|
|
#endif //__DVBDEVICE_H
|