vdr 2.6.1
dvbsdffdevice.h
Go to the documentation of this file.
1/*
2 * dvbsdffdevice.h: The DVB SD Full Featured device interface
3 *
4 * See the README file for copyright information and how to reach the author.
5 *
6 * $Id: dvbsdffdevice.h 4.0 2014/03/15 12:36:35 kls Exp $
7 */
8
9#ifndef __DVBSDFFDEVICE_H
10#define __DVBSDFFDEVICE_H
11
12#include <vdr/dvbdevice.h>
13#include <vdr/dvbspu.h>
14
16
17class cDvbSdFfDevice : public cDvbDevice {
18private:
21protected:
22 virtual void MakePrimaryDevice(bool On);
23public:
24 cDvbSdFfDevice(int Adapter, int Frontend, bool OutputOnly);
25 virtual ~cDvbSdFfDevice();
26 virtual bool HasDecoder(void) const;
27 virtual bool AvoidRecording(void) const;
28
29// SPU facilities
30
31private:
33public:
34 virtual cSpuDecoder *GetSpuDecoder(void);
35
36// Channel facilities
37
38public:
39 virtual bool ProvidesSource(int Source) const;
40 virtual int NumProvidedSystems(void) const;
41private:
42 void TurnOffLiveMode(bool LiveView);
43protected:
44 virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
45
46// PID handle facilities
47
48private:
49 bool SetAudioBypass(bool On);
50protected:
51 virtual bool SetPid(cPidHandle *Handle, int Type, bool On);
52
53// Image Grab facilities
54
55private:
56 static int devVideoOffset;
58public:
59 virtual uchar *GrabImage(int &Size, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
60
61// Video format facilities
62
63public:
64 virtual void SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat);
65 virtual void SetVideoFormat(bool VideoFormat16_9);
66 virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect);
67 virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect);
68
69// Track facilities
70
71protected:
72 virtual void SetAudioTrackDevice(eTrackType Type);
73
74// Audio facilities
75
76private:
78protected:
79 virtual int GetAudioChannelDevice(void);
80 virtual void SetAudioChannelDevice(int AudioChannel);
81 virtual void SetVolumeDevice(int Volume);
82 virtual void SetDigitalAudioDevice(bool On);
83
84// Player facilities
85
86protected:
88 virtual bool CanReplay(void) const;
89 virtual bool SetPlayMode(ePlayMode PlayMode);
90 virtual int PlayVideo(const uchar *Data, int Length);
91 virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
92 virtual int PlayTsVideo(const uchar *Data, int Length);
93 virtual int PlayTsAudio(const uchar *Data, int Length);
94public:
95 virtual int64_t GetSTC(void);
96 virtual void TrickSpeed(int Speed, bool Forward);
97 virtual void Clear(void);
98 virtual void Play(void);
99 virtual void Freeze(void);
100 virtual void Mute(void);
101 virtual void StillPicture(const uchar *Data, int Length);
102 virtual bool Poll(cPoller &Poller, int TimeoutMs = 0);
103 virtual bool Flush(int TimeoutMs = 0);
104 };
105
107private:
109public:
111 void SetOutputOnly(bool On) { outputOnly = On; }
112 virtual bool Probe(int Adapter, int Frontend);
113 };
114
115#endif //__DVBSDFFDEVICE_H
The cDvbDevice implements a DVB device which can be accessed through the Linux DVB driver API.
Definition: dvbdevice.h:168
int Frontend(void) const
Definition: dvbdevice.c:1887
int Adapter(void) const
Definition: dvbdevice.h:192
void SetOutputOnly(bool On)
virtual bool Probe(int Adapter, int Frontend)
Probes for a DVB device at the given Adapter and creates the appropriate object derived from cDvbDevi...
The cDvbSdFfDevice implements a DVB device which can be accessed through the Linux DVB driver API.
Definition: dvbsdffdevice.h:17
virtual void SetVolumeDevice(int Volume)
Sets the audio volume on this device (Volume = 0...255).
void TurnOffLiveMode(bool LiveView)
virtual void SetDigitalAudioDevice(bool On)
Tells the output device that the current audio track is Dolby Digital.
virtual void Clear(void)
Clears all video and audio data from the device.
virtual void Freeze(void)
Puts the device into "freeze frame" mode.
virtual void Play(void)
Sets the device into play mode (after a previous trick mode).
virtual uchar * GrabImage(int &Size, bool Jpeg=true, int Quality=-1, int SizeX=-1, int SizeY=-1)
Grabs the currently visible screen image.
virtual void GetVideoSize(int &Width, int &Height, double &VideoAspect)
Returns the Width, Height and VideoAspect ratio of the currently displayed video material.
virtual int64_t GetSTC(void)
Gets the current System Time Counter, which can be used to synchronize audio, video and subtitles.
virtual bool CanReplay(void) const
Returns true if this device can currently start a replay session.
virtual void SetVideoFormat(bool VideoFormat16_9)
Sets the output video format to either 16:9 or 4:3 (only useful if this device has an MPEG decoder).
virtual int PlayTsAudio(const uchar *Data, int Length)
Plays the given data block as audio.
virtual bool ProvidesSource(int Source) const
Returns true if this device can provide the given source.
virtual void SetVideoDisplayFormat(eVideoDisplayFormat VideoDisplayFormat)
Sets the video display format to the given one (only useful if this device has an MPEG decoder).
ePlayMode playMode
Definition: dvbsdffdevice.h:87
virtual cSpuDecoder * GetSpuDecoder(void)
Returns a pointer to the device's SPU decoder (or NULL, if this device doesn't have an SPU decoder).
Definition: dvbsdffdevice.c:95
virtual void MakePrimaryDevice(bool On)
Informs a device that it will be the primary device.
Definition: dvbsdffdevice.c:78
virtual int NumProvidedSystems(void) const
Returns the number of individual "delivery systems" this device provides.
virtual bool SetPid(cPidHandle *Handle, int Type, bool On)
Does the actual PID setting on this device.
virtual bool Poll(cPoller &Poller, int TimeoutMs=0)
Returns true if the device itself or any of the file handles in Poller is ready for further action.
virtual void SetAudioTrackDevice(eTrackType Type)
Sets the current audio track to the given value.
cDvbSpuDecoder * spuDecoder
Definition: dvbsdffdevice.h:32
virtual void Mute(void)
Turns off audio while replaying.
virtual void TrickSpeed(int Speed, bool Forward)
Sets the device into a mode where replay is done slower.
virtual bool AvoidRecording(void) const
Returns true if this device should only be used for recording if no other device is available.
Definition: dvbsdffdevice.c:90
virtual void StillPicture(const uchar *Data, int Length)
Displays the given I-frame as a still picture.
virtual int GetAudioChannelDevice(void)
Gets the current audio channel, which is stereo (0), mono left (1) or mono right (2).
virtual int PlayTsVideo(const uchar *Data, int Length)
Plays the given data block as video.
virtual int PlayAudio(const uchar *Data, int Length, uchar Id)
Plays the given data block as audio.
virtual ~cDvbSdFfDevice()
Definition: dvbsdffdevice.c:71
virtual bool SetPlayMode(ePlayMode PlayMode)
Sets the device into the given play mode.
bool SetAudioBypass(bool On)
virtual bool Flush(int TimeoutMs=0)
Returns true if the device's output buffers are empty, i.
virtual bool HasDecoder(void) const
Tells whether this device has an MPEG decoder.
Definition: dvbsdffdevice.c:85
static int devVideoOffset
Definition: dvbsdffdevice.h:56
virtual void SetAudioChannelDevice(int AudioChannel)
Sets the audio channel to stereo (0), mono left (1) or mono right (2).
virtual int PlayVideo(const uchar *Data, int Length)
Plays the given data block as video.
virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView)
Sets the device to the given channel (actual physical setup).
virtual void GetOsdSize(int &Width, int &Height, double &PixelAspect)
Returns the Width, Height and PixelAspect ratio the OSD should use to best fit the resolution of the ...
Definition: tools.h:431
eVideoDisplayFormat
Definition: device.h:58
ePlayMode
Definition: device.h:39
eTrackType
Definition: device.h:63
unsigned char uchar
Definition: tools.h:31