vdr/dvbdevice.h
Klaus Schmidinger dbacda8274 Version 1.3.21
- Fixed cDvbDevice::SetAudioTrackDevice() to avoid a blank screen after switching
  back to live mode if a recording is currently active on the primary device.
- Fixed a possible freeze in pause mode in case a device's PlayPesPacket() function
  permanently returns 0 (thanks to Reinhard Nissl and Olaf Titz).
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Restricted the "setting audio track" log message to automatic changes during replay.
- Fixed handling Transfer Mode for radio channels (thanks to Andreas Regel for
  reporting this one).
- Fixed handling symbolic links in cRecordings::ScanVideoDir() (thanks to Stefan
  Huelswitt).
- Completed the Danish OSD texts (thanks to Mogens Elneff).
- Forcing a new resync after a call to cRemux::Clear() (suggested by Marco Schlüßler).
- The cAudio::Play() function now has an additional parameter 'uchar Id' which tells
  the function the substream id of the given audio packet, so that a plugin can
  take the right action for the various kinds if audio data - which now also includes
  "normal" audio with ids 0xC0...0xDF (based on suggestions by Werner Fink and Macro
  Schlüßler).
- Removed the "Cleared/PlayPes(NULL, 0)" handling from cTransfer::Action(), since this
  is now done when attaching the player to the device (thanks to Marco Schlüßler).
- Making sure the buffer reserve in cTransfer::Action() is re-established after
  clearing the buffer.
- Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
  (thanks to Marco Schlüßler).
- Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl).
- Now using twice the buffer reserve in cTransfer if the primary DVB card is an
  unmodified version with only 2MB of SDRAM, to avoid audio stuttering when
  playing Dolby Digital over the DVB card (thanks to Christian Jacobsen and Chad
  Flynt for suggestions and experiments in that area).
- Making sure the first audio packet is not dropped when switching to "pre 1.3.19
  Dolby Digital compatibility mode".
- The 'plugins-clean' target of the Makefile now only deletes the actual plugin
  library files from this version of VDR (suggested by Andreas Brachold).
- Added a missing 'resultSkipped = 0' to cRemux::Clear() (thanks to Marco Schlüßler
  for reporting this one).
- The new function cDvbDevice::SetTransferModeForDolbyDigital() can be used by
  plugins that implement Dolby Digital output and thus want to prevent the cDvbDevice
  from starting Transfer Mode in order to replay DD over the DVB device.
- Added missing reset of the 'repacker' to cTS2PES::Clear() (thanks to Marco
  Schlüßler for reporting this one).
2005-02-13 18:00:00 +01:00

141 lines
3.5 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.33 2005/02/13 14:14:31 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 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;
protected:
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
public:
virtual bool HasLock(int TimeoutMs = 0);
// PID handle facilities
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 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);
virtual eVideoSystem GetVideoSystem(void);
// Track facilities
protected:
virtual void SetAudioTrackDevice(eTrackType Type);
// Audio facilities
private:
bool digitalAudio;
static bool 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(bool On);
// 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);
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