vdr/dvbdevice.h
Klaus Schmidinger 1a8a081629 Version 1.1.15
- Completely switched to the new CVS HEAD version of the linux-dvb driver.
  The NEWSTRUCT compile time switch is now obsolete. The required driver is now
  the CVS HEAD version dated 2002-11-01 or later.
- Adjusted the INSTALL file to the 1.1.x version.
- Only accepting key presses from the current remote control when learning (thanks to
  Oliver Endriss).
- Fixed the EPG scanner, which broke 'Transfer Mode' as soon as it kicked in
  (thanks to Oliver Endriss for reporting this one).
- Fixed handling audio tracks in cDvbDevice.
- Updated channels.conf.terr (thanks to Uwe Scheffler).
- Fixed displaying the group separators in the channel display (thanks to Martin
  Hammerschmid for pointing out this one).
- The Makefile now includes the file Make.config (if present in the VDR source
  directory), which allows the user to overwrite several settings with individual
  values (suggested by Andreas Schultz). The VDR distribution archive does not
  contain this file in order to not overwrite a user defined file. There is a
  Make.config.template which contains the default values of the macros the user
  can overwrite.
- Since there have been changes to the 'newplugin' script authors of plugins
  may want to newly create their plugins' Makefiles with the new version of this
  script, and adapt them to their individual needs (make sure you don't overwrite
  your existing plugin directory - make a backup copy first!).
- Fixed reading EPG data via the SVDRP command PUTE (it changed the current
  service ID).
- Fixed closing all dup'ed file descriptors in cPipe.
- Implemented a plugin interface for additional audio processing (see PLUGINS.html
  under "Dolby Digital").
  The functionality of the '-a' command line option has been reactivated.
  Since the author doesn't have any Dolby Digital equipment this may or may not
  work as expected. There may still be some places where a call to cAudios::Clear()
  or cAudios::Mute() is necessary. Those with Dolby Digital equipment should please
  take a look at this and maybe send patches.
  Replaying Dolby Digital in ways other than through VDR's '-a' option will have to
  be implemented as plugins. Those who have written patches for VDR version 1.0.x
  should convert their work into the proper plugins for version 1.1.x.
  Note to authors of cPlayer derived plugins: please read the modified comments
  in device.h regarding the member functions cDevice::Clear(), cDevice::Mute() and
  cDevice::PlayAudio(). Derived classes must call these base class member functions
  to make sure all registered cAudio objects are properly handled. Also note that
  the return type of cDevice::PlayAudio() has been changed to 'void', since this
  function always has to accept the entire data block immediately and there is
  nothing that could be reasonably done in case an error occurs in one of the
  cAudio objects.
- Now checking the driver's DVB_API_VERSION in dvbdevice.h. Since VDR now requires
  a driver dated 2002-11-01 or later the MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT and
  DVB_DRIVER_VERSION stuff has been replaced with DO_REC_AND_PLAY_ON_PRIMARY_DEVICE,
  which can be used to disable simultaneous recording and replaying on the primary
  DVB device in case there are problems with this.
2002-11-03 18:00:00 +01:00

124 lines
3.0 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.18 2002/11/03 12:31:15 kls Exp $
*/
#ifndef __DVBDEVICE_H
#define __DVBDEVICE_H
#include <linux/dvb/frontend.h>
#include <linux/dvb/version.h>
#include "device.h"
#include "dvbspu.h"
#include "eit.h"
#if DVB_API_VERSION != 3
#error VDR requires Linux DVB driver API version 3!
#endif
#define MAXDVBDEVICES 4
class cDvbDevice : public cDevice {
friend class cDvbOsd;
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.
private:
fe_type_t frontendType;
int fd_osd, fd_frontend, fd_audio, fd_video, fd_dvr;
int OsdDeviceHandle(void) const { return fd_osd; }
protected:
virtual void MakePrimaryDevice(bool On);
public:
cDvbDevice(int n);
virtual ~cDvbDevice();
virtual bool HasDecoder(void) const;
// OSD facilities
private:
cDvbSpuDecoder *spuDecoder;
public:
cOsdBase *NewOsd(int x, int y);
virtual cSpuDecoder *GetSpuDecoder(void);
// Channel facilities
private:
int source;
int frequency;
const char *diseqcCommands;
bool IsTunedTo(const cChannel *Channel) const;
public:
virtual bool ProvidesSource(int Source) const;
virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
protected:
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
// PID handle facilities
protected:
virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
// Image Grab facilities
public:
virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
// Video format facilities
public:
virtual void SetVideoFormat(bool VideoFormat16_9);
// Audio facilities
private:
int aPid1, aPid2;
protected:
virtual void SetVolumeDevice(int Volume);
virtual int NumAudioTracksDevice(void) const;
virtual const char **GetAudioTracksDevice(int *CurrentTrack = NULL) const;
virtual void SetAudioTrackDevice(int Index);
// EIT facilities
private:
cSIProcessor *siProcessor;
// Player facilities
protected:
ePlayMode playMode;
virtual bool CanReplay(void) const;
virtual bool SetPlayMode(ePlayMode PlayMode);
public:
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 int PlayVideo(const uchar *Data, int Length);
virtual void PlayAudio(const uchar *Data, int Length);
// Receiver facilities
private:
cTSBuffer *tsBuffer;
protected:
virtual bool OpenDvr(void);
virtual void CloseDvr(void);
virtual bool GetTSPacket(uchar *&Data);
};
#endif //__DVBDEVICE_H