mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
- Fixed an incomplete initialization of the filter parameters in eit.c (thanks to Jeremy Hall). - Fixed the 'newplugin' script for use with the NEWSTRUCT driver (thanks to Andreas Schultz for reporting this one). If you have already created a plugin directory and Makefile with 'newplugin', please apply the following patch to it: ------------------------------------------------------- --- Makefile 2002/06/10 16:24:06 1.4 +++ Makefile 2002/09/17 15:36:36 1.5 @@ -15,7 +15,12 @@ ### The directory environment: +ifdef NEWSTRUCT +DVBDIR = ../../../../DVB/include +DEFINES += -DNEWSTRUCT +else DVBDIR = ../../../../DVB/ost/include +endif VDRDIR = ../../.. VDRINC = $(VDRDIR)/include LIBDIR = ../../lib @@ -34,7 +39,7 @@ INCLUDES = -I$(VDRINC) -I$(DVBDIR) -DEFINES = -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' ### The object files (add further files here): ------------------------------------------------------- This is the diff for the 'setup' example that comes with VDR, so your line numbers may be different. - Added a missing 'public' keyword in device.h (thanks to Martin Hammerschmid). - Fixed a race condition when starting 'Transfer Mode'. - Rearranged the remote control key handling to allow plugins to implement additional types of remote controls (see PLUGINS.html, section "Remote Control"). The previously used files 'keys.conf' and 'keys-pc.conf' have been replaced by the file 'remote.conf', which holds the key definitions of all remote controls. - The LIRC remote control keys are now handled just like the keyboard and RCU keys. This means that you can use the lircd.conf file as is for your remote control, without the need of editing it to make the key names the same as used in VDR. When first starting VDR it will go into the "Learning keys" mode and ask you to press the various keys. The resulting key assignment will be stored in the file 'remote.conf'. Since I have no way of testing the LIRC support, I hope I didn't break it in the process... - While learning the remote control keys it is now possible to press the 'Menu' key to skip the definition of keys that are not available on your particular RC unit. - Fixed handling DVD subtitles in the SPU decoder (thanks to Andreas Schultz). - Avoiding restarts due to 'panic level' when switching channels on the primary device during EPG scan.
122 lines
3.0 KiB
C++
122 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.11 2002/09/28 12:21:36 kls Exp $
|
|
*/
|
|
|
|
#ifndef __DVBDEVICE_H
|
|
#define __DVBDEVICE_H
|
|
|
|
#ifdef NEWSTRUCT
|
|
#include <linux/dvb/frontend.h>
|
|
#else
|
|
#include <stdlib.h> // FIXME: this is apparently necessary for the ost/... header files
|
|
// FIXME: shouldn't every header file include ALL the other header
|
|
// FIXME: files it depends on? The sequence in which header files
|
|
// FIXME: are included here should not matter - and it should NOT
|
|
// FIXME: be necessary to include <stdlib.h> here!
|
|
#include <ost/frontend.h>
|
|
#endif
|
|
#include "device.h"
|
|
#include "dvbspu.h"
|
|
#include "eit.h"
|
|
|
|
#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:
|
|
FrontendType frontendType;
|
|
#ifdef NEWSTRUCT
|
|
int fd_osd, fd_frontend, fd_audio, fd_video, fd_dvr;
|
|
#else
|
|
int fd_osd, fd_frontend, fd_sec, fd_audio, fd_video, fd_dvr;
|
|
#endif
|
|
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 frequency;
|
|
public:
|
|
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);
|
|
|
|
// Volume facilities
|
|
|
|
protected:
|
|
virtual void SetVolumeDevice(int Volume);
|
|
|
|
// EIT facilities
|
|
|
|
private:
|
|
cSIProcessor *siProcessor;
|
|
|
|
// Player facilities
|
|
|
|
protected:
|
|
ePlayMode playMode;
|
|
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 int 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
|