2004-03-03 03:20:00 +01:00
|
|
|
/*
|
|
|
|
* Frontend Status Monitor plugin for the Video Disk Recorder
|
|
|
|
*
|
|
|
|
* See the README file for copyright information and how to reach the author.
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*/
|
|
|
|
|
2004-02-26 03:20:00 +01:00
|
|
|
#ifndef __FEMONRECEIVER_H
|
|
|
|
#define __FEMONRECEIVER_H
|
|
|
|
|
2004-03-03 03:20:00 +01:00
|
|
|
#include <vdr/thread.h>
|
2004-02-26 03:20:00 +01:00
|
|
|
#include <vdr/receiver.h>
|
|
|
|
|
2004-06-06 03:20:00 +02:00
|
|
|
enum eVideoFormat {
|
|
|
|
VF_UNKNOWN = 0,
|
|
|
|
VF_PAL = 1,
|
|
|
|
VF_NTSC = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eAspectRatio {
|
|
|
|
AR_RESERVED = 0,
|
|
|
|
AR_1_1 = 100,
|
|
|
|
AR_4_3 = 133,
|
|
|
|
AR_16_9 = 177,
|
|
|
|
AR_2_21_1 = 233,
|
|
|
|
};
|
|
|
|
|
2004-06-11 03:20:00 +02:00
|
|
|
enum eCenterMixLevel {
|
|
|
|
CML_MINUS_3dB = 0,
|
|
|
|
CML_MINUS_4_5dB = 1,
|
|
|
|
CML_MINUS_6dB = 2,
|
|
|
|
CML_RESERVED = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eSurroundMixLevel {
|
|
|
|
SML_MINUS_3dB = 0,
|
|
|
|
SML_MINUS_6dB = 1,
|
|
|
|
SML_0_dB = 2,
|
|
|
|
SML_RESERVED = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum eDolbySurroundMode {
|
|
|
|
DSM_NOT_INDICATED = 0,
|
|
|
|
DSM_NOT_DOLBYSURROUND = 1,
|
|
|
|
DSM_DOLBYSURROUND = 2,
|
|
|
|
DSM_RESERVED = 3,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define FR_RESERVED -1
|
|
|
|
#define FR_FREE -2
|
|
|
|
#define FR_NOTVALID -3
|
2004-06-06 03:20:00 +02:00
|
|
|
|
2004-03-03 03:20:00 +01:00
|
|
|
class cFemonReceiver : public cReceiver, public cThread {
|
2004-02-26 03:20:00 +01:00
|
|
|
private:
|
2004-06-11 03:20:00 +02:00
|
|
|
bool m_Active;
|
|
|
|
int m_VideoPid;
|
|
|
|
int m_AudioPid;
|
|
|
|
int m_AC3Pid;
|
|
|
|
bool m_VideoValid;
|
|
|
|
int m_VideoPacketCount;
|
|
|
|
int m_VideoHorizontalSize;
|
|
|
|
int m_VideoVerticalSize;
|
|
|
|
int m_VideoAspectRatio;
|
|
|
|
int m_VideoFormat;
|
2004-05-31 03:20:00 +02:00
|
|
|
double m_VideoFrameRate;
|
|
|
|
double m_VideoStreamBitrate;
|
2004-03-03 03:20:00 +01:00
|
|
|
double m_VideoBitrate;
|
2004-06-11 03:20:00 +02:00
|
|
|
bool m_AudioValid;
|
|
|
|
int m_AudioPacketCount;
|
2004-05-31 03:20:00 +02:00
|
|
|
double m_AudioStreamBitrate;
|
2004-03-03 03:20:00 +01:00
|
|
|
double m_AudioBitrate;
|
2004-06-11 03:20:00 +02:00
|
|
|
int m_AudioSamplingFreq;
|
|
|
|
int m_AudioMPEGLayer;
|
|
|
|
bool m_AC3Valid;
|
|
|
|
int m_AC3PacketCount;
|
|
|
|
double m_AC3Bitrate;
|
|
|
|
int m_AC3FrameSize;
|
|
|
|
int m_AC3SamplingFreq;
|
|
|
|
int m_AC3StreamBitrate;
|
|
|
|
int m_AC3BitStreamMode;
|
|
|
|
int m_AC3AudioCodingMode;
|
|
|
|
int m_AC3CenterMixLevel;
|
|
|
|
int m_AC3SurroundMixLevel;
|
|
|
|
int m_AC3DolbySurroundMode;
|
|
|
|
bool m_AC3LfeOn;
|
|
|
|
int m_AC3DialogLevel;
|
|
|
|
void GetVideoInfo(uint8_t *mbuf, int count);
|
|
|
|
void GetAudioInfo(uint8_t *mbuf, int count);
|
|
|
|
void GetAC3Info(uint8_t *mbuf, int count);
|
2004-02-26 03:20:00 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void Activate(bool On);
|
|
|
|
virtual void Receive(uchar *Data, int Length);
|
2004-03-03 03:20:00 +01:00
|
|
|
virtual void Action(void);
|
2004-02-26 03:20:00 +01:00
|
|
|
|
|
|
|
public:
|
2004-06-11 03:20:00 +02:00
|
|
|
cFemonReceiver(int Ca, int Vpid, int Apid, int Dpid);
|
2004-02-26 03:20:00 +01:00
|
|
|
virtual ~cFemonReceiver();
|
|
|
|
|
2004-06-11 03:20:00 +02:00
|
|
|
bool VideoValid(void) { return m_VideoValid; }; // boolean
|
2004-05-31 03:20:00 +02:00
|
|
|
int VideoHorizontalSize(void) { return m_VideoHorizontalSize; }; // pixels
|
|
|
|
int VideoVerticalSize(void) { return m_VideoVerticalSize; }; // pixels
|
2004-06-06 03:20:00 +02:00
|
|
|
int VideoAspectRatio(void) { return m_VideoAspectRatio; }; // eAspectRatio
|
|
|
|
int VideoFormat(void) { return m_VideoFormat; }; // eVideoFormat
|
2004-05-31 03:20:00 +02:00
|
|
|
double VideoFrameRate(void) { return m_VideoFrameRate; }; // Hz
|
|
|
|
double VideoStreamBitrate(void) { return m_VideoStreamBitrate; }; // Mbit/s
|
|
|
|
double VideoBitrate(void) { return m_VideoBitrate; }; // Mbit/s
|
|
|
|
|
2004-06-11 03:20:00 +02:00
|
|
|
bool AudioValid(void) { return m_AudioValid; }; // boolean
|
2004-06-06 03:20:00 +02:00
|
|
|
int AudioMPEGLayer(void) { return m_AudioMPEGLayer; }; // layer number
|
2004-05-31 03:20:00 +02:00
|
|
|
int AudioSamplingFreq(void) { return m_AudioSamplingFreq; }; // Hz
|
|
|
|
double AudioStreamBitrate(void) { return m_AudioStreamBitrate; }; // kbit/s
|
|
|
|
double AudioBitrate(void) { return m_AudioBitrate; }; // kbit/s
|
2004-06-11 03:20:00 +02:00
|
|
|
|
|
|
|
bool AC3Valid(void) { return m_AC3Valid; }; // boolean
|
|
|
|
int AC3SamplingFreq(void) { return m_AC3SamplingFreq; }; // Hz
|
|
|
|
double AC3StreamBitrate(void) { return m_AC3StreamBitrate; }; // kbit/s
|
|
|
|
double AC3Bitrate(void) { return m_AC3Bitrate; }; // kbit/s
|
|
|
|
int AC3FrameSize(void) { return m_AC3FrameSize; }; // Bytes
|
|
|
|
int AC3BitStreamMode(void) { return m_AC3BitStreamMode; }; // 0..7
|
|
|
|
int AC3AudioCodingMode(void) { return m_AC3AudioCodingMode; }; // 0..7
|
|
|
|
bool AC3_2_0(void) { return m_AC3AudioCodingMode == 2; }; // DD 2.0
|
|
|
|
bool AC3_5_1(void) { return m_AC3AudioCodingMode == 7; }; // DD 5.1
|
|
|
|
int AC3CenterMixLevel(void) { return m_AC3CenterMixLevel; }; // eCenterMixLevel
|
|
|
|
int AC3SurroundMixLevel(void) { return m_AC3SurroundMixLevel; }; // eSurroundMixLevel
|
|
|
|
int AC3DolbySurroundMode(void) { return m_AC3DolbySurroundMode; }; // eDolbySurroundMode
|
|
|
|
bool AC3LfeOn(void) { return m_AC3LfeOn; }; // boolean
|
|
|
|
int AC3DialogLevel(void) { return m_AC3DialogLevel; }; // -dB
|
2004-02-26 03:20:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__FEMONRECEIVER_H
|
|
|
|
|