mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Adapted the tuning code to the new DVBFE_SET_DELSYS API (thanks to Reinhard Nissl). VDR now uses the driver from http://jusst.de/hg/multiproto_plus. - Updated the Italian OSD texts (thanks to Diego Pierotto). - Removed obsolete $(NCURSESLIB) from the Makefile. - Implemented handling the standard component descriptor for AC3 (stream=4), as it will soon be used by the German ARD channels (thanks to Michael Pennewiß for advance information about this change). The previously used "Premiere pseudo standard" (stream=2, type=5) still works, but has apparently been wrongfully used by broadcasters from the beginning. - Added missing description of the 'S' channel parameter to vdr.5 (reported by Reinhard Nissl). - The SVDRP signon message now indicates the character encoding in use, as in "220 video SVDRP VideoDiskRecorder 1.7.1; Fri May 2 16:17:10 2008; ISO-8859-1". This may be useful for instance for external tools that provide EPG data, so that they can correctly encode the strings. - No longer calling FcFini() to avoid problems with older (broken) versions of fontconfig (suggested by Edgar Toernig). - Removed the compile time option VFAT to allow users of precompiled binary distributions to have full control over whether or not to use the --vfat option at runtime (suggested by Michael Nork). - First step towards switching to TS (Transport Stream) as recording format: + The new function cDevice::PlayTs() is used to play TS packets. + The new functions cDevice::PlayTsVideo() and cDevice::PlayTsAudio() are used to play video and audio TS packets, respectively. + The new function cAudio::PlayTs() is used to play audio TS packets. + The new class cPatPmtGenerator is used to generate a PAT/PMT pair that precedes the TS data in Transfer Mode. + The new class cPatPmtParser is used by cDevice to parse the PAT/PMT data in a TS in order to find out which streams it contains. + The new class cTsToPes is used to convert TS packets to a PES packet. + cTransfer no longer uses cRemux, and doesn't run a separate thread any more. It just generates a PAT/PMT and sends all received TS packets to the primary device's PlayTs(). + Live subtitle display no longer uses a ring buffer and separate thread. + cPesAssembler has been removed. Old VDR recordings only contain complete PES packets. + Since a TS needs to have a PAT/PMT, which requires the video stream type to be explicitly given, the format of the VPID field in the channels.conf file and the SVDRP commands NEWC/MODC/LSTC has been extended. The video stream type now follows the VPID and optional PPID, separated by an '=' sign. - Updated the sources.conf file (thanks to Oleg Roitburd). - Fixed a possible integer overflow in GetAbsTime() (thanks to Alexander Rieger). - Fixed a problem with calling isyslog() from within the SignalHandler() (thanks to Udo Richter). - Replaced the Finnish language code "smi" with "suo" (thanks to Rolf Ahrenberg). - Fixed wrong value for TableIdBAT in libsi/si.h (thanks to Winfried Köhler). - Errors in config files no longer keep VDR from starting. - Removed unneeded include files <linux/dvb/dmx.h> und <time.h> from remux.h (reported by Tobias Grimm).
165 lines
4.4 KiB
C++
165 lines
4.4 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 2.2 2008/06/01 09:48:04 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 || DVB_API_VERSION_MINOR != 3
|
|
#error VDR requires Linux DVB driver API version 3.3!
|
|
#endif
|
|
|
|
#define MAXDVBDEVICES 8
|
|
|
|
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:
|
|
dvbfe_delsys frontendType;
|
|
int numProvidedSystems;
|
|
int fd_osd, fd_audio, fd_video, fd_dvr, fd_stc, fd_ca;
|
|
protected:
|
|
virtual void MakePrimaryDevice(bool On);
|
|
public:
|
|
cDvbDevice(int n);
|
|
virtual ~cDvbDevice();
|
|
virtual bool Ready(void);
|
|
virtual bool HasDecoder(void) const;
|
|
|
|
// Common Interface facilities:
|
|
|
|
private:
|
|
cCiAdapter *ciAdapter;
|
|
|
|
// 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 int NumProvidedSystems(void) 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);
|
|
virtual void CloseFilter(int Handle);
|
|
|
|
// Common Interface facilities:
|
|
|
|
public:
|
|
virtual bool HasCi(void);
|
|
|
|
// 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);
|
|
virtual int PlayTsVideo(const uchar *Data, int Length);
|
|
virtual int PlayTsAudio(const uchar *Data, int Length);
|
|
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
|