#ifndef __DTAPI_H
#define __DTAPI_H
#define DTAPI_VERSION_MAJOR 5
#define DTAPI_VERSION_MINOR 14
#define DTAPI_VERSION_BUGFIX 0
#define DTAPI_VERSION_BUILD 56
#ifdef _WIN32
#ifndef _LIB
#pragma comment(lib, "iphlpapi.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "setupapi.lib")
#pragma comment(lib, "comctl32.lib")
#pragma comment(lib, "wbemuuid.lib")
#endif
#ifndef _DTAPI_DISABLE_AUTO_LINK
#ifdef _DLL
#ifdef _DEBUG
#ifdef _WIN64
#pragma comment(lib, "DTAPI64MDd.lib")
#pragma message("Automatically linking with DTAPI64MDd.lib")
#else
#pragma comment(lib, "DTAPIMDd.lib")
#pragma message("Automatically linking with DTAPIMDd.lib")
#endif
#else
#ifdef _WIN64
#pragma comment(lib, "DTAPI64MD.lib")
#pragma message("Automatically linking with DTAPI64MD.lib")
#else
#pragma comment(lib, "DTAPIMD.lib")
#pragma message("Automatically linking with DTAPIMD.lib")
#endif
#endif
#else
#ifdef _DEBUG
#ifdef _WIN64
#pragma comment(lib, "DTAPI64MTd.lib")
#pragma message("Automatically linking with DTAPI64MTd.lib")
#else
#pragma comment(lib, "DTAPIMTd.lib")
#pragma message("Automatically linking with DTAPIMTd.lib")
#endif
#else
#ifdef _WIN64
#pragma comment(lib, "DTAPI64MT.lib")
#pragma message("Automatically linking with DTAPI64MT.lib")
#else
#pragma comment(lib, "DTAPIMT.lib")
#pragma message("Automatically linking with DTAPIMT.lib")
#endif
#endif
#endif
#endif
#endif
#ifndef _WIN32
#include </usr/include/linux/stddef.h>
#include <stdint.h>
#endif
#include <list>
#include <map>
#include <string>
#include <vector>
#include <limits>
#ifdef _MSC_VER
#pragma warning(disable: 4251)
#endif
#ifdef __GNUC__
#define DTAPI_DEPRECATED(func, msg) func __attribute__ ((deprecated))
#elif defined(_MSC_VER)
#define DTAPI_DEPRECATED(func, msg) __declspec(deprecated(msg)) func
#else
#define DTAPI_DEPRECATED(func, msg) func
#endif
#ifdef _WIN32
typedef unsigned __int64 __uint64;
#else
typedef signed long long __int64;
typedef unsigned long long __uint64;
#endif
namespace Dtapi
{
class AdvDemod;
class DtaPlusDevice;
class DtDemodPars;
class DtDvbT2Pars;
class DteDevice;
class DtSdiUtility;
class FrameBufImpl;
class IDevice;
class IDtDemodEvent;
class InpChannel;
class IXpMutex;
class MplpHelper;
class OutpChannel;
class SdiMatrixImpl;
struct DtDabEnsembleInfo;
struct DtDabEtiStreamSelPars;
struct DtDabStreamSelPars;
struct DtDabTransmitterIdInfo;
struct DtDemodParsAtsc;
struct DtDemodParsDab;
struct DtDemodParsDvbC2;
struct DtDemodParsDvbS;
struct DtDemodParsDvbS2;
struct DtDemodParsDvbT;
struct DtDemodParsDvbT2;
struct DtDemodParsIq;
struct DtDemodParsIq2131;
struct DtDemodParsIsdbt;
struct DtDemodParsQam;
struct DtDemodLdpcStats;
struct DtDemodMaLayerData;
struct DtDemodMaLayerStats;
struct DtDemodPlpBlocks;
struct DtDvbC2DemodL1Part2Data;
struct DtDvbC2DemodL1PlpSigData;
struct DtDvbC2ModStatus;
struct DtDvbC2Pars;
struct DtDvbC2PlpPars;
struct DtDvbC2StreamSelPars;
struct DtDvbC2XFecFrameHeader;
struct DtDvbCidPars;
struct DtDvbS2ModStatus;
struct DtDvbS2ModCod;
struct DtDvbS2Pars;
struct DtDemodParsDvbS2Adv;
struct DtDvbTStreamSelPars;
struct DtDvbTTpsInfo;
struct DtDvbT2DemodL1Data;
struct DtDvbT2ModStatus;
struct DtDvbT2StreamSelPars;
struct DtFractionInt;
struct DtIsdbtStreamSelPars;
struct DtIsdbTmmPars;
struct DtPar;
struct DtPlpInpPars;
struct DtStatistic;
struct DtT2MiStreamSelPars;
struct DtVirtualOutData;
struct DtRsDecStats;
struct DtVitDecStats;
typedef unsigned int DTAPI_RESULT;
class DtExc
{
public:
const DTAPI_RESULT m_Error;
public:
DtExc(DTAPI_RESULT e) : m_Error(e) {}
virtual ~DtExc() {}
};
struct DtBufferInfo
{
int m_VidStd;
int m_NumColumns;
__int64 m_NumReceived;
__int64 m_NumDropped;
__int64 m_NumTransmitted;
__int64 m_NumDuplicated;
};
class DtCaps
{
static const int DTCAPS_SIZE = 3;
public:
DtCaps();
DtCaps(int BitNr);
DtCaps(__int64 F1, __int64 F2, __int64 F3);
public:
int GetCapIndex() const;
std::string ToString() const;
DtCaps operator & (const DtCaps& Caps) const;
DtCaps& operator &= (const DtCaps& Caps);
DtCaps operator | (const DtCaps& Caps) const;
DtCaps& operator |= (const DtCaps& Caps);
bool operator == (const DtCaps& Caps) const;
bool operator == (const int Zero) const;
bool operator != (const DtCaps& Caps) const;
bool operator != (const int Zero) const;
__int64 operator [] (const int n) const;
DtCaps operator ~ () const;
private:
__int64 m_Flags[DTCAPS_SIZE];
};
#define DTAPI_CAP_EMPTY Dtapi::DtCaps()
#define DTAPI_CAP_C2X Dtapi::DtCaps(0)
#define DTAPI_CAP_DP Dtapi::DtCaps(1)
#define DTAPI_CAP_DTTV Dtapi::DtCaps(2)
#define DTAPI_CAP_E Dtapi::DtCaps(3)
#define DTAPI_CAP_J Dtapi::DtCaps(4)
#define DTAPI_CAP_MR Dtapi::DtCaps(5)
#define DTAPI_CAP_MS Dtapi::DtCaps(6)
#define DTAPI_CAP_MX Dtapi::DtCaps(7)
#define DTAPI_CAP_RC Dtapi::DtCaps(8)
#define DTAPI_CAP_RX Dtapi::DtCaps(9)
#define DTAPI_CAP_SP Dtapi::DtCaps(10)
#define DTAPI_CAP_SPNIC Dtapi::DtCaps(11)
#define DTAPI_CAP_SX Dtapi::DtCaps(12)
#define DTAPI_CAP_SXDGL Dtapi::DtCaps(13)
#define DTAPI_CAP_SY Dtapi::DtCaps(14)
#define DTAPI_CAP_XP Dtapi::DtCaps(15)
#define DTAPI_CAP_T2X Dtapi::DtCaps(16)
#define DTAPI_CAP_BW Dtapi::DtCaps(17)
#define DTAPI_CAP_FAILSAFE Dtapi::DtCaps(18)
#define DTAPI_CAP_FRACMODE Dtapi::DtCaps(19)
#define DTAPI_CAP_GENLOCKED Dtapi::DtCaps(20)
#define DTAPI_CAP_GENREF Dtapi::DtCaps(21)
#define DTAPI_CAP_SWS2APSK Dtapi::DtCaps(22)
#define DTAPI_CAP_ANTPWR Dtapi::DtCaps(23)
#define DTAPI_CAP_LNB Dtapi::DtCaps(24)
#define DTAPI_CAP_RX_ADV Dtapi::DtCaps(25)
#define DTAPI_CAP_LBAND Dtapi::DtCaps(26)
#define DTAPI_CAP_VHF Dtapi::DtCaps(27)
#define DTAPI_CAP_UHF Dtapi::DtCaps(28)
#define DTAPI_CAP_DISABLED Dtapi::DtCaps(29)
#define DTAPI_CAP_INPUT Dtapi::DtCaps(30)
#define DTAPI_CAP_OUTPUT Dtapi::DtCaps(31)
#define DTAPI_CAP_SHAREDANT Dtapi::DtCaps(32)
#define DTAPI_CAP_DBLBUF Dtapi::DtCaps(33)
#define DTAPI_CAP_LOOPS2L3 Dtapi::DtCaps(34)
#define DTAPI_CAP_LOOPS2TS Dtapi::DtCaps(35)
#define DTAPI_CAP_LOOPTHR Dtapi::DtCaps(36)
#define DTAPI_CAP_ASIPOL Dtapi::DtCaps(37)
#define DTAPI_CAP_HUFFMAN Dtapi::DtCaps(38)
#define DTAPI_CAP_IPPAIR Dtapi::DtCaps(39)
#define DTAPI_CAP_L3MODE Dtapi::DtCaps(40)
#define DTAPI_CAP_MATRIX Dtapi::DtCaps(41)
#define DTAPI_CAP_MATRIX2 Dtapi::DtCaps(42)
#define DTAPI_CAP_RAWASI Dtapi::DtCaps(43)
#define DTAPI_CAP_SDI10BNBO Dtapi::DtCaps(44)
#define DTAPI_CAP_SDITIME Dtapi::DtCaps(45)
#define DTAPI_CAP_TIMESTAMP64 Dtapi::DtCaps(46)
#define DTAPI_CAP_TRPMODE Dtapi::DtCaps(47)
#define DTAPI_CAP_TS Dtapi::DtCaps(48)
#define DTAPI_CAP_TXONTIME Dtapi::DtCaps(49)
#define DTAPI_CAP_VIRTUAL Dtapi::DtCaps(50)
#define DTAPI_CAP_3GSDI Dtapi::DtCaps(51)
#define DTAPI_CAP_ASI Dtapi::DtCaps(52)
#define DTAPI_CAP_DEMOD Dtapi::DtCaps(53)
#define DTAPI_CAP_GPSTIME Dtapi::DtCaps(54)
#define DTAPI_CAP_HDSDI Dtapi::DtCaps(55)
#define DTAPI_CAP_IFADC Dtapi::DtCaps(56)
#define DTAPI_CAP_IP Dtapi::DtCaps(57)
#define DTAPI_CAP_MOD Dtapi::DtCaps(58)
#define DTAPI_CAP_PHASENOISE Dtapi::DtCaps(59)
#define DTAPI_CAP_RS422 Dtapi::DtCaps(60)
#define DTAPI_CAP_SDI Dtapi::DtCaps(61)
#define DTAPI_CAP_SPI Dtapi::DtCaps(62)
#define DTAPI_CAP_SPISDI Dtapi::DtCaps(63)
#define DTAPI_CAP_1080P50 Dtapi::DtCaps(64)
#define DTAPI_CAP_1080P50B Dtapi::DtCaps(65)
#define DTAPI_CAP_1080P59_94 Dtapi::DtCaps(66)
#define DTAPI_CAP_1080P59_94B Dtapi::DtCaps(67)
#define DTAPI_CAP_1080P60 Dtapi::DtCaps(68)
#define DTAPI_CAP_1080P60B Dtapi::DtCaps(69)
#define DTAPI_CAP_1080I50 Dtapi::DtCaps(70)
#define DTAPI_CAP_1080I59_94 Dtapi::DtCaps(71)
#define DTAPI_CAP_1080I60 Dtapi::DtCaps(72)
#define DTAPI_CAP_1080P23_98 Dtapi::DtCaps(73)
#define DTAPI_CAP_1080P24 Dtapi::DtCaps(74)
#define DTAPI_CAP_1080P25 Dtapi::DtCaps(75)
#define DTAPI_CAP_1080P29_97 Dtapi::DtCaps(76)
#define DTAPI_CAP_1080P30 Dtapi::DtCaps(77)
#define DTAPI_CAP_1080PSF23_98 Dtapi::DtCaps(78)
#define DTAPI_CAP_1080PSF24 Dtapi::DtCaps(79)
#define DTAPI_CAP_1080PSF25 Dtapi::DtCaps(80)
#define DTAPI_CAP_1080PSF29_97 Dtapi::DtCaps(81)
#define DTAPI_CAP_1080PSF30 Dtapi::DtCaps(82)
#define DTAPI_CAP_720P23_98 Dtapi::DtCaps(83)
#define DTAPI_CAP_720P24 Dtapi::DtCaps(84)
#define DTAPI_CAP_720P25 Dtapi::DtCaps(85)
#define DTAPI_CAP_720P29_97 Dtapi::DtCaps(86)
#define DTAPI_CAP_720P30 Dtapi::DtCaps(87)
#define DTAPI_CAP_720P50 Dtapi::DtCaps(88)
#define DTAPI_CAP_720P59_94 Dtapi::DtCaps(89)
#define DTAPI_CAP_720P60 Dtapi::DtCaps(90)
#define DTAPI_CAP_525I59_94 Dtapi::DtCaps(91)
#define DTAPI_CAP_625I50 Dtapi::DtCaps(92)
#define DTAPI_CAP_SPI525I59_94 Dtapi::DtCaps(93)
#define DTAPI_CAP_SPI625I50 Dtapi::DtCaps(94)
#define DTAPI_CAP_TX_ATSC Dtapi::DtCaps(95)
#define DTAPI_CAP_TX_CMMB Dtapi::DtCaps(96)
#define DTAPI_CAP_TX_DAB Dtapi::DtCaps(97)
#define DTAPI_CAP_TX_DTMB Dtapi::DtCaps(98)
#define DTAPI_CAP_TX_DVBC2 Dtapi::DtCaps(99)
#define DTAPI_CAP_TX_DVBS Dtapi::DtCaps(100)
#define DTAPI_CAP_TX_DVBS2 Dtapi::DtCaps(101)
#define DTAPI_CAP_TX_DVBS2X Dtapi::DtCaps(102)
#define DTAPI_CAP_TX_DVBT Dtapi::DtCaps(103)
#define DTAPI_CAP_TX_DVBT2 Dtapi::DtCaps(104)
#define DTAPI_CAP_TX_GOLD Dtapi::DtCaps(105)
#define DTAPI_CAP_TX_IQ Dtapi::DtCaps(106)
#define DTAPI_CAP_TX_ISDBS Dtapi::DtCaps(107)
#define DTAPI_CAP_TX_ISDBT Dtapi::DtCaps(108)
#define DTAPI_CAP_TX_ISDBTMM Dtapi::DtCaps(109)
#define DTAPI_CAP_TX_MH Dtapi::DtCaps(110)
#define DTAPI_CAP_TX_QAMA Dtapi::DtCaps(111)
#define DTAPI_CAP_TX_QAMB Dtapi::DtCaps(112)
#define DTAPI_CAP_TX_QAMC Dtapi::DtCaps(113)
#define DTAPI_CAP_TX_SWMC Dtapi::DtCaps(114)
#define DTAPI_CAP_TX_T2MI Dtapi::DtCaps(115)
#define DTAPI_CAP_TX_T2SPLP Dtapi::DtCaps(116)
#define DTAPI_CAP_ADJLVL Dtapi::DtCaps(117)
#define DTAPI_CAP_CM Dtapi::DtCaps(118)
#define DTAPI_CAP_CW Dtapi::DtCaps(119)
#define DTAPI_CAP_DIGIQ Dtapi::DtCaps(120)
#define DTAPI_CAP_DVBCID Dtapi::DtCaps(121)
#define DTAPI_CAP_IF Dtapi::DtCaps(122)
#define DTAPI_CAP_MUTE Dtapi::DtCaps(123)
#define DTAPI_CAP_ROLLOFF Dtapi::DtCaps(124)
#define DTAPI_CAP_S2APSK Dtapi::DtCaps(125)
#define DTAPI_CAP_SNR Dtapi::DtCaps(126)
#define DTAPI_CAP_TX_16MHZ Dtapi::DtCaps(127)
#define DTAPI_CAP_TX_SFN Dtapi::DtCaps(128)
#define DTAPI_CAP_RFCLKEXT Dtapi::DtCaps(129)
#define DTAPI_CAP_RFCLKINT Dtapi::DtCaps(130)
#define DTAPI_CAP_RX_ATSC Dtapi::DtCaps(131)
#define DTAPI_CAP_RX_CMMB Dtapi::DtCaps(132)
#define DTAPI_CAP_RX_DAB Dtapi::DtCaps(133)
#define DTAPI_CAP_RX_DTMB Dtapi::DtCaps(134)
#define DTAPI_CAP_RX_DVBC2 Dtapi::DtCaps(135)
#define DTAPI_CAP_RX_DVBS Dtapi::DtCaps(136)
#define DTAPI_CAP_RX_DVBS2 Dtapi::DtCaps(137)
#define DTAPI_CAP_RX_DVBT Dtapi::DtCaps(138)
#define DTAPI_CAP_RX_DVBT2 Dtapi::DtCaps(139)
#define DTAPI_CAP_RX_GOLD Dtapi::DtCaps(140)
#define DTAPI_CAP_RX_IQ Dtapi::DtCaps(141)
#define DTAPI_CAP_RX_ISDBS Dtapi::DtCaps(142)
#define DTAPI_CAP_RX_ISDBT Dtapi::DtCaps(143)
#define DTAPI_CAP_RX_MH Dtapi::DtCaps(144)
#define DTAPI_CAP_RX_QAMA Dtapi::DtCaps(145)
#define DTAPI_CAP_RX_QAMB Dtapi::DtCaps(146)
#define DTAPI_CAP_RX_QAMC Dtapi::DtCaps(147)
#define DTAPI_CAP_RX_T2MI Dtapi::DtCaps(148)
#define DTAPI_CAP_SPICLKEXT Dtapi::DtCaps(149)
#define DTAPI_CAP_SPICLKINT Dtapi::DtCaps(150)
#define DTAPI_CAP_SPIFIXEDCLK Dtapi::DtCaps(151)
#define DTAPI_CAP_SPIDVBMODE Dtapi::DtCaps(152)
#define DTAPI_CAP_SPISER8B Dtapi::DtCaps(153)
#define DTAPI_CAP_SPISER10B Dtapi::DtCaps(154)
#define DTAPI_CAP_SPILVDS1 Dtapi::DtCaps(155)
#define DTAPI_CAP_SPILVDS2 Dtapi::DtCaps(156)
#define DTAPI_CAP_SPILVTTL Dtapi::DtCaps(157)
#define DTAPI_CAP_EXTTSRATE Dtapi::DtCaps(158)
#define DTAPI_CAP_EXTRATIO Dtapi::DtCaps(159)
#define DTAPI_CAP_INTTSRATE Dtapi::DtCaps(160)
#define DTAPI_CAP_LOCK2INP Dtapi::DtCaps(161)
struct DtCmmbPars
{
int m_Bandwidth;
int m_TsRate;
int m_TsPid;
int m_AreaId;
int m_TxId;
public:
DtCmmbPars();
DTAPI_RESULT RetrieveTsRateFromTs(char* pBuffer, int NumBytes);
bool operator == (DtCmmbPars& Rhs);
bool operator != (DtCmmbPars& Rhs);
};
#define DTAPI_CMMB_BW_2MHZ 0x00000000
#define DTAPI_CMMB_BW_8MHZ 0x00000001
#define DTAPI_CM_MAX_PATHS 32
struct DtCmPath
{
enum Type
{
CONSTANT_DELAY,
CONSTANT_DOPPLER,
RAYLEIGH_JAKES,
RAYLEIGH_GAUSSIAN
};
Type m_Type;
double m_Attenuation;
double m_Delay;
double m_Phase;
double m_Doppler;
DtCmPath() :
m_Type(CONSTANT_DELAY),
m_Attenuation(0.0), m_Delay(0.0), m_Phase(0.0), m_Doppler(0.0)
{}
bool operator == (DtCmPath& Rhs);
};
struct DtCmPars
{
bool m_EnableAwgn;
double m_Snr;
bool m_EnablePaths;
std::vector<DtCmPath> m_Paths;
DtCmPars();
bool operator == (DtCmPars&);
bool operator != (DtCmPars& Rhs) { return !(*this == Rhs); }
};
struct DtConstelPoint
{
int m_X, m_Y;
};
class IDtDemodEvent
{
public:
virtual void TuningFreqHasChanged(__int64 OldFreqHz, __int64 NewFreqHz) {}
virtual void TuningParsHaveChanged(
__int64 OldFreqHz, int OldModType, int OldParXtra[3],
__int64 NewFreqHz, int NewModType, int NewParXtra[3]) {}
};
#define MAX_IPV6_ADDR 3
struct DtDeviceDesc
{
int m_Category;
__int64 m_Serial;
int m_PciBusNumber;
int m_SlotNumber;
int m_UsbAddress;
int m_TypeNumber;
int m_SubType;
int m_DeviceId;
int m_VendorId;
int m_SubsystemId;
int m_SubVendorId;
int m_NumHwFuncs;
int m_HardwareRevision;
int m_FirmwareVersion;
int m_FirmwareVariant;
int m_NumDtInpChan;
int m_NumDtOutpChan;
int m_NumPorts;
unsigned char m_Ip[4];
unsigned char m_IpV6[MAX_IPV6_ADDR][16];
unsigned char m_MacAddr[6];
int m_PcieNumLanes;
int m_PcieMaxLanes;
int m_PcieLinkSpeed;
int m_PcieMaxSpeed;
};
#define DTAPI_CAT_PCI 0
#define DTAPI_CAT_USB 1
#define DTAPI_CAT_NW 2
#define DTAPI_CAT_IP 3
#define DTAPI_CAT_NIC 4
#define DTAPI_CAT_NWAP 5
struct DtDtaPlusDeviceDesc
{
__int64 m_Serial;
std::string m_DevicePath;
};
struct DtDvbCidPars
{
bool m_Enable;
unsigned int m_GuidHigh;
unsigned int m_GuidLow;
std::map<int, int> m_Content;
DTAPI_RESULT CheckValidity();
};
struct DtEventArgs
{
DtEventArgs() : m_Value1(0), m_Value2(0), m_pContext(0) {};
int m_HwCat;
__int64 m_Serial;
int m_Value1;
int m_Value2;
void* m_pContext;
};
typedef void (*pDtEventCallback)(int Event, const DtEventArgs* pArgs);
#define DT_EVENT_TYPE_ADD 0x00000001
#define DT_EVENT_TYPE_REMOVE 0x00000002
#define DT_EVENT_TYPE_POWER 0x00000004
#define DT_EVENT_TYPE_GENLOCK 0x00000008
#define DT_EVENT_TYPE_TEST 0x80000000
#define DT_EVENT_IP_CHANGED 0x01000000
#define DT_EVENT_ADMINST_CHANGED 0x02000000
#define DT_EVENT_TYPE_ALL 0xFFFFFFFF
#define DT_EVENT_VALUE1_POWER_UP 1
#define DT_EVENT_VALUE1_POWER_DOWN 2
#define DT_EVENT_VALUE1_NO_LOCK 1
#define DT_EVENT_VALUE1_LOCKED 2
#define DT_EVENT_VALUE2_XXX 1
struct DtFiltCoeff
{
int m_TapIdx;
double m_Coeff;
};
struct DtFilterPars
{
std::vector<DtFiltCoeff> m_FiltCoeffs;
};
#define DTAPI_MAX_NUM_COEFFS 64
#define DTAPI_FRAME_STATUS_OK 0
#define DTAPI_FRAME_STATUS_ERR_NO_SIGNAL 1
#define DTAPI_FRAME_STATUS_ERR_STD_MISMATCH 2
struct DtFractionInt
{
int m_Num, m_Den;
DtFractionInt() { m_Num = 0; m_Den = 1; }
DtFractionInt(int Num, int Den) { m_Num = Num; m_Den = Den; }
};
struct DtFrameInfo
{
int m_VidStd;
__int64 m_Timestamp;
__int64 m_FrameNumber;
__int64 m_Rp188;
int m_RxMode;
int m_Status;
};
struct DtHwFuncDesc
{
DtDeviceDesc m_DvcDesc;
int m_ChanType;
DtCaps m_Flags;
int m_IndexOnDvc;
int m_Port;
unsigned char m_Ip[4];
unsigned char m_IpV6[MAX_IPV6_ADDR][16];
unsigned char m_MacAddr[6];
};
#define DTAPI_CHAN_DISABLED 0
#define DTAPI_CHAN_INPUT 1
#define DTAPI_CHAN_OUTPUT 2
#define DTAPI_CHAN_DBLBUF 4
#define DTAPI_CHAN_LOOPTHR 8
struct DtIoConfig
{
int m_Port;
int m_Group;
int m_Value;
int m_SubValue;
__int64 m_ParXtra[2];
DtIoConfig()
{
m_Port = -1;
m_Group = -1;
m_Value = m_SubValue = -1;
m_ParXtra[0] = m_ParXtra[1] = -1;
}
DtIoConfig(int Port, int Group)
{
m_Port = Port;
m_Group = Group;
m_Value = m_SubValue = -1;
m_ParXtra[0] = m_ParXtra[1] = -1;
}
};
#define DTAPI_IOCONFIG_IODIR 0
#define DTAPI_IOCONFIG_IOSTD 1
#define DTAPI_IOCONFIG_RFCLKSEL 2
#define DTAPI_IOCONFIG_SPICLKSEL 3
#define DTAPI_IOCONFIG_SPIMODE 4
#define DTAPI_IOCONFIG_SPISTD 5
#define DTAPI_IOCONFIG_TSRATESEL 6
#define DTAPI_IOCONFIG_BW 7
#define DTAPI_IOCONFIG_FAILSAFE 8
#define DTAPI_IOCONFIG_FRACMODE 9
#define DTAPI_IOCONFIG_GENLOCKED 10
#define DTAPI_IOCONFIG_GENREF 11
#define DTAPI_IOCONFIG_SWS2APSK 12
#define DTAPI_IOCONFIG_TRUE 13
#define DTAPI_IOCONFIG_FALSE 14
#define DTAPI_IOCONFIG_DISABLED 15
#define DTAPI_IOCONFIG_INPUT 16
#define DTAPI_IOCONFIG_OUTPUT 17
#define DTAPI_IOCONFIG_SHAREDANT 18
#define DTAPI_IOCONFIG_DBLBUF 19
#define DTAPI_IOCONFIG_LOOPS2L3 20
#define DTAPI_IOCONFIG_LOOPS2TS 21
#define DTAPI_IOCONFIG_LOOPTHR 22
#define DTAPI_IOCONFIG_3GSDI 23
#define DTAPI_IOCONFIG_ASI 24
#define DTAPI_IOCONFIG_DEMOD 25
#define DTAPI_IOCONFIG_GPSTIME 26
#define DTAPI_IOCONFIG_HDSDI 27
#define DTAPI_IOCONFIG_IFADC 28
#define DTAPI_IOCONFIG_IP 29
#define DTAPI_IOCONFIG_MOD 30
#define DTAPI_IOCONFIG_PHASENOISE 31
#define DTAPI_IOCONFIG_RS422 32
#define DTAPI_IOCONFIG_SDI 33
#define DTAPI_IOCONFIG_SPI 34
#define DTAPI_IOCONFIG_SPISDI 35
#define DTAPI_IOCONFIG_1080P50 36
#define DTAPI_IOCONFIG_1080P50B 37
#define DTAPI_IOCONFIG_1080P59_94 38
#define DTAPI_IOCONFIG_1080P59_94B 39
#define DTAPI_IOCONFIG_1080P60 40
#define DTAPI_IOCONFIG_1080P60B 41
#define DTAPI_IOCONFIG_1080I50 42
#define DTAPI_IOCONFIG_1080I59_94 43
#define DTAPI_IOCONFIG_1080I60 44
#define DTAPI_IOCONFIG_1080P23_98 45
#define DTAPI_IOCONFIG_1080P24 46
#define DTAPI_IOCONFIG_1080P25 47
#define DTAPI_IOCONFIG_1080P29_97 48
#define DTAPI_IOCONFIG_1080P30 49
#define DTAPI_IOCONFIG_1080PSF23_98 50
#define DTAPI_IOCONFIG_1080PSF24 51
#define DTAPI_IOCONFIG_1080PSF25 52
#define DTAPI_IOCONFIG_1080PSF29_97 53
#define DTAPI_IOCONFIG_1080PSF30 54
#define DTAPI_IOCONFIG_720P23_98 55
#define DTAPI_IOCONFIG_720P24 56
#define DTAPI_IOCONFIG_720P25 57
#define DTAPI_IOCONFIG_720P29_97 58
#define DTAPI_IOCONFIG_720P30 59
#define DTAPI_IOCONFIG_720P50 60
#define DTAPI_IOCONFIG_720P59_94 61
#define DTAPI_IOCONFIG_720P60 62
#define DTAPI_IOCONFIG_525I59_94 63
#define DTAPI_IOCONFIG_625I50 64
#define DTAPI_IOCONFIG_SPI525I59_94 65
#define DTAPI_IOCONFIG_SPI625I50 66
#define DTAPI_IOCONFIG_RFCLKEXT 67
#define DTAPI_IOCONFIG_RFCLKINT 68
#define DTAPI_IOCONFIG_SPICLKEXT 69
#define DTAPI_IOCONFIG_SPICLKINT 70
#define DTAPI_IOCONFIG_SPIFIXEDCLK 71
#define DTAPI_IOCONFIG_SPIDVBMODE 72
#define DTAPI_IOCONFIG_SPISER8B 73
#define DTAPI_IOCONFIG_SPISER10B 74
#define DTAPI_IOCONFIG_SPILVDS1 75
#define DTAPI_IOCONFIG_SPILVDS2 76
#define DTAPI_IOCONFIG_SPILVTTL 77
#define DTAPI_IOCONFIG_EXTTSRATE 78
#define DTAPI_IOCONFIG_EXTRATIO 79
#define DTAPI_IOCONFIG_INTTSRATE 80
#define DTAPI_IOCONFIG_LOCK2INP 81
struct DtIqData
{
int m_I, m_Q;
};
struct DtIqDirectPars
{
DtFractionInt m_SampleRate;
int m_IqPacking;
int m_ChanFilter;
int m_Interpolation;
public:
DTAPI_RESULT CheckValidity(void);
};
struct DtIsdbsLayerPars
{
int m_NumSlots;
int m_ModCod;
};
#define DTAPI_ISDBS_SLOTS_PER_FRAME 48
struct DtIsdbsPars
{
DtIsdbsPars() : m_DoMux(false), m_B15Mode(false) {}
bool m_DoMux;
bool m_B15Mode;
int m_Emergency;
int m_RelTs2TsId[8];
int m_Slot2RelTs[DTAPI_ISDBS_SLOTS_PER_FRAME];
DtIsdbsLayerPars m_LayerPars[4];
DTAPI_RESULT CheckValidity(void);
void Init(void);
bool operator == (DtIsdbsPars& Rhs);
bool operator != (DtIsdbsPars& Rhs);
};
#define DTAPI_ISDBS_MODCOD_BPSK_1_2 1
#define DTAPI_ISDBS_MODCOD_QPSK_1_2 2
#define DTAPI_ISDBS_MODCOD_QPSK_2_3 3
#define DTAPI_ISDBS_MODCOD_QPSK_3_4 4
#define DTAPI_ISDBS_MODCOD_QPSK_5_6 5
#define DTAPI_ISDBS_MODCOD_QPSK_7_8 6
#define DTAPI_ISDBS_MODCOD_8PSK_2_3 7
#define DTAPI_ISDBS_MODCOD_NOT_ALLOC 15
struct DtIsdbtLayerData
{
int m_NumSegments;
int m_Modulation;
int m_CodeRate;
int m_TimeInterleave;
DtIsdbtLayerData();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtIsdbtLayerPars
{
int m_NumSegments;
int m_Modulation;
int m_CodeRate;
int m_TimeInterleave;
int m_BitRate;
};
struct DtIsdbtParamsData
{
int m_BType;
int m_Mode;
int m_Guard;
int m_PartialRx;
DtIsdbtLayerData m_LayerPars[3];
DtIsdbtParamsData();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtIsdbtPars
{
bool m_DoMux;
bool m_FilledOut;
int m_ParXtra0;
int m_BType;
int m_Mode;
int m_Guard;
int m_PartialRx;
int m_Emergency;
int m_IipPid;
int m_LayerOther;
int m_Virtual13Segm;
DtIsdbtLayerPars m_LayerPars[3];
std::map<int, int> m_Pid2Layer;
bool m_Valid;
int m_TotalBitrate;
DtIsdbtPars();
static bool BTypeCompat(int BType, int NumSegm);
DTAPI_RESULT CheckValidity(int& ResultCode);
DTAPI_RESULT ComputeRates(void);
void MakeConsistent();
void MakeNumSegmConsistent();
int NumSegm();
DTAPI_RESULT RetrieveParsFromTs(char* pBuffer, int NumBytes);
bool operator == (DtIsdbtPars& Rhs);
bool operator != (DtIsdbtPars& Rhs);
};
#define DTAPI_ISDBT_LAYER_NONE -1
#define DTAPI_ISDBT_LAYER_AUTO -2
#define DTAPI_ISDBT_LAYER_A 1
#define DTAPI_ISDBT_LAYER_B 2
#define DTAPI_ISDBT_LAYER_C 4
#define DTAPI_ISDBT_BTYPE_TV 0
#define DTAPI_ISDBT_BTYPE_RAD1 1
#define DTAPI_ISDBT_BTYPE_RAD3 2
#define DTAPI_ISDBT_GUARD_1_32 0
#define DTAPI_ISDBT_GUARD_1_16 1
#define DTAPI_ISDBT_GUARD_1_8 2
#define DTAPI_ISDBT_GUARD_1_4 3
#define DTAPI_ISDBT_MOD_DQPSK 0
#define DTAPI_ISDBT_MOD_QPSK 1
#define DTAPI_ISDBT_MOD_QAM16 2
#define DTAPI_ISDBT_MOD_QAM64 3
#define DTAPI_ISDBT_RATE_1_2 0
#define DTAPI_ISDBT_RATE_2_3 1
#define DTAPI_ISDBT_RATE_3_4 2
#define DTAPI_ISDBT_RATE_5_6 3
#define DTAPI_ISDBT_RATE_7_8 4
#define DTAPI_ISDBT_SEGM_1 0x00000001
#define DTAPI_ISDBT_SEGM_3 0x00000003
#define DTAPI_ISDBT_SEGM_13 0x0000000D
#define DTAPI_ISDBT_SEGM_MSK 0x0000000F
#define DTAPI_ISDBT_BW_5MHZ 0x00000010
#define DTAPI_ISDBT_BW_6MHZ 0x00000020
#define DTAPI_ISDBT_BW_7MHZ 0x00000030
#define DTAPI_ISDBT_BW_8MHZ 0x00000040
#define DTAPI_ISDBT_BW_MSK 0x000000F0
#define DTAPI_ISDBT_SRATE_1_1 0x00000100
#define DTAPI_ISDBT_SRATE_1_2 0x00000200
#define DTAPI_ISDBT_SRATE_1_4 0x00000300
#define DTAPI_ISDBT_SRATE_1_8 0x00000400
#define DTAPI_ISDBT_SRATE_27_32 0x00000500
#define DTAPI_ISDBT_SRATE_135_64 0x00000600
#define DTAPI_ISDBT_SRATE_MSK 0x00000F00
#define DTAPI_ISDBT_SUBCH_MSK 0x0003F000
#define DTAPI_ISDBT_SUBCH_SHIFT 12
#define DTAPI_ISDBT_OK 0
#define DTAPI_ISDBT_E_BTYPE 1
#define DTAPI_ISDBT_E_NSEGM 2
#define DTAPI_ISDBT_E_PARTIAL 3
#define DTAPI_ISDBT_E_NOT_FILLED 4
#define DTAPI_ISDBT_E_SUBCHANNEL 5
#define DTAPI_ISDBT_E_SRATE 6
#define DTAPI_ISDBT_E_BANDWIDTH 7
#define DTAPI_ISDBT_E_MODE 8
#define DTAPI_ISDBT_E_GUARD 9
struct DtMatrixInfo
{
int m_VidStd;
int m_Scaling;
int m_NumColumns;
};
#define DTAPI_MAX_OUTPUTS 16
struct DtModPars
{
int m_ModType;
int m_ParXtra0;
int m_ParXtra1;
int m_ParXtra2;
void* m_pXtraPars;
int m_SfnMode;
int m_SfnTimeOffset;
int m_SfnAllowedTimeDiff;
int m_SymRate;
DtFractionInt m_TsRate;
bool m_IsCmEnable[DTAPI_MAX_OUTPUTS];
DtCmPars m_CmPars[DTAPI_MAX_OUTPUTS];
bool m_IsRoEnable;
DtFilterPars m_RollOffFilter;
int m_OutputLevel;
double m_RfFreqHz;
unsigned char m_S2PlHdrScrSeq[12];
DtDvbCidPars m_DvbCidPars;
int m_TxMode;
int m_StuffMode;
DTAPI_RESULT CheckPars();
DTAPI_RESULT SetModControl(int ModType, int, int, int, void* pXtraPars);
DtCmmbPars* pCmmbPars() { return (DtCmmbPars*)m_pXtraPars; }
DtDvbC2Pars* pDvbC2Pars() { return (DtDvbC2Pars*)m_pXtraPars; }
DtDvbS2Pars* pDvbS2Pars() { return (DtDvbS2Pars*)m_pXtraPars; }
DtDvbT2Pars* pDvbT2Pars() { return (DtDvbT2Pars*)m_pXtraPars; }
DtIqDirectPars* pIqDirectPars() { return (DtIqDirectPars*)m_pXtraPars; }
DtIsdbsPars* pIsdbsPars() { return (DtIsdbsPars*)m_pXtraPars; }
DtIsdbtPars* pIsdbtPars() { return (DtIsdbtPars*)m_pXtraPars; }
DtIsdbTmmPars* pIsdbTmmPars() { return (DtIsdbTmmPars*)m_pXtraPars; }
bool HasSymRate();
bool IsAdtbT(), IsAdtbtDtmb(), IsAtsc(), IsAtscMh(), IsCmmb(), IsCmEnable(int i=0);
bool IsDab();
bool IsDtmb(), IsDvbC2(), IsDvbCidEnable(), IsDvbS(), IsDvbS2(), IsDvbS2Apsk(),
IsDvbS2L3(), IsDvbS2X(), IsDvbS2XL3(), IsDvbS2Mux();
bool IsDvbT(), IsDvbT2(), IsIqDirect(), IsIsdbS(), IsIsdbT(), IsIsdbTmm();
bool IsModTypeSet(), IsOfdm(), IsQam(), IsQamA(), IsQamB(), IsQamC(), IsQamAC();
bool IsRoEnable(), IsSfnEnable(), IsT2Mi();
bool RequiresMplpMod();
DtModPars();
~DtModPars();
private:
DtModPars(const DtModPars&);
private:
void CleanUpXtraPars();
};
struct DtPar
{
DtPar();
DtPar(int ParId);
virtual ~DtPar();
enum ParValueType
{
PAR_VT_UNDEFINED, PAR_VT_BOOL, PAR_VT_DOUBLE, PAR_VT_INT
};
DTAPI_RESULT m_Result;
int m_ParId;
int m_IdXtra[4];
ParValueType m_ValueType;
union {
bool m_ValueBool;
double m_ValueDouble;
int m_ValueInt;
void* m_pValue;
};
void Cleanup();
DTAPI_RESULT GetName(const char*& pName, const char*& pShortName);
DTAPI_RESULT GetName(const wchar_t*& pName, const wchar_t*& pShortName);
DTAPI_RESULT GetValue(int &Value);
DTAPI_RESULT GetValue(double &Value);
DTAPI_RESULT GetValue(bool &Value);
DTAPI_RESULT SetId(int ParameterId);
DTAPI_RESULT SetValue(int Value);
DTAPI_RESULT SetValue(double Value);
DTAPI_RESULT SetValue(bool Value);
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
static DTAPI_RESULT FromXml(const std::wstring&, DtPar*& pPars, int& Count);
static DTAPI_RESULT ToXml(DtPar* pPars, int Count, std::wstring& XmlString);
DtPar& operator=(const DtPar&);
private:
DtPar(const DtPar&);
};
#define DTAPI_PAR_DEMOD_THREADS 0x001
#define DTAPI_PAR_DEMOD_LDPC_MAX 0x002
#define DTAPI_PAR_DEMOD_LDPC_AVG 0x003
#define DTAPI_PAR_DEMOD_MER_ENA 0x004
#define DTAPI_PAR_UNDEFINED 0x000
#define DTAPI_PAR_UNSUP_INTITEM 0x80000000
#define DTAPI_PAR_UNSUP_UINTITEM 0xFFFFFFFF
struct DtPhaseNoisePars
{
DtFractionInt m_SampleRate;
};
struct DtRawIpHeader
{
unsigned short m_Tag;
unsigned short m_Length;
unsigned int m_TimeStamp;
};
struct DtStatistic
{
DtStatistic();
DtStatistic(int StatisticId);
virtual ~DtStatistic();
enum StatValueType
{
STAT_VT_UNDEFINED, STAT_VT_BOOL, STAT_VT_DOUBLE, STAT_VT_INT,
STAT_VT_DVBC2_L1P2, STAT_VT_DVBC2_PLPSIG, STAT_VT_DVBT2_L1,
STAT_VT_ISDBT_PARS, STAT_VT_LDPC_STATS, STAT_VT_MA_DATA,
STAT_VT_MA_STATS, STAT_VT_PLP_BLOCKS, STAT_VT_VIT_STATS,
STAT_VT_DAB_ENSEM, STAT_VT_RS_STATS, STAT_VT_DVBT_TPS, STAT_VT_DAB_TXID
};
DTAPI_RESULT m_Result;
int m_StatisticId;
int m_IdXtra[4];
StatValueType m_ValueType;
union {
bool m_ValueBool;
double m_ValueDouble;
int m_ValueInt;
void* m_pValue;
};
void Cleanup();
DTAPI_RESULT GetName(const char*& pName, const char*& pShortName);
DTAPI_RESULT GetName(const wchar_t*& pName, const wchar_t*& pShortName);
DTAPI_RESULT GetValue(int &Value);
DTAPI_RESULT GetValue(double &Value);
DTAPI_RESULT GetValue(bool &Value);
DTAPI_RESULT GetValue(DtDabEnsembleInfo*& pValue);
DTAPI_RESULT GetValue(DtDabTransmitterIdInfo*& pValue);
DTAPI_RESULT GetValue(DtDvbC2DemodL1Part2Data*& pValue);
DTAPI_RESULT GetValue(DtDvbC2DemodL1PlpSigData*& pValue);
DTAPI_RESULT GetValue(DtDvbTTpsInfo*& pValue);
DTAPI_RESULT GetValue(DtDvbT2DemodL1Data*& pValue);
DTAPI_RESULT GetValue(DtDemodLdpcStats*& pValue);
DTAPI_RESULT GetValue(DtDemodMaLayerData*& pValue);
DTAPI_RESULT GetValue(DtDemodMaLayerStats*& pValue);
DTAPI_RESULT GetValue(DtDemodPlpBlocks*& pValue);
DTAPI_RESULT GetValue(DtIsdbtParamsData*& pValue);
DTAPI_RESULT GetValue(DtRsDecStats*& pValue);
DTAPI_RESULT GetValue(DtVitDecStats*& pValue);
DTAPI_RESULT SetId(int StatisticId);
DTAPI_RESULT SetValue(int Value);
DTAPI_RESULT SetValue(double Value);
DTAPI_RESULT SetValue(bool Value);
DTAPI_RESULT SetValue(DtDabEnsembleInfo& pValue);
DTAPI_RESULT SetValue(DtDabTransmitterIdInfo& pValue);
DTAPI_RESULT SetValue(DtDvbC2DemodL1Part2Data& Value);
DTAPI_RESULT SetValue(DtDvbC2DemodL1PlpSigData& Value);
DTAPI_RESULT SetValue(DtDvbTTpsInfo& pValue);
DTAPI_RESULT SetValue(DtDvbT2DemodL1Data& Value);
DTAPI_RESULT SetValue(DtDemodLdpcStats& Value);
DTAPI_RESULT SetValue(DtDemodMaLayerData& Value);
DTAPI_RESULT SetValue(DtDemodMaLayerStats& Value);
DTAPI_RESULT SetValue(DtDemodPlpBlocks& Value);
DTAPI_RESULT SetValue(DtIsdbtParamsData& Value);
DTAPI_RESULT SetValue(DtRsDecStats& pValue);
DTAPI_RESULT SetValue(DtVitDecStats& pValue);
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
static DTAPI_RESULT FromXml(const std::wstring&, DtStatistic*&, int& Count);
static DTAPI_RESULT ToXml(DtStatistic* pStatistics, int Count, std::wstring&);
DtStatistic& operator=(const DtStatistic&);
private:
DtStatistic(const DtStatistic&);
};
#define DTAPI_STAT_BADPCKCNT 0x003
#define DTAPI_STAT_CNR 0x105
#define DTAPI_STAT_DVBC2_DSLICEDISC 0x010
#define DTAPI_STAT_DVBC2_L1HDR_ERR 0x00E
#define DTAPI_STAT_DVBC2_L1P2_ERR 0x00F
#define DTAPI_STAT_DVBT2_L1PRE_ERR 0x00C
#define DTAPI_STAT_DVBT2_L1POST_ERR 0x00D
#define DTAPI_STAT_EBN0 0x111
#define DTAPI_STAT_ESN0 0x110
#define DTAPI_STAT_LINKMARGIN 0x10F
#define DTAPI_STAT_MER 0x106
#define DTAPI_STAT_MOD_SAT 0x004
#define DTAPI_STAT_RELOCKCNT 0x00A
#define DTAPI_STAT_RFLVL_CHAN 0x005
#define DTAPI_STAT_RFLVL_CHAN_QS 0x015
#define DTAPI_STAT_RFLVL_NARROW 0x006
#define DTAPI_STAT_RFLVL_NARROW_QS 0x016
#define DTAPI_STAT_RS 0x008
#define DTAPI_STAT_SNR 0x107
#define DTAPI_STAT_TEMP_TUNER 0x009
#define DTAPI_STAT_T2MI_OVFS 0x00B
#define DTAPI_STAT_BER_POSTBCH 0x100
#define DTAPI_STAT_BER_POSTLDPC 0x101
#define DTAPI_STAT_BER_POSTVIT 0x102
#define DTAPI_STAT_BER_PREBCH 0x10D
#define DTAPI_STAT_BER_PRELDPC 0x10E
#define DTAPI_STAT_BER_PRERS 0x103
#define DTAPI_STAT_BER_PREVIT 0x104
#define DTAPI_STAT_FER_POSTBCH 0x116
#define DTAPI_STAT_FREQ_SHIFT 0x10B
#define DTAPI_STAT_OCCUPIEDBW 0x112
#define DTAPI_STAT_PER 0x108
#define DTAPI_STAT_ROLLOFF 0x113
#define DTAPI_STAT_SAMPRATE_OFFSET 0x10C
#define DTAPI_STAT_CARRIER_LOCK 0x201
#define DTAPI_STAT_FEC_LOCK 0x202
#define DTAPI_STAT_LOCK 0x200
#define DTAPI_STAT_PACKET_LOCK 0x203
#define DTAPI_STAT_SPECTRUMINV 0x205
#define DTAPI_STAT_VIT_LOCK 0x204
#define DTAPI_STAT_DAB_ENSEM_INFO 0x308
#define DTAPI_STAT_DAB_TXID_INFO 0x30C
#define DTAPI_STAT_DVBC2_L1P2DATA 0x300
#define DTAPI_STAT_DVBC2_PLPSIGDATA 0x301
#define DTAPI_STAT_DVBT_TPS_INFO 0x30B
#define DTAPI_STAT_DVBT2_L1DATA 0x302
#define DTAPI_STAT_ISDBT_PARSDATA 0x303
#define DTAPI_STAT_LDPC_STATS 0x304
#define DTAPI_STAT_MA_DATA 0x305
#define DTAPI_STAT_MA_STATS 0x306
#define DTAPI_STAT_PLP_BLOCKS 0x307
#define DTAPI_STAT_RSDEC_STATS 0x30A
#define DTAPI_STAT_VITDEC_STATS 0x309
#define DTAPI_STAT_AGC1 0x001
#define DTAPI_STAT_AGC2 0x002
#define DTAPI_STAT_RFLVL_UNCALIB 0x007
#define DTAPI_STAT_RFLVL_UNCALIB_DBM 0x10A
#define DTAPI_STAT_SYNTAX_ERR_CNT 0x114
#define DTAPI_STAT_OVERFLOW_CNT 0x115
#define DTAPI_STAT_UNDEFINED 0x000
#define DTAPI_STAT_UNSUP_INTITEM 0x80000000
#define DTAPI_STAT_UNSUP_UINTITEM 0xFFFFFFFF
struct DtIpQosStats
{
double m_Per1, m_Per2, m_PerAfterFec;
double m_DelayFactor1, m_DelayFactor2;
double m_MinSkew;
double m_MaxSkew;
double m_MinIpat1, m_MinIpat2;
double m_MaxIpat1, m_MaxIpat2;
};
struct DtIpProfile
{
int m_Profile;
unsigned int m_MaxBitrate;
int m_MaxSkew;
int m_VideoStandard;
};
#define DTAPI_IP_PROF_NOT_DEFINED 0
#define DTAPI_IP_USER_DEFINED 1
#define DTAPI_IP_LBR_LOW_SKEW 2
#define DTAPI_IP_LBR_MODERATE_SKEW 3
#define DTAPI_IP_LBR_HIGH_SKEW 4
#define DTAPI_IP_SBR_LOW_SKEW 5
#define DTAPI_IP_SBR_MODERATE_SKEW 6
#define DTAPI_IP_SBR_HIGH_SKEW 7
#define DTAPI_IP_HBR_LOW_SKEW 5
#define DTAPI_IP_HBR_MODERATE_SKEW 6
#define DTAPI_IP_HBR_HIGH_SKEW 7
struct DtIpPars
{
public:
unsigned char m_Ip[16];
unsigned short m_Port;
unsigned char m_SrcFltIp[16];
unsigned short m_SrcFltPort;
int m_VlanId;
int m_VlanPriority;
unsigned char m_Ip2[16];
unsigned short m_Port2;
unsigned char m_SrcFltIp2[16];
unsigned short m_SrcFltPort2;
int m_VlanId2;
int m_VlanPriority2;
int m_TimeToLive;
int m_NumTpPerIp;
int m_Protocol;
int m_DiffServ;
int m_FecMode;
int m_FecNumRows;
int m_FecNumCols;
int m_Flags;
int m_Mode;
DtIpProfile m_IpProfile;
public:
DtIpPars();
~DtIpPars();
};
#define DtTsIpPars DtIpPars
#define DTAPI_FEC_DISABLE 0
#define DTAPI_FEC_2D 1
#define DTAPI_FEC_2D_M1 1
#define DTAPI_FEC_2D_M2 2
#define DTAPI_FEC_2D_M1_B 3
#define DTAPI_FEC_2D_M2_B 4
#define DTAPI_IP_V4 0x00
#define DTAPI_IP_V6 0x01
#define DTAPI_IP_TX_MANSRCPORT 0x10
#define DTAPI_IP_RX_DIFFSRCPORTFEC 0x20
#define DTAPI_IP_NORMAL 0
#define DTAPI_IP_TX_2022_7 1
#define DTAPI_IP_RX_2022_7 2
#define DTAPI_IP_TX_DBLBUF DTAPI_IP_TX_2022_7
#define DTAPI_IP_RX_DBLBUF DTAPI_IP_RX_2022_7
#define DTAPI_PROTO_UDP 0
#define DTAPI_PROTO_RTP 1
#define DTAPI_PROTO_AUTO 2
#define DTAPI_PROTO_UNKN 2
struct DtIpStat
{
unsigned int m_TotNumIpPackets;
unsigned int m_LostIpPacketsBeforeFec, m_LostIpPacketsAfterFec;
unsigned int m_NumIpPacketsReceived1, m_NumIpPacketsReceived2;
unsigned int m_NumIpPacketsLost1, m_NumIpPacketsLost2;
DtIpQosStats m_QosStatsLastSec, m_QosStatsLastMin;
};
#define DtTsIpStat DtIpStat
struct DtTunePars
{
union {
struct {
int m_TunerStandard;
int m_TunerBandwidth;
int m_IfFrequency;
int m_LpfCutOff;
int m_LpfOffset;
int m_HiPass;
int m_DcNotchIfPpf;
int m_IfNotch;
int m_IfNotchToRssi;
} m_Dta2131TunePars;
} u;
};
struct DtVidStdInfo
{
int m_VidStd;
int m_LinkStd;
bool m_IsHd;
bool m_Is4k;
int m_VidWidth;
int m_VidHeight;
bool m_IsInterlaced;
int m_NumLines;
double m_Fps;
bool m_IsFractional;
int m_FrameNumSym;
int m_LineNumSym;
int m_LineNumSymHanc;
int m_LineNumSymVanc;
int m_LineNumSymEav;
int m_LineNumSymSav;
int m_Field1StartLine;
int m_Field1EndLine;
int m_Field1VidStartLine;
int m_Field1VidEndLine;
int m_Field2StartLine;
int m_Field2EndLine;
int m_Field2VidStartLine;
int m_Field2VidEndLine;
};
struct DtDemodDvbS2ModCodSettings
{
bool m_Enable;
int m_SnrThreshold;
DtDemodDvbS2ModCodSettings() : m_Enable(false), m_SnrThreshold(0) {}
DtDemodDvbS2ModCodSettings(bool Enable, int SnrThreshold) :
m_Enable(Enable), m_SnrThreshold(SnrThreshold) {}
};
class DtDemodPars
{
public:
DtDemodPars();
DtDemodPars(const DtDemodPars&);
~DtDemodPars();
public:
DTAPI_RESULT CheckValidity();
int GetModType() const;
DTAPI_RESULT SetModType(int ModType);
DtDemodParsAtsc* Atsc() const;
DtDemodParsDab* Dab() const;
DtDemodParsDvbC2* DvbC2() const;
DtDemodParsDvbS* DvbS() const;
DtDemodParsDvbS2* DvbS2() const;
DtDemodParsDvbS2Adv* DvbS2Adv() const;
DtDemodParsDvbT* DvbT() const;
DtDemodParsDvbT2* DvbT2() const;
DtDemodParsIq* Iq() const;
DtDemodParsIq2131* Iq2131() const;
DtDemodParsIsdbt* Isdbt() const;
DtDemodParsQam* Qam() const;
bool IsAtsc() const, IsDab() const, IsDvbC2() const, IsDvbS() const,
IsDvbS2() const, IsDvbT() const,IsDvbT2() const, IsIq() const, IsIq2131() const,
IsIsdbt() const, IsQam() const;
void operator=(const DtDemodPars& Pars);
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
DTAPI_RESULT FromOldStyle(int ModType, int ParXtra0, int ParXtra1, int ParXtra2);
DTAPI_RESULT ToOldStyle(int& ModType, int& ParXtra0, int& ParXtra1, int& ParXtra2);
private:
int m_ModType;
void* m_pDemodPars;
private:
void CleanUpDemodPars();
};
struct DtDemodParsAtsc
{
int m_Constellation;
};
struct DtDemodParsDab
{
};
struct DtDemodParsDvbC2
{
int m_Bandwidth;
};
struct DtDemodParsDvbS
{
int m_CodeRate;
int m_SpecInv;
int m_SymRate;
};
struct DtDemodParsDvbS2
{
int m_CodeRate;
int m_Pilots;
int m_SpecInv;
int m_FecFrame;
int m_SymRate;
};
struct DtDemodParsDvbS2Adv : DtDemodParsDvbS2
{
bool m_AutoMuteModCods;
int m_HysteresisMargin;
std::map<DtDvbS2ModCod, DtDemodDvbS2ModCodSettings> m_ModCods;
DtDemodParsDvbS2Adv();
DTAPI_RESULT DeleteModCod(DtDvbS2ModCod ModCod);
DTAPI_RESULT InitSnrThreshold(int TypeNumber);
DTAPI_RESULT SetModCod(DtDvbS2ModCod ModCod, DtDemodDvbS2ModCodSettings &Settings);
};
struct DtDemodParsDvbT
{
int m_CodeRate;
int m_Bandwidth;
int m_Constellation;
int m_Guard;
int m_Interleaving;
int m_Mode;
};
struct DtDemodParsDvbT2
{
int m_Bandwidth;
int m_T2Profile;
};
struct DtDemodParsIq
{
int m_Bandwidth;
int m_IqDemodType;
int m_SampleRate;
};
struct DtDemodParsIq2131
{
int m_IqDemodFreq;
DtFilterPars m_LpfFilter;
double m_LpfScaleFactor;
int m_SampleRate;
DtTunePars m_TunePars;
};
#define DTAPI_DEMOD_OFDM 0
#define DTAPI_DEMOD_QAM 1
struct DtDemodParsIsdbt
{
int m_Bandwidth;
int m_SubChannel;
int m_NumberOfSegments;
DtDemodParsIsdbt() : m_SubChannel(22) {}
};
struct DtDemodParsQam
{
int m_Annex;
int m_Interleaving;
int m_SymRate;
};
struct DtDemodLdpcStats
{
__int64 m_FecBlocksCount;
__int64 m_UncorrFecBlocksCount;
__int64 m_FecBlocksCount1;
__int64 m_FecBlocksItCount;
int m_FecBlocksItMin;
int m_FecBlocksItMax;
__int64 m_BchBitCount;
__int64 m_BchBitErrorCount;
};
struct DtDemodMaLayerStats
{
__int64 m_HdrCrc8ErrorCount;
__int64 m_PckCrc8ErrorCount;
__int64 m_FramingErrorCount;
__int64 m_CommonPlpResyncCount;
};
struct DtRsDecStats
{
bool m_Locked;
__int64 m_ByteSkipCount;
__int64 m_PacketCount;
__int64 m_UncorrPacketCount;
__int64 m_ByteErrorCount;
__int64 m_BitErrorCount;
};
struct DtVitDecStats
{
__int64 m_BitCount;
__int64 m_BitErrorCount;
};
struct DtDemodMaLayerData
{
bool m_Hem;
bool m_Npd;
int m_Issy;
int m_IssyBufs;
int m_IssyTto;
int m_IssyBufStat;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDemodPlpBlocks
{
int m_NumBlocks;
int m_NumBlocksMin;
int m_NumBlocksMax;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtTransmitter
{
__int64 m_FreqHz;
int m_ModType;
int m_SymbolRate;
};
struct DtBsProgress
{
enum BsEvent
{
BS_STEP,
BS_CANCELLED,
BS_DONE
};
__int64 m_FreqHz;
DtDemodPars m_DemodPars;
BsEvent m_ProgressEvent;
bool m_ChannelFound;
DTAPI_RESULT m_Result;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
public:
DtBsProgress();
~DtBsProgress();
};
typedef void DtBsProgressFunc(DtBsProgress& Progress, void* pOpaque);
struct DtRfLevel
{
__int64 m_FreqHz;
int m_RfLevel;
};
struct DtSpsProgress {
enum SpsEvent
{
SPS_STEP,
SPS_CANCELLED,
SPS_DONE
};
DtRfLevel m_DtRfLevel;
SpsEvent m_ProgressEvent;
DTAPI_RESULT m_Result;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
public:
DtSpsProgress();
~DtSpsProgress();
};
typedef void DtSpsProgressFunc(DtSpsProgress& Progress, void* pOpaque);
class DtDevice
{
public:
DtDevice();
virtual ~DtDevice();
private:
DtDevice(const DtDevice&);
public:
virtual int Category(void);
virtual int ChanType(int Port);
virtual int FirmwareVersion(void);
virtual bool IsAttached(void);
virtual int TypeNumber(void);
virtual bool HasCaps(int Port, const DtCaps Caps) const;
public:
virtual DTAPI_RESULT AttachToIpAddr(unsigned char Ip[4]);
virtual DTAPI_RESULT AttachToSerial(__int64 SerialNumber);
virtual DTAPI_RESULT AttachToSlot(int PciBusNumber, int SlotNumber);
virtual DTAPI_RESULT AttachToType(int TypeNumber, int DeviceNo=0);
virtual DTAPI_RESULT ClearGpsErrors();
virtual DTAPI_RESULT Detach(void);
virtual DTAPI_RESULT DetectIoStd(int Port, int& Value, int& SubValue);
virtual DTAPI_RESULT FlashDisplay(int NumFlashes=5, int OnTime=100, int OffTime=100);
virtual DTAPI_RESULT GetAttribute(int AttrId, int& AttrValue);
virtual DTAPI_RESULT GetAttribute(int Port, int AttrId, int& AttrValue);
virtual DTAPI_RESULT GetAttribute(int Port, int AttrId, DtModPars& ModParVals,
int& AttrValue);
virtual DTAPI_RESULT GetDescriptor(DtDeviceDesc& DvcDesc);
virtual DTAPI_RESULT GetDeviceDriverVersion(int& Major, int& Minor, int& BugFix,
int& Build);
virtual DTAPI_RESULT GetDisplayName(wchar_t* pName);
virtual DTAPI_RESULT GetDisplayName(char* pName);
virtual DTAPI_RESULT GetFanSpeed(int Fan, int& Rpm);
virtual DTAPI_RESULT GetFanTemperature(int Fan, int& Temp);
virtual DTAPI_RESULT GetFirmwareVersion(int& FirmwareVersion);
virtual DTAPI_RESULT GetGenlockState(int& State, int& RefVidStd);
virtual DTAPI_RESULT GetGenlockState(int& State);
virtual DTAPI_RESULT GetGpsStatus(int& Status, int& Error);
virtual DTAPI_RESULT GetGpsTime(int& GpsTime);
virtual DTAPI_RESULT GetIoConfig(DtIoConfig& IoCfg);
virtual DTAPI_RESULT GetIoConfig(int Port, int Group, int& Value);
virtual DTAPI_RESULT GetIoConfig(int Port, int Group, int& Value, int& SubValue);
virtual DTAPI_RESULT GetIoConfig(int Port, int Group, int& Value, int& SubValue,
__int64& ParXtra0);
virtual DTAPI_RESULT GetIoConfig(int Port, int Group, int& Value, int& SubValue,
__int64& ParXtra0, __int64& ParXtra1);
virtual DTAPI_RESULT GetNwSpeed(int Port, bool& Enable, int& Speed);
virtual DTAPI_RESULT GetRefClkCnt(int& RefClkCnt);
virtual DTAPI_RESULT GetRefClkCnt(__uint64& RefClkCnt);
virtual DTAPI_RESULT GetRefClkCnt(int& RefClkCnt, int& RefClkFreqHz);
virtual DTAPI_RESULT GetRefClkCnt(__uint64& RefClkCnt, int& RefClkFreqHz);
virtual DTAPI_RESULT GetRefClkFreq(int& RefClkFreqHz);
virtual DTAPI_RESULT GetStateFlags(int Port, int &StateFlags);
virtual DTAPI_RESULT GetUsbSpeed(int& UsbSpeed);
virtual DTAPI_RESULT GetVcxoState(bool& Enable, int& Lock, int& VcxoClkFreqHz);
virtual DTAPI_RESULT HwFuncScan(int NumEntries, int& NumEntriesResult,
DtHwFuncDesc* pHwFuncs);
virtual DTAPI_RESULT LedControl(int LedControl);
virtual DTAPI_RESULT RegisterCallback(pDtEventCallback Callback, void* pContext,
int EventTypes, void** pId = NULL);
virtual DTAPI_RESULT SetDisplayName(wchar_t* pName);
virtual DTAPI_RESULT SetDisplayName (char* pName);
virtual DTAPI_RESULT SetIoConfig(int Port, int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
virtual DTAPI_RESULT SetIoConfig(DtIoConfig* pIoConfigs, int Count);
virtual DTAPI_RESULT SetNwSpeed(int Port, bool Enable, int Speed);
virtual DTAPI_RESULT UnregisterCallback(void* pId);
virtual DTAPI_RESULT VpdDelete(const char* pTag);
virtual DTAPI_RESULT VpdDelete(const wchar_t* pTag);
virtual DTAPI_RESULT VpdRead(const char* pTag, char* pVpdItem);
virtual DTAPI_RESULT VpdRead(const wchar_t* pTag, wchar_t* pVpdItem);
virtual DTAPI_RESULT VpdRead(const char* pTag, char* pVpdItem, int& ItemSize);
virtual DTAPI_RESULT VpdRead(const wchar_t* pTag, char* pVpdItem, int& ItemSize);
virtual DTAPI_RESULT VpdWrite(const char* pTag, char* pVpdItem);
virtual DTAPI_RESULT VpdWrite(const wchar_t* pTag, wchar_t* pVpdItem);
virtual DTAPI_RESULT VpdWrite(const char* pTag, char* pVpdItem, int ItemSize);
virtual DTAPI_RESULT VpdWrite(const wchar_t* pTag, char* pVpdItem, int ItemSize);
protected:
virtual void LoadDeviceData();
private:
static void DtEventCallback(int Event, DtEventArgs* pArgs);
public:
DtDeviceDesc m_DvcDesc;
DtHwFuncDesc* m_pHwf;
private:
std::list<void*> m_EventSubscriberList;
friend class DtInpChannel;
friend class DtOutpChannel;
public:
IDevice* m_pDev;
};
#define DTAPI_ATTR_LEVEL_MAX 1
#define DTAPI_ATTR_LEVEL_RANGE 2
#define DTAPI_ATTR_LEVEL_STEPSIZE 3
#define DTAPI_ATTR_RFFREQ_ABSMAX 4
#define DTAPI_ATTR_RFFREQ_ABSMIN 5
#define DTAPI_ATTR_RFFREQ_MAX 6
#define DTAPI_ATTR_RFFREQ_MIN 7
#define DTAPI_ATTR_SAMPRHW_ABSMAX 8
#define DTAPI_ATTR_SAMPRHW_ABSMIN 9
#define DTAPI_ATTR_SAMPRHW_HARDLIM 10
#define DTAPI_ATTR_SAMPRHW_MAX 11
#define DTAPI_ATTR_SAMPRHW_MIN 12
#define DTAPI_ATTR_SAMPRATE_ABSMAX 13
#define DTAPI_ATTR_SAMPRATE_ABSMIN 14
#define DTAPI_ATTR_SAMPRATE_MAX 15
#define DTAPI_ATTR_SAMPRATE_MIN 16
#define DTAPI_ATTR_NUM_FANS 17
#define DTAPI_ATTR_PCIE_REQ_BW 18
#define DTAPI_ATTR_PCIE_AVAIL_BW 19
#define DTAPI_SCANORDER_ORIG 0
#define DTAPI_SCANORDER_SN 1
#define DTAPI_DVC2STR_TYPE_NMB 0
#define DTAPI_DVC2STR_TYPE_AND_LOC 1
#define DTAPI_HWF2STR_TYPE_NMB 0
#define DTAPI_HWF2STR_TYPE_AND_PORT 1
#define DTAPI_HWF2STR_TYPE_AND_LOC 2
#define DTAPI_HWF2STR_ITF_TYPE 3
#define DTAPI_HWF2STR_ITF_TYPE_SHORT 4
#define DTAPI_GENL_NO_REF 1
#define DTAPI_GENL_LOCKING 2
#define DTAPI_GENL_LOCKED 3
#define DTAPI_GPS_1PPS_SYNC 0x000001
#define DTAPI_GPS_10MHZ_SYNC 0x000002
#define DTAPI_GPS_1PPS_ERROR 0x000001
#define DTAPI_STATE_FLAG_INSUFF_USB_BW 0x010000
#define DTAPI_STATE_FLAG_SDI_NO_LOCK 0x020000
#define DTAPI_STATE_FLAG_SDI_INVALID 0x040000
#define DTAPI_STATE_FLAG_VPD_CORRUPT 0x000001
#define DTAPI_STATE_FLAG_NO_SERIAL 0x000002
#define DTAPI_STATE_FLAG_NO_USB3 0x000004
#define DTAPI_STATE_FLAG_SLEEPING 0x000008
class DtDtaPlusDevice
{
public:
DtDtaPlusDevice();
virtual ~DtDtaPlusDevice();
private:
DtDtaPlusDevice(const DtDtaPlusDevice&);
public:
bool IsAttached(void);
public:
DTAPI_RESULT AttachToDevice(const DtDtaPlusDeviceDesc &DvcDesc);
DTAPI_RESULT AttachToSerial(__int64 SerialNumber);
DTAPI_RESULT Detach();
DTAPI_RESULT GetDeviceStatus(int &Status);
DTAPI_RESULT GetTempControlStatus(int &ControlStatus);
DTAPI_RESULT GetTemperature(int &Temperature);
DTAPI_RESULT GetSerialNumber(__int64 &SerialNumber);
DTAPI_RESULT SetRfOutLevel(int Level);
DTAPI_RESULT SetFreq(int Freq);
private:
DtaPlusDevice* m_Dev;
};
#define DTAPI_DTAPLUS_STATUS_OFF 0
#define DTAPI_DTAPLUS_STATUS_ON 1
#define DTAPI_DTAPLUS_STATUS_ATTN_FOLLOW_UP 2
#define DTAPI_DTAPLUS_STATUS_ATTN_FOLLOW_DOWN 3
#define DTAPI_DTAPLUS_STATUS_DAC_FOLLOW_UP 4
#define DTAPI_DTAPLUS_STATUS_DAC_FOLLOW_DOWN 5
#define DTAPI_DTAPLUS_STATUS_HOLD 6
#define DTAPI_DTAPLUS_STATUS_NO_SIGNAL 7
#define DTAPI_DTAPLUS_STATUS_OVER_POWER 8
#define DTAPI_DTAPLUS_TEMP_CONTROL_OFF 0
#define DTAPI_DTAPLUS_TEMP_CONTROL_FAN_ON 1
#define DTAPI_DTAPLUS_TEMP_CONTROL_HEATER_ON 2
#define DTAPI_NWSPEED_AUTO 0
#define DTAPI_NWSPEED_NOLIN 0
#define DTAPI_NWSPEED_10MB_HALF 1
#define DTAPI_NWSPEED_10MB_FULL 2
#define DTAPI_NWSPEED_100MB_HALF 3
#define DTAPI_NWSPEED_100MB_FULL 4
#define DTAPI_NWSPEED_1GB_MASTER 5
#define DTAPI_NWSPEED_1GB_SLAVE 6
#define DTAPI_UCODE_NOT_LOADED 0
#define DTAPI_UCODE_LOADING 1
#define DTAPI_UCODE_LOADED 2
class DtInpChannel
{
public:
DtInpChannel();
virtual ~DtInpChannel();
private:
DtInpChannel(const DtInpChannel&);
public:
DtHwFuncDesc m_HwFuncDesc;
public:
int Category(void) { return m_HwFuncDesc.m_DvcDesc.m_Category; }
int FirmwareVersion(void) { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
bool IsAttached(void) { return m_pInp != NULL; }
int TypeNumber(void) { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
bool HasCaps(const DtCaps Caps) const
{
return ((m_HwFuncDesc.m_Flags & Caps) == Caps);
}
public:
DTAPI_RESULT AttachToPort(DtDevice* pDtDvc, int Port,
bool Exclusive=true, bool ProbeOnly=false);
DTAPI_RESULT BlindScan(int NumEntries, int& NumEntriesResult,
DtTransmitter* pScanResults, __int64 FreqHzSteps=10000000LL,
__int64 StartFreqHz=-1, __int64 EndFreqHz=-1);
DTAPI_RESULT BlindScan(DtBsProgressFunc* pCallback, void* pOpaque,
const DtDemodPars& DemodPars,
__int64 FreqHzSteps=10000000LL, __int64 StartFreqHz=-1,
__int64 EndFreqHz=-1);
DTAPI_RESULT CancelBlindScan();
DTAPI_RESULT CancelSpectrumScan();
DTAPI_RESULT ClearFifo();
DTAPI_RESULT ClearFlags(int Latched);
DTAPI_RESULT Detach(int DetachMode);
DTAPI_RESULT DetectIoStd(int& Value, int& SubValue);
DTAPI_RESULT Equalise(int EqualiserSetting);
DTAPI_RESULT GetConstellationPoints(int NumPoints, DtConstelPoint* pPoint);
DTAPI_RESULT GetDemodControl(int& ModType,
int& ParXtra0, int& ParXtra1, int& ParXtra2);
DTAPI_RESULT GetDemodControl(DtDemodPars* pDemodPars);
DTAPI_RESULT GetDescriptor(DtHwFuncDesc& HwFunDesc);
DTAPI_RESULT GetFifoLoad(int& FifoLoad);
DTAPI_RESULT GetFlags(int& Flags, int& Latched);
DTAPI_RESULT GetIoConfig(int Group, int& Value);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue, __int64& ParXtra0);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0, __int64& ParXtra1);
DTAPI_RESULT GetIpPars(DtIpPars* pIpPars);
DTAPI_RESULT GetIpStat(DtIpStat* pIpStat);
DTAPI_RESULT GetMaxFifoSize(int& MaxFifoSize);
DTAPI_RESULT GetPars(int Count, DtPar* pPars);
DTAPI_RESULT GetRxClkFreq(int& RxClkFreq);
DTAPI_RESULT GetRxControl(int& RxControl);
DTAPI_RESULT GetRxMode(int& RxMode);
DTAPI_RESULT GetStatistics(int Count, DtStatistic* pStatistics);
DTAPI_RESULT GetStatistic(int Type, int& Statistic);
DTAPI_RESULT GetStatistic(int Type, double& Statistic);
DTAPI_RESULT GetStatistic(int Type, bool& Statistic);
DTAPI_RESULT GetStatus(int& PacketSize, int& NumInv, int& ClkDet,
int& AsiLock, int& RateOk, int& AsiInv);
DTAPI_RESULT GetStreamSelection(DtDabEtiStreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtDabStreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtDvbC2StreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtDvbTStreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtDvbT2StreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtIsdbtStreamSelPars& StreamSel);
DTAPI_RESULT GetStreamSelection(DtT2MiStreamSelPars& StreamSel);
DTAPI_RESULT GetSupportedStatistics(int& Count, DtStatistic* pStatistics);
DTAPI_RESULT GetTargetId(int& Present, int& TargetId);
DTAPI_RESULT GetTsRateBps(int& TsRate);
DTAPI_RESULT GetTunerFrequency(__int64& FreqHz, int TunerId=-1);
DTAPI_RESULT GetViolCount(int& ViolCount);
DTAPI_RESULT I2CLock(int TimeOut);
DTAPI_RESULT I2CUnlock(void);
DTAPI_RESULT I2CRead(int DvcAddr, char* pBuffer, int NumBytesToRead);
DTAPI_RESULT I2CWrite(int DvcAddr, char* pBuffer, int NumBytesToWrite);
DTAPI_RESULT I2CWriteRead(int DvcAddrWrite, char* pBufferWrite, int NumBytesToWrite,
int DvcAddrRead, char* pBufferRead, int NumBytesToRead);
DTAPI_RESULT LedControl(int LedControl);
DTAPI_RESULT LnbEnable(bool Enable);
DTAPI_RESULT LnbEnableTone(bool Enable);
DTAPI_RESULT LnbSetVoltage(int Level);
DTAPI_RESULT LnbSendBurst(int BurstType);
DTAPI_RESULT LnbSendDiseqcMessage(const unsigned char* MsgOut, int NumBytesOut);
DTAPI_RESULT LnbSendDiseqcMessage(const unsigned char* MsgOut, int NumBytesOut,
unsigned char* MsgIn, int& NumBytesIn);
DTAPI_RESULT PolarityControl(int Polarity);
DTAPI_RESULT Read(char* pBuffer, int NumBytesToRead);
DTAPI_RESULT Read(char* pBuffer, int NumBytesToRead, int TimeOut);
DTAPI_RESULT ReadFrame(unsigned int* pFrame, int& FrameSize, int TimeOut=-1);
DTAPI_RESULT RegisterDemodCallback(IDtDemodEvent* pIEvent, __int64 Events=-1);
DTAPI_RESULT Reset(int ResetMode);
DTAPI_RESULT SetAdcSampleRate(int SampleRate);
DTAPI_RESULT SetAntPower(int AntPower);
DTAPI_RESULT SetDemodControl(int ModType, int ParXtra0, int ParXtra1, int ParXtra2);
DTAPI_RESULT SetDemodControl(DtDemodPars *pDemodPars);
DTAPI_RESULT SetErrorStatsMode(int ModType, int Mode);
DTAPI_RESULT SetFifoSize(int FifoSize);
DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
DTAPI_RESULT SetIpPars(DtIpPars* pIpPars);
DTAPI_RESULT SetPars(int Count, DtPar* pPars);
DTAPI_RESULT SetRxControl(int RxControl);
DTAPI_RESULT SetRxMode(int RxMode);
DTAPI_RESULT SetStreamSelection(DtDabEtiStreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtDabStreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtDvbC2StreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtDvbTStreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtDvbT2StreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtIsdbtStreamSelPars& StreamSel);
DTAPI_RESULT SetStreamSelection(DtT2MiStreamSelPars& StreamSel);
DTAPI_RESULT StatisticsPollingEnable(bool Enable);
DTAPI_RESULT SetTuningMode(int Mode);
DTAPI_RESULT SetTunerFrequency(__int64 FreqHz, int TunerId=-1);
DTAPI_RESULT SpectrumScan(DtSpsProgressFunc* pCallback, void* pOpaque, int ScanType,
__int64 FreqHzSteps=1000000LL, __int64 StartFreqHz=-1L,
__int64 EndFreqHz=-1L);
DTAPI_RESULT Tune(__int64 FreqHz, int ModType,
int ParXtra0, int ParXtra1, int ParXtra2);
DTAPI_RESULT Tune(__int64 FreqHz, DtDemodPars *pDemodPars);
private:
IXpMutex* m_pMTLock;
void* m_pDetachLockCount;
int m_Port;
bool m_WantToDetach;
public:
InpChannel* m_pInp;
private:
DTAPI_RESULT DetachLock(void);
DTAPI_RESULT DetachUnlock(void);
DTAPI_RESULT ReadAccessLock(void);
DTAPI_RESULT ReadAccessUnlock(void);
DTAPI_RESULT ReadWithTimeOut(char* pBuf, int NumBytesToRead, int TimeOut = -1);
};
#define DTAPI_EV_TUNE_FREQ_CHANGED 0x0000000000000001LL
#define DTAPI_EV_TUNE_PARS_CHANGED 0x0000000000000002LL
#define DTAPI_ERRORSTATS_BER 0
#define DTAPI_ERRORSTATS_RS 1
#define DTAPI_NOT_SUPPORTED -1
#define DTAPI_ASIINV_NORMAL 0
#define DTAPI_ASIINV_INVERT 1
#define DTAPI_ASI_NOLOCK 0
#define DTAPI_ASI_INLOCK 1
#define DTAPI_GENLOCK_NOLOCK 0
#define DTAPI_GENLOCK_INLOCK 1
#define DTAPI_CLKDET_FAIL 0
#define DTAPI_CLKDET_OK 1
#define DTAPI_INPRATE_LOW 0
#define DTAPI_INPRATE_OK 1
#define DTAPI_NUMINV_NONE 0
#define DTAPI_NUMINV_16 1
#define DTAPI_NUMINV_OTHER 2
#define DTAPI_PCKSIZE_INV 0
#define DTAPI_PCKSIZE_188 2
#define DTAPI_PCKSIZE_204 3
#define DTAPI_SDIMODE_INV 0
#define DTAPI_SDIMODE_525 1
#define DTAPI_SDIMODE_625 2
#define DTAPI_RXCTRL_IDLE 0
#define DTAPI_RXCTRL_RCV 1
#define DTAPI_RXMODE_TS 0x10
#define DTAPI_RXMODE_TS_MODE_BITS 0x0F
#define DTAPI_RXMODE_ST188 (DTAPI_RXMODE_TS | 0x01)
#define DTAPI_RXMODE_ST204 (DTAPI_RXMODE_TS | 0x02)
#define DTAPI_RXMODE_STMP2 (DTAPI_RXMODE_TS | 0x03)
#define DTAPI_RXMODE_STRAW (DTAPI_RXMODE_TS | 0x04)
#define DTAPI_RXMODE_STL3 (DTAPI_RXMODE_TS | 0x05)
#define DTAPI_RXMODE_STL3FULL (DTAPI_RXMODE_TS | 0x06)
#define DTAPI_RXMODE_IPRAW (DTAPI_RXMODE_TS | 0x07)
#define DTAPI_RXMODE_RAWASI (DTAPI_RXMODE_TS | 0x08)
#define DTAPI_RXMODE_STTRP (DTAPI_RXMODE_TS | 0x09)
#define DTAPI_RXMODE_TS_MASK (DTAPI_RXMODE_TS | DTAPI_RXMODE_TS_MODE_BITS)
#define DTAPI_RXMODE_SDI 0x1000
#define DTAPI_RXMODE_SDI_MODE_BITS 0x0F00
#define DTAPI_RXMODE_SDI_FULL (DTAPI_RXMODE_SDI | 0x100)
#define DTAPI_RXMODE_SDI_ACTVID (DTAPI_RXMODE_SDI | 0x200)
#define DTAPI_RXMODE_SDI_MASK (DTAPI_RXMODE_SDI | DTAPI_RXMODE_SDI_MODE_BITS)
#define DTAPI_RXMODE_SDI_HUFFMAN 0x00002000
#define DTAPI_RXMODE_SDI_10B 0x00004000
#define DTAPI_RXMODE_SDI_16B 0x00008000
#define DTAPI_RXMODE_SDI_10B_NBO 0x00010000
#define DTAPI_RXMODE_SDI_FRAMECOUNT 0x00020000
#define DTAPI_RXMODE_TIMESTAMP32 0x01000000
#define DTAPI_RXMODE_TIMESTAMP64 0x02000000
#define DTAPI_DEMOD_FECLOCK_FAIL 0
#define DTAPI_DEMOD_FECLOCK_OK 1
#define DTAPI_DEMOD_RCVLOCK_FAIL 0
#define DTAPI_DEMOD_RCVLOCK_OK 1
#define DTAPI_BAND_BROADCAST_ONAIR 1
#define DTAPI_BAND_FCC_CABLE 2
#define DTAPI_BAND_IRC 3
#define DTAPI_BAND_HRC 4
#define DTAPI_RFLVL_CHANNEL 0
#define DTAPI_RFLVL_NARROWBAND 1
#define DTAPI_ADCCLK_OFF 0
#define DTAPI_ADCCLK_20M647 20647059
#define DTAPI_ADCCLK_13M5 13500000
#define DTAPI_ADCCLK_27M 27000000
#define DTAPI_LNB_13V 0
#define DTAPI_LNB_18V 1
#define DTAPI_LNB_14V 2
#define DTAPI_LNB_19V 3
#define DTAPI_LNB_BURST_A 0
#define DTAPI_LNB_BURST_B 1
#define DTAPI_TUNMOD_QAM 0x1
#define DTAPI_TUNMOD_ATSC 0x2
#define DTAPI_TUNMOD_ISDBT 0x3
#define DTAPI_TUNMOD_DVBT 0x4
#define DTAPI_TUNMOD_DMBT 0x5
#define DTAPI_TUN31_AUTO -1
#define DTAPI_TUN31_LPF_1_5MHZ 0
#define DTAPI_TUN31_LPF_6MHZ 1
#define DTAPI_TUN31_LPF_7MHZ 2
#define DTAPI_TUN31_LPF_8MHZ 3
#define DTAPI_TUN31_LPF_9MHZ 4
#define DTAPI_TUN31_LPF_0PCT 0
#define DTAPI_TUN31_LPF_4PCT 1
#define DTAPI_TUN31_LPF_8PCT 2
#define DTAPI_TUN31_LPF_12PCT 3
#define DTAPI_TUN31_HPF_DIS 0
#define DTAPI_TUN31_HPF_0_4MHZ 1
#define DTAPI_TUN31_HPF_0_85MHZ 2
#define DTAPI_TUN31_HPF_1MHZ 3
#define DTAPI_TUN31_HPF_1_5MHZ 4
#define DTAPI_TUN31_NOTCH_DIS 0
#define DTAPI_TUN31_NOTCH_ENA 1
#define DTAPI_AGC1_FREE 0
#define DTAPI_AGC1_FROZEN 1
#define DTAPI_TUNING_NORMAL 0
#define DTAPI_TUNING_INDEPENDENT 1
#define DTAPI_TUNERID_ALL -1
#define DTAPI_TUNERID_MAIN 0
#define DTAPI_TUNERID_MEASUREMENT 1
class DtOutpChannel
{
public:
DtOutpChannel();
virtual ~DtOutpChannel();
private:
DtOutpChannel(const DtOutpChannel&);
public:
DtHwFuncDesc m_HwFuncDesc;
public:
int Category(void) { return m_HwFuncDesc.m_DvcDesc.m_Category; }
int FirmwareVersion(void) { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
bool IsAttached(void) { return m_pOutp != NULL; }
int TypeNumber(void) { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
bool HasCaps(const DtCaps Caps) const
{
return ((m_HwFuncDesc.m_Flags & Caps) == Caps);
}
public:
virtual DTAPI_RESULT AttachToPort(DtDevice* pDtDvc, int Port, bool ProbeOnly=false);
virtual DTAPI_RESULT ClearFifo(void);
virtual DTAPI_RESULT ClearFlags(int Latched);
virtual DTAPI_RESULT ClearSfnErrors();
virtual DTAPI_RESULT Detach(int DetachMode);
virtual DTAPI_RESULT GetAttribute(int AttrId, int& AttrValue);
virtual DTAPI_RESULT GetAttribute(int AttrId, DtModPars& ModParVals, int& AttrValue);
virtual DTAPI_RESULT GetDescriptor(DtHwFuncDesc& HwFunDesc);
virtual DTAPI_RESULT GetExtClkFreq(int& ExtClkFreq);
virtual DTAPI_RESULT GetFailsafeAlive(bool& Alive);
virtual DTAPI_RESULT GetFailsafeConfig(bool& Enable, int& Timeout);
virtual DTAPI_RESULT GetFifoLoad(int& FifoLoad, int SubChan=0);
virtual DTAPI_RESULT GetFifoSize(int& FifoSize);
virtual DTAPI_RESULT GetFifoSizeMax(int& FifoSizeMax);
virtual DTAPI_RESULT GetFifoSizeTyp(int& FifoSizeTyp);
virtual DTAPI_RESULT GetFlags(int& Status, int& Latched);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0, __int64& ParXtra1);
virtual DTAPI_RESULT GetIpPars(DtIpPars* pIpPars);
virtual DTAPI_RESULT GetMaxFifoSize(int& MaxFifoSize);
virtual DTAPI_RESULT GetModControl(int& ModType, int& ParXtra0, int& ParXtra1,
int& ParXtra2, void*& pXtraPars);
virtual DTAPI_RESULT GetOutputLevel(int& LeveldBm);
virtual DTAPI_RESULT GetRfControl(__int64& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetRfControl(int& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetRfControl(double& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetSfnMaxTimeDiff(int& TimeDiff);
virtual DTAPI_RESULT GetSfnModDelay(int& ModDelay);
virtual DTAPI_RESULT GetSfnStatus(int& Status, int& Error);
virtual DTAPI_RESULT GetSpiClk(int& SpiClk);
virtual DTAPI_RESULT GetTargetId(int& Present, int& TargetId);
virtual DTAPI_RESULT GetTsRateBps(int& TsRate);
virtual DTAPI_RESULT GetTsRateBps(DtFractionInt& TsRate);
virtual DTAPI_RESULT GetTxControl(int& TxControl);
virtual DTAPI_RESULT GetTxMode(int& TxMode, int& TxStuffMode);
virtual DTAPI_RESULT LedControl(int LedControl);
virtual DTAPI_RESULT Reset(int ResetMode);
virtual DTAPI_RESULT SetChannelModelling(bool CmEnable, DtCmPars& CmPars);
virtual DTAPI_RESULT SetCustomRollOff(bool Enable, DtFilterPars& Filter);
virtual DTAPI_RESULT SetFailsafeAlive();
virtual DTAPI_RESULT SetFailsafeConfig(bool Enable, int Timeout = 0);
virtual DTAPI_RESULT SetFifoSize(int FifoSize);
virtual DTAPI_RESULT SetFifoSizeMax(void);
virtual DTAPI_RESULT SetFifoSizeTyp(void);
virtual DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
virtual DTAPI_RESULT SetIpPars(DtIpPars* pIpPars);
virtual DTAPI_RESULT SetIsdbtCaptFile(void* IsdbtFile);
virtual DTAPI_RESULT SetModControl(DtCmmbPars&);
virtual DTAPI_RESULT SetModControl(DtDvbC2Pars&);
virtual DTAPI_RESULT SetModControl(DtDvbCidPars&);
virtual DTAPI_RESULT SetModControl(DtDvbS2Pars&);
virtual DTAPI_RESULT SetModControl(DtDvbT2Pars&);
virtual DTAPI_RESULT SetModControl(DtIqDirectPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbsPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbtPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbTmmPars&);
virtual DTAPI_RESULT SetModControl(int ModType, int ParXtra0, int ParXtra1,
int ParXtra2);
virtual DTAPI_RESULT SetModControl(unsigned char*);
virtual DTAPI_RESULT SetMultiModConfig(int NumSubChan, int FreqSpacing);
virtual DTAPI_RESULT SetOutputLevel(int LeveldBm);
virtual DTAPI_RESULT SetPhaseNoiseControl(DtPhaseNoisePars& PnPars);
virtual DTAPI_RESULT SetPower(int Power);
virtual DTAPI_RESULT SetRfControl(__int64 RfFreq);
virtual DTAPI_RESULT SetRfControl(double RfFreq);
virtual DTAPI_RESULT SetRfControl(int RfFreq);
virtual DTAPI_RESULT SetRfMode(int RfMode);
virtual DTAPI_RESULT SetRfMode(int Sel, int Mode);
virtual DTAPI_RESULT SetSfnAllowedTimeDiff(int TimeDiff);
virtual DTAPI_RESULT SetSfnControl(int SnfMode, int TimeOffset);
virtual DTAPI_RESULT SetSnr(int Mode, int Snr);
virtual DTAPI_RESULT SetSpiClk(int SpiClk);
virtual DTAPI_RESULT SetTsRateBps(int TsRate);
virtual DTAPI_RESULT SetTsRateBps(DtFractionInt TsRate);
virtual DTAPI_RESULT SetTsRateRatio(int TsRate, int ClockRef);
virtual DTAPI_RESULT SetTxControl(int TxControl);
virtual DTAPI_RESULT SetTxMode(int TxMode, int StuffMode);
virtual DTAPI_RESULT SetTxPolarity(int TxPolarity);
virtual DTAPI_RESULT Write(char* pBuffer, int NumBytesToWrite, int SubChan=0);
virtual DTAPI_RESULT GetModBufLoads(bool&, int&, int&, int&);
public:
OutpChannel* m_pOutp;
private:
void* m_pDetachLockCount;
bool m_WantToDetach;
DTAPI_RESULT DetachLock(void);
DTAPI_RESULT DetachUnlock(void);
};
class DtMplpOutpChannel : public DtOutpChannel
{
public:
DtMplpOutpChannel();
virtual ~DtMplpOutpChannel();
private:
DtMplpOutpChannel(const DtMplpOutpChannel&);
public:
virtual bool IsAttached(void);
public:
virtual DTAPI_RESULT AttachToPort(DtDevice* pDtDvc, int Port, bool ProbeOnly=false);
virtual DTAPI_RESULT ClearFifo(void);
virtual DTAPI_RESULT ClearFlags(int Latched);
virtual DTAPI_RESULT ClearSfnErrors();
virtual DTAPI_RESULT Detach(int DetachMode);
virtual DTAPI_RESULT GetAttribute(int AttrId, int& AttrValue);
virtual DTAPI_RESULT GetAttribute(int AttrId, DtModPars& ModParVals, int& AttrValue);
virtual DTAPI_RESULT GetDescriptor(DtHwFuncDesc& HwFunDesc);
virtual DTAPI_RESULT GetExtClkFreq(int& ExtClkFreq);
virtual DTAPI_RESULT GetFailsafeAlive(bool& Alive);
virtual DTAPI_RESULT GetFailsafeConfig(bool& Enable, int& Timeout);
virtual DTAPI_RESULT GetFifoLoad(int& FifoLoad, int SubChan=0);
virtual DTAPI_RESULT GetFifoSize(int& FifoSize);
virtual DTAPI_RESULT GetFifoSizeMax(int& FifoSizeMax);
virtual DTAPI_RESULT GetFifoSizeTyp(int& FifoSizeTyp);
virtual DTAPI_RESULT GetFlags(int& Status, int& Latched);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0);
virtual DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0, __int64& ParXtra1);
virtual DTAPI_RESULT GetIpPars(DtIpPars* pIpPars);
virtual DTAPI_RESULT GetMaxFifoSize(int& MaxFifoSize);
virtual DTAPI_RESULT GetModControl(int& ModType, int& CodeRate,
int& ParXtra1, int& ParXtra2, void*& pXtraPars);
virtual DTAPI_RESULT GetOutputLevel(int& LeveldBm);
virtual DTAPI_RESULT GetRfControl(__int64& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetRfControl(int& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetRfControl(double& RfFreq, int& LockStatus);
virtual DTAPI_RESULT GetSfnMaxTimeDiff(int& TimeDiff);
virtual DTAPI_RESULT GetSfnModDelay(int& ModDelay);
virtual DTAPI_RESULT GetSfnStatus(int& Status, int& Error);
virtual DTAPI_RESULT GetSpiClk(int& SpiClk);
virtual DTAPI_RESULT GetTargetId(int& Present, int& TargetId);
virtual DTAPI_RESULT GetTsRateBps(int& TsRate);
virtual DTAPI_RESULT GetTsRateBps(DtFractionInt& TsRate);
virtual DTAPI_RESULT GetTxControl(int& TxControl);
virtual DTAPI_RESULT GetTxMode(int& TxMode, int& TxStuffMode);
virtual DTAPI_RESULT LedControl(int LedControl);
virtual DTAPI_RESULT Reset(int ResetMode);
virtual DTAPI_RESULT SetChannelModelling(bool CmEnable, DtCmPars& CmPars);
virtual DTAPI_RESULT SetCustomRollOff(bool Enable, DtFilterPars& Filter);
virtual DTAPI_RESULT SetFailsafeConfig(bool Enable, int Timeout = 0);
virtual DTAPI_RESULT SetFailsafeAlive();
virtual DTAPI_RESULT SetFifoSize(int FifoSize);
virtual DTAPI_RESULT SetFifoSizeMax(void);
virtual DTAPI_RESULT SetFifoSizeTyp(void);
virtual DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
virtual DTAPI_RESULT SetIpPars(DtIpPars* pIpPars);
virtual DTAPI_RESULT SetIsdbtCaptFile(void* IsdbtFile);
virtual DTAPI_RESULT SetModControl(DtCmmbPars&);
virtual DTAPI_RESULT SetModControl(DtDvbC2Pars&);
virtual DTAPI_RESULT SetModControl(DtDvbCidPars&);
virtual DTAPI_RESULT SetModControl(DtDvbS2Pars&);
virtual DTAPI_RESULT SetModControl(DtDvbT2Pars&);
virtual DTAPI_RESULT SetModControl(DtIqDirectPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbsPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbtPars&);
virtual DTAPI_RESULT SetModControl(DtIsdbTmmPars&);
virtual DTAPI_RESULT SetModControl(int ModType, int ParXtra0, int ParXtra1,
int ParXtra2);
virtual DTAPI_RESULT SetModControl(unsigned char*);
virtual DTAPI_RESULT SetMultiModConfig(int NumSubChan, int FreqSpacing);
virtual DTAPI_RESULT SetOutputLevel(int LeveldBm);
virtual DTAPI_RESULT SetPhaseNoiseControl(DtPhaseNoisePars& PnPars);
virtual DTAPI_RESULT SetPower(int Power);
virtual DTAPI_RESULT SetRfControl(__int64 RfFreq);
virtual DTAPI_RESULT SetRfControl(double RfFreq);
virtual DTAPI_RESULT SetRfControl(int RfFreq);
virtual DTAPI_RESULT SetRfMode(int RfMode);
virtual DTAPI_RESULT SetRfMode(int Sel, int Mode);
virtual DTAPI_RESULT SetSfnAllowedTimeDiff(int TimeDiff);
virtual DTAPI_RESULT SetSfnControl(int SnfMode, int TimeOffset);
virtual DTAPI_RESULT SetSnr(int Mode, int Snr);
virtual DTAPI_RESULT SetSpiClk(int SpiClk);
virtual DTAPI_RESULT SetTsRateBps(int TsRate);
virtual DTAPI_RESULT SetTsRateBps(DtFractionInt TsRate);
virtual DTAPI_RESULT SetTsRateRatio(int TsRate, int ClockRef);
virtual DTAPI_RESULT SetTxControl(int TxControl);
virtual DTAPI_RESULT SetTxMode(int TxMode, int TxStuffMode);
virtual DTAPI_RESULT SetTxPolarity(int TxPolarity);
virtual DTAPI_RESULT Write(char* pBuffer, int NumBytesToWrite, int SubChan=0);
virtual DTAPI_RESULT GetModBufLoads(bool&, int&, int&, int&);
public:
virtual DTAPI_RESULT AttachVirtual(DtDevice* pDtDvc,
bool (*pFunc)(void*, DtVirtualOutData*), void* pOpaque);
virtual DTAPI_RESULT GetMplpFifoFree(int FifoIdx, int& FifoFree);
virtual DTAPI_RESULT GetMplpFifoLoad(int FifoIdx, int& FifoLoad);
virtual DTAPI_RESULT GetMplpFifoSize(int FifoIdx, int& FifoSize);
virtual DTAPI_RESULT GetMplpModStatus(DtDvbC2ModStatus* pMplpModStat);
virtual DTAPI_RESULT GetMplpModStatus(DtDvbS2ModStatus* pMplpModStat);
virtual DTAPI_RESULT GetMplpModStatus(DtDvbT2ModStatus* pMplpModStat);
virtual DTAPI_RESULT GetMplpModStatus(DtDvbT2ModStatus* pMplpModStat1,
DtDvbT2ModStatus* pMplpModStat2);
virtual DTAPI_RESULT SetMplpChannelModelling(bool CmEnable, DtCmPars&, int Chan=0);
virtual DTAPI_RESULT WriteMplp(int FifoIdx, char* pBuffer, int NumBytesToWrite);
virtual DTAPI_RESULT WriteMplpPacket(int FifoIdx, char* pPacket, int PacketSize);
private:
bool m_IsAttachedToVirtual;
MplpHelper* m_pMplpHelper;
};
#define DTAPI_INSTANT_DETACH 1
#define DTAPI_WAIT_UNTIL_SENT 2
#define DTAPI_EQUALISER_OFF 0
#define DTAPI_EQUALISER_ON 1
#define DTAPI_LED_OFF 0
#define DTAPI_LED_GREEN 1
#define DTAPI_LED_RED 2
#define DTAPI_LED_YELLOW 3
#define DTAPI_LED_BLUE 4
#define DTAPI_LED_HARDWARE 5
#define DTAPI_NOISE_DISABLED 0
#define DTAPI_NOISE_WNG_HW 1
#define DTAPI_POLARITY_AUTO 0
#define DTAPI_POLARITY_NORMAL 2
#define DTAPI_POLARITY_INVERT 3
#define DTAPI_POWER_OFF 0
#define DTAPI_POWER_ON 1
#define DTAPI_FIFO_RESET 0
#define DTAPI_FULL_RESET 1
#define DTAPI_RFPLL_LOCK1 1
#define DTAPI_RFPLL_LOCK2 2
#define DTAPI_RFPLL_LOCK3 4
#define DTAPI_RX_FIFO_OVF 0x0002
#define DTAPI_RX_SYNC_ERR 0x0004
#define DTAPI_RX_RATE_OVF 0x0008
#define DTAPI_RX_TARGET_ERR 0x0010
#define DTAPI_RX_LINK_ERR 0x0040
#define DTAPI_RX_DATA_ERR 0x0080
#define DTAPI_RX_DRV_BUF_OVF 0x0100
#define DTAPI_RX_SYNTAX_ERR 0x0200
#define DTAPI_SFN_IN_SYNC 0x0001
#define DTAPI_SFN_TOO_EARLY_ERR 0x0001
#define DTAPI_SFN_TOO_LATE_ERR 0x0002
#define DTAPI_SFN_ABSTIME_ERR 0x0004
#define DTAPI_SFN_DISCTIME_ERR 0x0008
#define DTAPI_SFN_NOTIME_ERR 0x0010
#define DTAPI_SFN_START_ERR 0x0020
#define DTAPI_SFN_MODE_DISABLED 0x0000
#define DTAPI_SFN_MODE_AT_1PPS 0x0001
#define DTAPI_SFN_MODE_IQPCK 0x0002
#define DTAPI_SFN_MODE_DVBT_MIP 0x0003
#define DTAPI_SFN_MODE_T2MI 0x0004
#define DTAPI_TX_FIFO_UFL 0x0002
#define DTAPI_TX_SYNC_ERR 0x0004
#define DTAPI_TX_READBACK_ERR 0x0008
#define DTAPI_TX_TARGET_ERR 0x0010
#define DTAPI_TX_MUX_OVF 0x0020
#define DTAPI_TX_FIFO_OVF 0x0020
#define DTAPI_TX_LINK_ERR 0x0040
#define DTAPI_TX_DATA_ERR 0x0080
#define DTAPI_TX_CPU_UFL 0x0100
#define DTAPI_TX_DMA_UFL 0x0200
#define DTAPI_NO_CONNECTION 0
#define DTAPI_DVB_SPI_SINK 1
#define DTAPI_DVB_SPI_SOURCE 1
#define DTAPI_TARGET_PRESENT 2
#define DTAPI_TARGET_UNKNOWN 3
#define DTAPI_TXCTRL_IDLE 1
#define DTAPI_TXCTRL_HOLD 2
#define DTAPI_TXCTRL_SEND 3
#define DTAPI_TXMODE_TS 0x10
#define DTAPI_TXMODE_TS_MODE_BITS 0x0F
#define DTAPI_TXMODE_188 (DTAPI_TXMODE_TS | 0x01)
#define DTAPI_TXMODE_192 (DTAPI_TXMODE_TS | 0x02)
#define DTAPI_TXMODE_204 (DTAPI_TXMODE_TS | 0x03)
#define DTAPI_TXMODE_ADD16 (DTAPI_TXMODE_TS | 0x04)
#define DTAPI_TXMODE_MIN16 (DTAPI_TXMODE_TS | 0x05)
#define DTAPI_TXMODE_IPRAW (DTAPI_TXMODE_TS | 0x06)
#define DTAPI_TXMODE_RAW (DTAPI_TXMODE_TS | 0x07)
#define DTAPI_TXMODE_RAWASI (DTAPI_TXMODE_TS | 0x08)
#define DTAPI_TXMODE_TS_MASK (DTAPI_TXMODE_TS | DTAPI_TXMODE_TS_MODE_BITS)
#define DTAPI_TXMODE_BURST 0x20
#define DTAPI_TXMODE_TXONTIME 0x40
#define DTAPI_TXMODE_SDI 0x1000
#define DTAPI_TXMODE_SDI_MODE_BITS 0x0F00
#define DTAPI_TXMODE_SDI_FULL (DTAPI_TXMODE_SDI | 0x100)
#define DTAPI_TXMODE_SDI_ACTVID (DTAPI_TXMODE_SDI | 0x200)
#define DTAPI_TXMODE_SDI_MASK (DTAPI_TXMODE_SDI | DTAPI_TXMODE_SDI_MODE_BITS)
#define DTAPI_TXMODE_SDI_HUFFMAN 0x00002000
#define DTAPI_TXMODE_SDI_10B 0x00004000
#define DTAPI_TXMODE_SDI_16B 0x00008000
#define DTAPI_TXMODE_SDI_10B_NBO 0x00010000
#define DTAPI_TXSTUFF_MODE_OFF 0
#define DTAPI_TXSTUFF_MODE_ON 1
#define DTAPI_TXPOL_NORMAL 0
#define DTAPI_TXPOL_INVERTED 1
#define DTAPI_UPCONV_MODE 0
#define DTAPI_UPCONV_MODE_MSK 0xF
#define DTAPI_UPCONV_NORMAL 0
#define DTAPI_UPCONV_MUTE 1
#define DTAPI_UPCONV_CW 2
#define DTAPI_UPCONV_CWI 3
#define DTAPI_UPCONV_CWQ 4
#define DTAPI_UPCONV_SPECINV 0x100
#define DTAPI_USB_FULL_SPEED 0
#define DTAPI_USB_HIGH_SPEED 1
#define DTAPI_USB_SUPER_SPEED 2
#define DTAPI_PCIE_GEN_UNKNOWN 0
#define DTAPI_PCIE_GEN1 1
#define DTAPI_PCIE_GEN2 2
#define DTAPI_PCIE_GEN3 3
#define DTAPI_MOD_DVBS_QPSK 0
#define DTAPI_MOD_DVBS_BPSK 1
#define DTAPI_MOD_QAM4 3
#define DTAPI_MOD_QAM16 4
#define DTAPI_MOD_QAM32 5
#define DTAPI_MOD_QAM64 6
#define DTAPI_MOD_QAM128 7
#define DTAPI_MOD_QAM256 8
#define DTAPI_MOD_DVBT 9
#define DTAPI_MOD_ATSC 10
#define DTAPI_MOD_DVBT2 11
#define DTAPI_MOD_ISDBT 12
#define DTAPI_MOD_ISDBS 13
#define DTAPI_MOD_IQDIRECT 15
#define DTAPI_MOD_IQ_2131 16
#define DTAPI_MOD_DVBS2_QPSK 32
#define DTAPI_MOD_DVBS2_8PSK 33
#define DTAPI_MOD_DVBS2_16APSK 34
#define DTAPI_MOD_DVBS2_32APSK 35
#define DTAPI_MOD_DVBS2_L3 36
#define DTAPI_MOD_DVBS2 37
#define DTAPI_MOD_DMBTH 48
#define DTAPI_MOD_ADTBT 49
#define DTAPI_MOD_CMMB 50
#define DTAPI_MOD_T2MI 51
#define DTAPI_MOD_DVBC2 52
#define DTAPI_MOD_DAB 53
#define DTAPI_MOD_QAM_AUTO 54
#define DTAPI_MOD_ATSC_MH 55
#define DTAPI_MOD_ISDBTMM 56
#define DTAPI_MOD_S2X_QPSK_VLSNR 57
#define DTAPI_MOD_S2X_BPSK_VLSNR 58
#define DTAPI_MOD_S2X_BPSK_S_VLSNR 59
#define DTAPI_MOD_S2X_8APSK_L 60
#define DTAPI_MOD_S2X_16APSK_L 61
#define DTAPI_MOD_S2X_32APSK_L 62
#define DTAPI_MOD_S2X_64APSK 63
#define DTAPI_MOD_S2X_64APSK_L 64
#define DTAPI_MOD_S2X_128APSK 65
#define DTAPI_MOD_S2X_256APSK 66
#define DTAPI_MOD_S2X_256APSK_L 67
#define DTAPI_MOD_DVBS2X_L3 68
#define DTAPI_MOD_TYPE_AUTO -1
#define DTAPI_MOD_TYPE_UNK -1
#define DTAPI_MOD_SYMRATE_AUTO -1
#define DTAPI_MOD_SYMRATE_UNK -1
#define DTAPI_MOD_ATSC_VSB8 0x00000000
#define DTAPI_MOD_ATSC_VSB16 0x00000001
#define DTAPI_MOD_ATSC_VSB_AUTO 0x00000003
#define DTAPI_MOD_ATSC_VSB_UNK 0x00000003
#define DTAPI_MOD_ATSC_VSB_MSK 0x00000003
#define DTAPI_MOD_DTMB_5MHZ 0x00000001
#define DTAPI_MOD_DTMB_6MHZ 0x00000002
#define DTAPI_MOD_DTMB_7MHZ 0x00000003
#define DTAPI_MOD_DTMB_8MHZ 0x00000004
#define DTAPI_MOD_DTMB_BW_AUTO 0x0000000F
#define DTAPI_MOD_DTMB_BW_UNK 0x0000000F
#define DTAPI_MOD_DTMB_BW_MSK 0x0000000F
#define DTAPI_MOD_DTMB_0_4 0x00000100
#define DTAPI_MOD_DTMB_0_6 0x00000200
#define DTAPI_MOD_DTMB_0_8 0x00000300
#define DTAPI_MOD_DTMB_RATE_AUTO 0x00000F00
#define DTAPI_MOD_DTMB_RATE_UNK 0x00000F00
#define DTAPI_MOD_DTMB_RATE_MSK 0x00000F00
#define DTAPI_MOD_DTMB_QAM4NR 0x00001000
#define DTAPI_MOD_DTMB_QAM4 0x00002000
#define DTAPI_MOD_DTMB_QAM16 0x00003000
#define DTAPI_MOD_DTMB_QAM32 0x00004000
#define DTAPI_MOD_DTMB_QAM64 0x00005000
#define DTAPI_MOD_DTMB_CO_AUTO 0x0000F000
#define DTAPI_MOD_DTMB_CO_UNK 0x0000F000
#define DTAPI_MOD_DTMB_CO_MSK 0x0000F000
#define DTAPI_MOD_DTMB_PN420 0x00010000
#define DTAPI_MOD_DTMB_PN595 0x00020000
#define DTAPI_MOD_DTMB_PN945 0x00030000
#define DTAPI_MOD_DTMB_PN_AUTO 0x000F0000
#define DTAPI_MOD_DTMB_PN_UNK 0x000F0000
#define DTAPI_MOD_DTMB_PN_MSK 0x000F0000
#define DTAPI_MOD_DTMB_IL_1 0x00100000
#define DTAPI_MOD_DTMB_IL_2 0x00200000
#define DTAPI_MOD_DTMB_IL_AUTO 0x00F00000
#define DTAPI_MOD_DTMB_IL_UNK 0x00F00000
#define DTAPI_MOD_DTMB_IL_MSK 0x00F00000
#define DTAPI_MOD_DTMB_NO_PILOTS 0x01000000
#define DTAPI_MOD_DTMB_PILOTS 0x02000000
#define DTAPI_MOD_DTMB_PIL_AUTO 0x0F000000
#define DTAPI_MOD_DTMB_PIL_UNK 0x0F000000
#define DTAPI_MOD_DTMB_PIL_MSK 0x0F000000
#define DTAPI_MOD_DTMB_NO_FRM_NO 0x10000000
#define DTAPI_MOD_DTMB_USE_FRM_NO 0x20000000
#define DTAPI_MOD_DTMB_UFRM_AUTO 0xF0000000
#define DTAPI_MOD_DTMB_UFRM_UNK 0xF0000000
#define DTAPI_MOD_DTMB_UFRM_MSK 0xF0000000
#define DTAPI_MOD_1_2 0x0
#define DTAPI_MOD_2_3 0x1
#define DTAPI_MOD_3_4 0x2
#define DTAPI_MOD_4_5 0x3
#define DTAPI_MOD_5_6 0x4
#define DTAPI_MOD_6_7 0x5
#define DTAPI_MOD_7_8 0x6
#define DTAPI_MOD_1_4 0x7
#define DTAPI_MOD_1_3 0x8
#define DTAPI_MOD_2_5 0x9
#define DTAPI_MOD_3_5 0xA
#define DTAPI_MOD_8_9 0xB
#define DTAPI_MOD_9_10 0xC
#define DTAPI_MOD_CR_AUTO 0xF
#define DTAPI_MOD_CR_UNK 0xF
#define DTAPI_MOD_1_5 0x10
#define DTAPI_MOD_2_9 0x11
#define DTAPI_MOD_11_45 0x12
#define DTAPI_MOD_4_15 0x13
#define DTAPI_MOD_13_45 0x14
#define DTAPI_MOD_14_45 0x15
#define DTAPI_MOD_9_20 0x16
#define DTAPI_MOD_7_15 0x17
#define DTAPI_MOD_8_15 0x18
#define DTAPI_MOD_11_20 0x19
#define DTAPI_MOD_5_9 0x1A
#define DTAPI_MOD_26_45 0x1B
#define DTAPI_MOD_28_45 0x1C
#define DTAPI_MOD_23_36 0x1D
#define DTAPI_MOD_29_45 0x1E
#define DTAPI_MOD_31_45 0x1F
#define DTAPI_MOD_25_36 0x20
#define DTAPI_MOD_32_45 0x21
#define DTAPI_MOD_13_18 0x22
#define DTAPI_MOD_11_15 0x23
#define DTAPI_MOD_7_9 0x24
#define DTAPI_MOD_77_90 0x25
#define DTAPI_MOD_S_S2_SPECNONINV 0x00
#define DTAPI_MOD_S_S2_SPECINV 0x10
#define DTAPI_MOD_S_S2_SPECINV_AUTO 0x30
#define DTAPI_MOD_S_S2_SPECINV_UNK 0x30
#define DTAPI_MOD_S_S2_SPECINV_MSK 0x30
#define DTAPI_MOD_S2_NOPILOTS 0x00
#define DTAPI_MOD_S2_PILOTS 0x01
#define DTAPI_MOD_S2_PILOTS_AUTO 0x03
#define DTAPI_MOD_S2_PILOTS_UNK 0x03
#define DTAPI_MOD_S2_PILOTS_MSK 0x03
#define DTAPI_MOD_S2_LONGFRM 0x00
#define DTAPI_MOD_S2_MEDIUMFRM 0x04
#define DTAPI_MOD_S2_SHORTFRM 0x08
#define DTAPI_MOD_S2_FRM_AUTO 0x0C
#define DTAPI_MOD_S2_FRM_UNK 0x0C
#define DTAPI_MOD_S2_FRM_MSK 0x0C
#define DTAPI_MOD_S2_CONST_AUTO 0x00
#define DTAPI_MOD_S2_CONST_E_1 0x40
#define DTAPI_MOD_S2_CONST_R_1 0x80
#define DTAPI_MOD_S2_CONST_MSK 0xC0
#define DTAPI_MOD_ISDBS_STREAMTYPE_RAW 0x00
#define DTAPI_MOD_ISDBS_STREAMTYPE_B15 0x01
#define DTAPI_MOD_ISDBS_STREAMTYPE_AUTO 0x07
#define DTAPI_MOD_ISDBS_STREAMTYPE_MASK 0x07
#define DTAPI_MOD_DVBT_5MHZ 0x00000001
#define DTAPI_MOD_DVBT_6MHZ 0x00000002
#define DTAPI_MOD_DVBT_7MHZ 0x00000003
#define DTAPI_MOD_DVBT_8MHZ 0x00000004
#define DTAPI_MOD_DVBT_BW_UNK 0x0000000F
#define DTAPI_MOD_DVBT_BW_MSK 0x0000000F
#define DTAPI_MOD_DVBT_QPSK 0x00000010
#define DTAPI_MOD_DVBT_QAM16 0x00000020
#define DTAPI_MOD_DVBT_QAM64 0x00000030
#define DTAPI_MOD_DVBT_CO_AUTO 0x000000F0
#define DTAPI_MOD_DVBT_CO_UNK 0x000000F0
#define DTAPI_MOD_DVBT_CO_MSK 0x000000F0
#define DTAPI_MOD_DVBT_G_1_32 0x00000100
#define DTAPI_MOD_DVBT_G_1_16 0x00000200
#define DTAPI_MOD_DVBT_G_1_8 0x00000300
#define DTAPI_MOD_DVBT_G_1_4 0x00000400
#define DTAPI_MOD_DVBT_GU_AUTO 0x00000F00
#define DTAPI_MOD_DVBT_GU_UNK 0x00000F00
#define DTAPI_MOD_DVBT_GU_MSK 0x00000F00
#define DTAPI_MOD_DVBT_HARCHY_NONE 0x00000000
#define DTAPI_MOD_DVBT_HARCHY_A1 0x01000000
#define DTAPI_MOD_DVBT_HARCHY_A2 0x02000000
#define DTAPI_MOD_DVBT_HARCHY_A4 0x03000000
#define DTAPI_MOD_DVBT_HARCHY_MSK 0x0F000000
#define DTAPI_MOD_DVBT_INDEPTH 0x00001000
#define DTAPI_MOD_DVBT_NATIVE 0x00002000
#define DTAPI_MOD_DVBT_IL_AUTO 0x0000F000
#define DTAPI_MOD_DVBT_IL_UNK 0x0000F000
#define DTAPI_MOD_DVBT_IL_MSK 0x0000F000
#define DTAPI_MOD_DVBT_2K 0x00010000
#define DTAPI_MOD_DVBT_4K 0x00020000
#define DTAPI_MOD_DVBT_8K 0x00030000
#define DTAPI_MOD_DVBT_MD_AUTO 0x000F0000
#define DTAPI_MOD_DVBT_MD_UNK 0x000F0000
#define DTAPI_MOD_DVBT_MD_MSK 0x000F0000
#define DTAPI_MOD_DVBT_S48_OFF 0x00000000
#define DTAPI_MOD_DVBT_S48 0x00100000
#define DTAPI_MOD_DVBT_S48_MSK 0x00100000
#define DTAPI_MOD_DVBT_S49_OFF 0x00000000
#define DTAPI_MOD_DVBT_S49 0x00200000
#define DTAPI_MOD_DVBT_S49_MSK 0x00200000
#define DTAPI_MOD_DVBT_ENA4849 0x00000000
#define DTAPI_MOD_DVBT_DIS4849 0x00400000
#define DTAPI_MOD_DVBT_4849_MSK 0x00400000
#define DTAPI_MOD_INTERPOL_RAW 0
#define DTAPI_MOD_INTERPOL_OFDM 1
#define DTAPI_MOD_INTERPOL_QAM 2
#define DTAPI_MOD_IQPCK_AUTO 0x00000000
#define DTAPI_MOD_IQPCK_NONE 0x00000001
#define DTAPI_MOD_IQPCK_PCKD 0x00000002
#define DTAPI_MOD_IQPCK_12B 0x00000003
#define DTAPI_MOD_IQPCK_10B 0x00000004
#define DTAPI_MOD_IQPCK_UNK 0x000000FF
#define DTAPI_MOD_IQPCK_MSK 0x000000FF
#define DTAPI_MOD_ROLLOFF_AUTO 0x00000000
#define DTAPI_MOD_ROLLOFF_NONE 0x00000100
#define DTAPI_MOD_ROLLOFF_5 0x00000200
#define DTAPI_MOD_ROLLOFF_10 0x00000300
#define DTAPI_MOD_ROLLOFF_15 0x00000400
#define DTAPI_MOD_ROLLOFF_20 0x00000500
#define DTAPI_MOD_ROLLOFF_25 0x00000600
#define DTAPI_MOD_ROLLOFF_35 0x00000700
#define DTAPI_MOD_LPF_0_614 0x00000800
#define DTAPI_MOD_LPF_0_686 0x00000900
#define DTAPI_MOD_LPF_0_754 0x00000A00
#define DTAPI_MOD_LPF_0_833 0x00000B00
#define DTAPI_MOD_LPF_0_850 0x00000C00
#define DTAPI_MOD_ROLLOFF_UNK 0x0000FF00
#define DTAPI_MOD_ROLLOFF_MSK 0x0000FF00
#define DTAPI_MOD_T2MI_PID1_MSK 0x1FFF
#define DTAPI_MOD_T2MI_PID1_SHFT 0
#define DTAPI_MOD_T2MI_PID2_MSK 0x1FFF0000
#define DTAPI_MOD_T2MI_PID2_SHFT 16
#define DTAPI_MOD_T2MI_MULT_DIS 0x00000000
#define DTAPI_MOD_T2MI_MULT_ENA 0x20000000
#define DTAPI_MOD_T2MI_MULT_MSK 0x20000000
#define DTAPI_MOD_J83_MSK 0x000F
#define DTAPI_MOD_J83_UNK 0x000F
#define DTAPI_MOD_J83_AUTO 0x000F
#define DTAPI_MOD_J83_A 0x0002
#define DTAPI_MOD_J83_B 0x0003
#define DTAPI_MOD_J83_C 0x0001
#define DTAPI_MOD_QAMB_I128_J1D 0x1
#define DTAPI_MOD_QAMB_I64_J2 0x3
#define DTAPI_MOD_QAMB_I32_J4 0x5
#define DTAPI_MOD_QAMB_I16_J8 0x7
#define DTAPI_MOD_QAMB_I8_J16 0x9
#define DTAPI_MOD_QAMB_I128_J1 0x0
#define DTAPI_MOD_QAMB_I128_J2 0x2
#define DTAPI_MOD_QAMB_I128_J3 0x4
#define DTAPI_MOD_QAMB_I128_J4 0x6
#define DTAPI_MOD_QAMB_I128_J5 0x8
#define DTAPI_MOD_QAMB_I128_J6 0xA
#define DTAPI_MOD_QAMB_I128_J7 0xC
#define DTAPI_MOD_QAMB_I128_J8 0xE
#define DTAPI_MOD_QAMB_IL_UNK 0xF
#define DTAPI_MOD_QAMB_IL_AUTO 0xF
#define DTAPI_MOD_QAMB_IL_MSK 0xF
#define DTAPI_SDI_TOC_ENTRY_UNKNOWN 0
#define DTAPI_SDI_TOC_ENTRY_ACTVID 1
#define DTAPI_SDI_TOC_ENTRY_HANC 2
#define DTAPI_SDI_TOC_ENTRY_VANC 3
class DtSdiTocEntry
{
friend class DtSdiUtility;
public:
inline int AncDataBlockNum() const
{
if (AncType() != 1) return -1;
else return m_SdidOrDbn;
}
inline int AncDataId() const { return m_Did; }
inline int AncNumUserWords() const { return m_NumUserWords; }
inline int AncSecDataId() const
{
if (AncType() != 2) return -1;
else return m_SdidOrDbn;
}
inline int AncType() const { return m_AncType; }
inline int Field() const { return m_Field; }
inline int Line() const { return m_Line; }
inline int NumSymbols() const { return m_NumSymbols; }
inline int StartOffset() const { return m_StartOffset; }
inline int TocType() const { return m_TocType; }
protected:
int m_TocType;
int m_Line;
int m_Field;
int m_StartOffset;
int m_NumSymbols;
int m_AncType;
int m_Did;
int m_SdidOrDbn;
int m_NumUserWords;
public:
DtSdiTocEntry() : m_TocType(DTAPI_SDI_TOC_ENTRY_UNKNOWN), m_Line(0), m_Field(0),
m_StartOffset(0), m_NumSymbols(0) {}
virtual ~DtSdiTocEntry() {};
};
class DtSdi
{
friend class DtSdiUtility;
public:
DtSdi();
virtual ~DtSdi();
public:
DTAPI_RESULT ConvertFrame(unsigned int* pInFrame, int& InFrameSize,
int InFrameFormat, unsigned int* pOutFrame, int& OutFrameSize, int OutFrameFormat);
DTAPI_RESULT CreateBlackFrame(unsigned int* pFrame, int& FrameSize, int FrameFormat);
DTAPI_RESULT GetActiveVideo(const DtSdiTocEntry& TocEntry,
unsigned short* pVideo, int& NumSamples);
DTAPI_RESULT GetActiveVideo(unsigned short* pVideo, int& NumSamples,
int Field, int Stride=-1);
DTAPI_RESULT GetAncillaryData(const DtSdiTocEntry& TocEntry,
unsigned short* pData, int& NumSamples);
DTAPI_RESULT GetAudio(int AudioGroup, int& Channel,
unsigned short* pAudio, int& NumSamples);
DTAPI_RESULT GetTableOfContents(const DtSdiTocEntry** ppToc, int& NumTocEntries);
DTAPI_RESULT ParseFrame(const unsigned int* pFrame, int FrameSize, int FrameFormat,
int ParseFlags, const DtSdiTocEntry** ppToc, int& NumTocEntries);
protected:
DtSdiUtility* m_pSdiUtil;
};
#define DTAPI_SDI_ANC_TYPE1 1
#define DTAPI_SDI_ANC_TYPE2 2
#define DTAPI_SDI_PARSE_ACTVID 0x0001
#define DTAPI_SDI_PARSE_HBLANK 0x0002
#define DTAPI_SDI_PARSE_VBLANK 0x0004
#define DTAPI_SDI_PARSE_BLANK (DTAPI_SDI_PARSE_HBLANK | DTAPI_SDI_PARSE_VBLANK)
#define DTAPI_SDI_PARSE_ALL (DTAPI_SDI_PARSE_ACTVID | DTAPI_SDI_PARSE_BLANK)
#define DTAPI_SDI_FIELD1 1
#define DTAPI_SDI_FIELD2 2
#define DTAPI_SDI_AUDIO_GROUP1 0x2FF
#define DTAPI_SDI_AUDIO_GROUP2 0x1FD
#define DTAPI_SDI_AUDIO_GROUP3 0x1FB
#define DTAPI_SDI_AUDIO_GROUP4 0x2F9
#define DTAPI_SDI_AUDIO_CHAN1 0x01
#define DTAPI_SDI_AUDIO_CHAN2 0x02
#define DTAPI_SDI_AUDIO_CHAN3 0x04
#define DTAPI_SDI_AUDIO_CHAN4 0x08
#define DTAPI_SDI_AUDIO_CH_PAIR1 (DTAPI_SDI_AUDIO_CHAN1 | DTAPI_SDI_AUDIO_CHAN2)
#define DTAPI_SDI_AUDIO_CH_PAIR2 (DTAPI_SDI_AUDIO_CHAN3 | DTAPI_SDI_AUDIO_CHAN4)
#define DTAPI_SDI_AUDIO_CH_MASK (DTAPI_SDI_AUDIO_CH_PAIR1 | DTAPI_SDI_AUDIO_CH_PAIR2)
#define DTAPI_SDI_FULL 0x001
#define DTAPI_SDI_ACTVID 0x002
#define DTAPI_SDI_HUFFMAN 0x004
#define DTAPI_SDI_625 0x008
#define DTAPI_SDI_525 0x010
#define DTAPI_SDI_8B 0x020
#define DTAPI_SDI_10B 0x040
#define DTAPI_SDI_16B 0x080
#define DTAPI_SDI_10B_NBO 0x100
#define DTAPI_SDI_BIT_MASK 0x1E0
#define DTAPI_VIDSTD_UNKNOWN -1
#define DTAPI_VIDSTD_TS 0
#define DTAPI_VIDSTD_525I59_94 DTAPI_IOCONFIG_525I59_94
#define DTAPI_VIDSTD_625I50 DTAPI_IOCONFIG_625I50
#define DTAPI_VIDSTD_720P23_98 DTAPI_IOCONFIG_720P23_98
#define DTAPI_VIDSTD_720P24 DTAPI_IOCONFIG_720P24
#define DTAPI_VIDSTD_720P25 DTAPI_IOCONFIG_720P25
#define DTAPI_VIDSTD_720P29_97 DTAPI_IOCONFIG_720P29_97
#define DTAPI_VIDSTD_720P30 DTAPI_IOCONFIG_720P30
#define DTAPI_VIDSTD_720P50 DTAPI_IOCONFIG_720P50
#define DTAPI_VIDSTD_720P59_94 DTAPI_IOCONFIG_720P59_94
#define DTAPI_VIDSTD_720P60 DTAPI_IOCONFIG_720P60
#define DTAPI_VIDSTD_1080P23_98 DTAPI_IOCONFIG_1080P23_98
#define DTAPI_VIDSTD_1080P24 DTAPI_IOCONFIG_1080P24
#define DTAPI_VIDSTD_1080P25 DTAPI_IOCONFIG_1080P25
#define DTAPI_VIDSTD_1080P29_97 DTAPI_IOCONFIG_1080P29_97
#define DTAPI_VIDSTD_1080P30 DTAPI_IOCONFIG_1080P30
#define DTAPI_VIDSTD_1080PSF23_98 DTAPI_IOCONFIG_1080PSF23_98
#define DTAPI_VIDSTD_1080PSF24 DTAPI_IOCONFIG_1080PSF24
#define DTAPI_VIDSTD_1080PSF25 DTAPI_IOCONFIG_1080PSF25
#define DTAPI_VIDSTD_1080PSF29_97 DTAPI_IOCONFIG_1080PSF29_97
#define DTAPI_VIDSTD_1080PSF30 DTAPI_IOCONFIG_1080PSF30
#define DTAPI_VIDSTD_1080I50 DTAPI_IOCONFIG_1080I50
#define DTAPI_VIDSTD_1080I59_94 DTAPI_IOCONFIG_1080I59_94
#define DTAPI_VIDSTD_1080I60 DTAPI_IOCONFIG_1080I60
#define DTAPI_VIDSTD_1080P50 DTAPI_IOCONFIG_1080P50
#define DTAPI_VIDSTD_1080P50B DTAPI_IOCONFIG_1080P50B
#define DTAPI_VIDSTD_1080P59_94 DTAPI_IOCONFIG_1080P59_94
#define DTAPI_VIDSTD_1080P59_94B DTAPI_IOCONFIG_1080P59_94B
#define DTAPI_VIDSTD_1080P60 DTAPI_IOCONFIG_1080P60
#define DTAPI_VIDSTD_1080P60B DTAPI_IOCONFIG_1080P60B
#define DTAPI_VIDSTD_BASE 1000
#define DTAPI_VIDSTD_2160P50 (DTAPI_VIDSTD_BASE + 0)
#define DTAPI_VIDSTD_2160P50B (DTAPI_VIDSTD_BASE + 1)
#define DTAPI_VIDSTD_2160P59_94 (DTAPI_VIDSTD_BASE + 2)
#define DTAPI_VIDSTD_2160P59_94B (DTAPI_VIDSTD_BASE + 3)
#define DTAPI_VIDSTD_2160P60 (DTAPI_VIDSTD_BASE + 4)
#define DTAPI_VIDSTD_2160P60B (DTAPI_VIDSTD_BASE + 5)
#define DTAPI_VIDSTD_2160P23_98 (DTAPI_VIDSTD_BASE + 6)
#define DTAPI_VIDSTD_2160P24 (DTAPI_VIDSTD_BASE + 7)
#define DTAPI_VIDSTD_2160P25 (DTAPI_VIDSTD_BASE + 8)
#define DTAPI_VIDSTD_2160P29_97 (DTAPI_VIDSTD_BASE + 9)
#define DTAPI_VIDSTD_2160P30 (DTAPI_VIDSTD_BASE + 10)
#define DTAPI_VIDLNK_4K_SMPTE425 0
#define DTAPI_VIDLNK_4K_SMPTE425B 1
#define DTAPI_SDI_AUDIO_SMPTE272A 1
#define DTAPI_SDI_AUDIO_PCM16 0
#define DTAPI_SDI_AUDIO_PCM24 1
#define DTAPI_SDI_AUDIO_PCM32 2
#define DTAPI_SDI_HANC 0x02
#define DTAPI_SDI_VANC 0x04
#define DTAPI_SDI_ANC_MASK (DTAPI_SDI_HANC | DTAPI_SDI_VANC)
#define DTAPI_SDI_CHROM 0x01
#define DTAPI_SDI_LUM 0x02
#define DTAPI_SDI_STREAM_MASK (DTAPI_SDI_CHROM | DTAPI_SDI_LUM)
#define DTAPI_ANC_MARK 0x0001
#define DTAPI_ANC_DELETE 0x0002
#define DTAPI_SCALING_OFF 1
#define DTAPI_SCALING_1_4 2
#define DTAPI_SCALING_1_16 3
#define DTAPI_SYMFLT_ALL 0
#define DTAPI_SYMFLT_LUM 1
#define DTAPI_SYMFLT_CHROM 2
#define DTAPI_SYMFLT_SWAP 3
#define DTAPI_SYMFLT_RGB 4
#define DTAPI_ANCFLT_OFF 0
#define DTAPI_ANCFLT_HANC_ALL 1
#define DTAPI_ANCFLT_HANC_MIN 2
#define DTAPI_ANCFLT_VANC_ALL 3
#define DTAPI_ANCFLT_VANC_MIN 4
#define DTAPI_RXMODE_FRAMEBUFFER 0x10000
#define DTAPI_RXMODE_ANC (DTAPI_RXMODE_FRAMEBUFFER | 1)
#define DTAPI_RXMODE_RAW (DTAPI_RXMODE_FRAMEBUFFER | 2)
#define DTAPI_RXMODE_FULL (DTAPI_RXMODE_FRAMEBUFFER | 3)
#define DTAPI_RXMODE_FULL8 (DTAPI_RXMODE_FRAMEBUFFER | 4)
#define DTAPI_RXMODE_FULL8_SCALED4 (DTAPI_RXMODE_FRAMEBUFFER | 5)
#define DTAPI_RXMODE_FULL8_SCALED16 (DTAPI_RXMODE_FRAMEBUFFER | 6)
#define DTAPI_RXMODE_VIDEO (DTAPI_RXMODE_FRAMEBUFFER | 7)
#define DTAPI_RXMODE_VIDEO8 (DTAPI_RXMODE_FRAMEBUFFER | 8)
#define DTAPI_RXMODE_VIDEO8_SCALED4 (DTAPI_RXMODE_FRAMEBUFFER | 9)
#define DTAPI_RXMODE_VIDEO8_SCALED16 (DTAPI_RXMODE_FRAMEBUFFER | 10)
#define DTAPI_RXMODE_RAW8 (DTAPI_RXMODE_FRAMEBUFFER | 15)
#define DTAPI_RXMODE_FRMBUF_MASK 0x0F
class AncPacket
{
public:
AncPacket();
AncPacket(const AncPacket& s);
virtual ~AncPacket();
public:
int m_Did;
int m_SdidOrDbn;
int m_Dc;
int m_Cs;
unsigned short* m_pUdw;
int m_Line;
public:
void Create(unsigned short* pUserWords, int NumWords);
void Create(int NumWords=256);
void Destroy();
int Type() const { return (m_Did & 0x80)==0 ? 2 : 1; }
int Size() const { return m_Size; }
void operator = (const AncPacket& s);
private:
int m_Size;
};
class DtFrameBufTrPars
{
public:
enum ParsType { PT_VIDEO, PT_ANC, PT_RAW };
protected:
DtFrameBufTrPars(ParsType Type);
public:
virtual ~DtFrameBufTrPars();
public:
DTAPI_RESULT SetCommon(__int64 Frame, unsigned char* pBuf, int BufSize,
int DataFormat, int StartLine=1, int NumLines=-1);
ParsType GetType() const { return m_Type; }
virtual DtFrameBufTrPars* Clone() = 0;
public:
__int64 m_Frame;
unsigned char* m_pBuf;
int m_BufSize;
int m_StartLine;
int m_NumLines;
int m_DataFormat;
private:
ParsType m_Type;
};
class DtFrameBufTrParsVideo : public DtFrameBufTrPars
{
public:
DtFrameBufTrParsVideo(int Field, int Scaling=DTAPI_SCALING_OFF, int Stride=-1,
int SymFlt=DTAPI_SYMFLT_ALL);
virtual ~DtFrameBufTrParsVideo();
DtFrameBufTrParsVideo* Clone();
public:
int m_Field;
int m_Scaling;
int m_Stride;
int m_SymFlt;
};
class DtFrameBufTrParsAnc : public DtFrameBufTrPars
{
public:
DtFrameBufTrParsAnc(int HancVanc, int AncFlt=DTAPI_ANCFLT_OFF);
virtual ~DtFrameBufTrParsAnc();
DtFrameBufTrParsAnc* Clone();
public:
int m_HancVanc;
int m_AncFlt;
};
class DtFrameBufTrParsRaw : public DtFrameBufTrPars
{
public:
DtFrameBufTrParsRaw(int SymFlt=DTAPI_SYMFLT_ALL, int Stride=-1);
virtual ~DtFrameBufTrParsRaw();
DtFrameBufTrParsRaw* Clone();
public:
int m_SymFlt;
int m_Stride;
};
class DtFrameBuffer
{
public:
DtFrameBuffer();
virtual ~DtFrameBuffer();
private:
DtFrameBuffer(const DtFrameBuffer&);
public:
virtual DTAPI_RESULT AncAddAudio(__int64 Frame, unsigned char* pBuf,
int& BufSize, int Format, int Channels, int AudioGroup);
virtual DTAPI_RESULT AncAddAudioStatusWord(__int64 Frame, unsigned char Status[24],
int Channels, int AudioGroup);
DTAPI_DEPRECATED(virtual DTAPI_RESULT AncAddPacket(__int64 Frame,
AncPacket& AncPacket,
int Line, int HancVanc, int Stream),
"Deprecated (will be removed!): use overloaded AncAddPacket without "
"line argument, use AncPacket::m_Line instead");
virtual DTAPI_RESULT AncAddPacket(__int64 Frame, AncPacket& AncPacket,
int HancVanc, int Stream);
virtual DTAPI_RESULT AncClear(__int64 Frame, int HancVanc, int Stream);
virtual DTAPI_RESULT AncCommit(__int64 Frame);
virtual DTAPI_RESULT AncDelAudio(__int64 Frame, int AudioGroup, int Mode);
virtual DTAPI_RESULT AncDelPacket(__int64 Frame, int DID, int SDID, int StartLine,
int NumLines, int HancVanc, int Stream, int Mode);
virtual DTAPI_RESULT AncGetAudio(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat, int& Channels, int AudioGroup);
virtual DTAPI_RESULT AncGetPacket(__int64 Frame, int DID, int SDID,
AncPacket*, int& NumPackets, int HancVanc, int Stream);
virtual DTAPI_RESULT AncReadRaw(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat, int StartLine,
int NumLines, int HancVanc, bool EnableAncFilter = false);
virtual DTAPI_RESULT AncReadRaw(DtFrameBufTrParsAnc& TP);
virtual DTAPI_RESULT AncWriteRaw(__int64 Frame, unsigned char* pBuf,
int& BufSize, int Format, int StartLine,
int NumLines, int HancVanc, bool EnableAncFilter = false);
virtual DTAPI_RESULT AncWriteRaw(DtFrameBufTrParsAnc& TP);
virtual DTAPI_RESULT AttachToInput(DtDevice*, int Port);
virtual DTAPI_RESULT AttachToOutput(DtDevice*, int Port, int Delay);
virtual DTAPI_RESULT ClearFlags(int Latched);
virtual DTAPI_RESULT Detach();
virtual DTAPI_RESULT DetectIoStd(int& Value, int& SubValue);
virtual DTAPI_RESULT GetBufferInfo(DtBufferInfo&);
virtual DTAPI_RESULT GetCurFrame(__int64& CurFrame);
virtual DTAPI_RESULT GetFlags(int& Flags, int& Latched);
virtual DTAPI_RESULT GetFrameInfo(__int64 Frame, DtFrameInfo&);
virtual DTAPI_RESULT GetStatistics(int Count, DtStatistic* pStatistics);
virtual DTAPI_RESULT GetStatistic(int Type, int& Statistic);
virtual DTAPI_RESULT ReadSdiLines(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat, int StartLine, int& NumLines);
virtual DTAPI_RESULT ReadSdiLines(DtFrameBufTrParsRaw& TP);
virtual DTAPI_RESULT ReadSdiLines(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat);
virtual DTAPI_RESULT ReadVideo(__int64 Frame, unsigned char* pBuf,
int& BufSize, int Field, int FullOrScaled,
int DataFormat, int StartLine, int& NumLines);
virtual DTAPI_RESULT ReadVideo(DtFrameBufTrParsVideo& TP);
virtual DTAPI_RESULT SetRxMode(int RxMode, __int64& FirstFrame);
virtual DTAPI_RESULT Start(bool Start=true);
virtual DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
virtual DTAPI_RESULT WaitFrame(__int64& LastFrame);
virtual DTAPI_RESULT WaitFrame(__int64& FirstFrame, __int64& LastFrame);
virtual DTAPI_RESULT WriteSdiLines(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat);
virtual DTAPI_RESULT WriteSdiLines(__int64 Frame, unsigned char* pBuf,
int& BufSize, int DataFormat, int StartLine, int& NumLines);
virtual DTAPI_RESULT WriteSdiLines(DtFrameBufTrParsRaw& TP);
virtual DTAPI_RESULT WriteVideo(__int64 Frame, unsigned char* pBuf, int& BufSize,
int Field, int DataFormat, int StartLine, int& NumLines);
virtual DTAPI_RESULT WriteVideo(DtFrameBufTrParsVideo& TP);
protected:
FrameBufImpl* m_pImpl;
};
class DtSdiMatrix
{
public:
DtSdiMatrix();
virtual ~DtSdiMatrix();
private:
DtSdiMatrix(const DtSdiMatrix&);
public:
virtual DTAPI_RESULT Attach(DtDevice* pDvc, int& MaxNumRows);
virtual DTAPI_RESULT Detach();
virtual DTAPI_RESULT GetMatrixInfo(DtMatrixInfo& Info);
virtual DtFrameBuffer& Row(int n);
virtual DTAPI_RESULT Start(bool Start=true);
virtual DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue = -1,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
virtual DTAPI_RESULT WaitFrame(__int64& LastFrame);
virtual DTAPI_RESULT WaitFrame(__int64& FirstFrame, __int64& LastFrame);
private:
SdiMatrixImpl* m_pImpl;
};
DTAPI_RESULT DtapiCheckDeviceDriverVersion(void);
DTAPI_RESULT DtapiCheckDeviceDriverVersion(int DeviceCategory);
DTAPI_RESULT DtapiDeviceScan(int NumEntries, int& NumEntriesResult,
DtDeviceDesc* DvcDescArr, bool InclDteDvcs=false,
int ScanOrder=DTAPI_SCANORDER_ORIG);
DTAPI_RESULT DtapiDtaPlusDeviceScan(int NumEntries, int& NumEntriesResult,
DtDtaPlusDeviceDesc* DvcDescArr);
DTAPI_RESULT DtapiDtDeviceDesc2String(DtDeviceDesc* pDvcDesc, int StringType,
char* pString, int StringLength);
DTAPI_RESULT DtapiDtDeviceDesc2String(DtDeviceDesc* pDvcDesc, int StringType,
wchar_t* pString, int StringLength);
DTAPI_RESULT DtapiDtHwFuncDesc2String(DtHwFuncDesc* pHwFunc, int StringType,
char* pString, int StringLength);
DTAPI_RESULT DtapiDtHwFuncDesc2String(DtHwFuncDesc* pHwFunc, int StringType,
wchar_t* pString, int StringLength);
DTAPI_RESULT DtapiGetDeviceDriverVersion(int, int&, int&, int&, int&);
DTAPI_RESULT DtapiGetDtapiServiceVersion(int&, int&, int&, int&);
DTAPI_RESULT DtapiGetVersion(int& Maj, int& Min, int& BugFix, int& Build);
DTAPI_RESULT DtapiHwFuncScan(int NumEntries, int& NumEntriesResult,
DtHwFuncDesc* pHwFuncs, bool InclDteDvcs=false,
int ScanOrder=DTAPI_SCANORDER_ORIG);
DTAPI_RESULT DtapiPower2Voltage(int dBm, int& dBmV, bool Is50Ohm=false);
const char* DtapiResult2Str(DTAPI_RESULT DtapiResult);
DTAPI_RESULT DtapiVoltage2Power(int dBmV, int& dBm, bool Is50Ohm=false);
DTAPI_RESULT DtapiRegisterCallback(pDtEventCallback Callback, void* pContext,
int EventTypes, void** pId = NULL);
DTAPI_RESULT DtapiUnregisterCallback(void* pId);
DTAPI_RESULT DtapiInitDtIpParsFromIpString(DtIpPars& IpPars,
const char* pDstIp, const char* pSrcIp);
DTAPI_RESULT DtapiInitDtIpParsFromIpString(DtIpPars& IpPars,
const wchar_t* pDstIp, const wchar_t* pSrcIp);
DTAPI_RESULT DtapiIpAddr2ByteArray(const char* pIpStr, unsigned char* pIpByte,
int& Flags);
DTAPI_RESULT DtapiIpAddr2ByteArray(const wchar_t* pIpStr,
unsigned char* pIpByte, int& Flags);
DTAPI_RESULT DtapiIpAddr2Str(char* pStr, int Len, unsigned char* pIpAddr);
DTAPI_RESULT DtapiIpAddr2Str(wchar_t* pStr, int Len, unsigned char* pIpAddr);
DTAPI_RESULT DtapiStr2IpAddr(unsigned char* pIpAddr, const char* pStr);
DTAPI_RESULT DtapiStr2IpAddr(unsigned char* pIpAddr, const wchar_t* pStr);
#define DtapiInitDtTsIpParsFromIpString DtapiInitDtIpParsFromIpString
DTAPI_RESULT DtapiModPars2Bandwidth(int& ModBandwidth, int& TotalBandwidth,
int ModType, int ParXtra0, int ParXtra1, int ParXtra2,
void* pXtraPars, int SymRate);
DTAPI_RESULT DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, int TsRate);
DTAPI_RESULT DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, DtFractionInt TsRate);
DTAPI_RESULT DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, void* pXtraPars, int TsRate);
DTAPI_RESULT DtapiModPars2SymRate(int& SymRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, void* pXtraPars, DtFractionInt TsRate);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, int SymRate = -1);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, int SymRate = -1);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, DtDvbC2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbC2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, DtDvbS2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbS2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, DtDvbT2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, DtDvbT2Pars&, int PlpIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, DtIsdbTmmPars&, int TsIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, DtIsdbTmmPars&, int TsIdx = 0);
DTAPI_RESULT DtapiModPars2TsRate(int& TsRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, void* pXtraPars, int SymRate);
DTAPI_RESULT DtapiModPars2TsRate(DtFractionInt& TsRate, int ModType, int ParXtra0,
int ParXtra1, int ParXtra2, void* pXtraPars, int SymRate);
DTAPI_RESULT DtapiGetRequiredUsbBandwidth(int VidStd, int RxMode, long long& Bandwidth);
DTAPI_RESULT DtapiGetVidStdInfo(int VidStd, DtVidStdInfo& Info);
DTAPI_RESULT DtapiGetVidStdInfo(int VidStd, int LinkStd, DtVidStdInfo& Info);
DTAPI_RESULT DtapiIoStd2VidStd(int Value, int SubValue, int& VidStd);
DTAPI_RESULT DtapiVidStd2IoStd(int VidStd, int& Value, int& SubValue);
DTAPI_RESULT DtapiVidStd2IoStd(int VidStd, int LinkStd, int& Value, int& SubValue);
const char* DtapiVidStd2Str(int VidStd);
const char* DtapiLinkStd2Str(int LinkStd);
#define DTAPI_OK 0
#define DTAPI_OK_FAILSAFE 1
#define DTAPI_E 0x1000
#define DTAPI_E_ATTACHED (DTAPI_E + 0)
#define DTAPI_E_BUF_TOO_SMALL (DTAPI_E + 1)
#define DTAPI_E_DEV_DRIVER (DTAPI_E + 2)
#define DTAPI_E_EEPROM_FULL (DTAPI_E + 3)
#define DTAPI_E_EEPROM_READ (DTAPI_E + 4)
#define DTAPI_E_EEPROM_WRITE (DTAPI_E + 5)
#define DTAPI_E_EEPROM_FORMAT (DTAPI_E + 6)
#define DTAPI_E_FIFO_FULL (DTAPI_E + 7)
#define DTAPI_E_IN_USE (DTAPI_E + 8)
#define DTAPI_E_INVALID_BUF (DTAPI_E + 9)
#define DTAPI_E_INVALID_FLAGS (DTAPI_E + 11)
#define DTAPI_E_INVALID_MODE (DTAPI_E + 12)
#define DTAPI_E_INVALID_RATE (DTAPI_E + 13)
#define DTAPI_E_INVALID_SIZE (DTAPI_E + 14)
#define DTAPI_E_KEYWORD (DTAPI_E + 15)
#define DTAPI_E_NO_DEVICE (DTAPI_E + 16)
#define DTAPI_E_NO_LOOPBACK (DTAPI_E + 17)
#define DTAPI_E_NO_SUCH_DEVICE (DTAPI_E + 18)
#define DTAPI_E_NO_SUCH_OUTPUT (DTAPI_E + 19)
#define DTAPI_E_NO_DT_OUTPUT (DTAPI_E + 20)
#define DTAPI_E_NO_TS_OUTPUT (DTAPI_E + 20)
#define DTAPI_E_NOT_ATTACHED (DTAPI_E + 21)
#define DTAPI_E_NOT_FOUND (DTAPI_E + 22)
#define DTAPI_E_NOT_SUPPORTED (DTAPI_E + 23)
#define DTAPI_E_DEVICE (DTAPI_E + 24)
#define DTAPI_E_TOO_LONG (DTAPI_E + 25)
#define DTAPI_E_UNDERFLOW (DTAPI_E + 26)
#define DTAPI_E_NO_SUCH_INPUT (DTAPI_E + 27)
#define DTAPI_E_NO_DT_INPUT (DTAPI_E + 28)
#define DTAPI_E_NO_TS_INPUT (DTAPI_E + 28)
#define DTAPI_E_DRIVER_INCOMP (DTAPI_E + 29)
#define DTAPI_E_INTERNAL (DTAPI_E + 30)
#define DTAPI_E_OUT_OF_MEM (DTAPI_E + 31)
#define DTAPI_E_INVALID_J83ANNEX (DTAPI_E + 32)
#define DTAPI_E_IDLE (DTAPI_E + 33)
#define DTAPI_E_INSUF_LOAD (DTAPI_E + 34)
#define DTAPI_E_INVALID_BANDWIDTH (DTAPI_E + 35)
#define DTAPI_E_INVALID_CONSTEL (DTAPI_E + 36)
#define DTAPI_E_INVALID_GUARD (DTAPI_E + 37)
#define DTAPI_E_INVALID_INTERLVNG (DTAPI_E + 38)
#define DTAPI_E_INVALID_TRANSMODE (DTAPI_E + 39)
#define DTAPI_E_INVALID_TSTYPE (DTAPI_E + 40)
#define DTAPI_E_NO_IPPARS (DTAPI_E + 41)
#define DTAPI_E_NO_TSRATE (DTAPI_E + 42)
#define DTAPI_E_NOT_IDLE (DTAPI_E + 43)
#define DTAPI_E_INVALID_ARG (DTAPI_E + 44)
#define DTAPI_E_NW_DRIVER (DTAPI_E + 45)
#define DTAPI_E_DST_MAC_ADDR (DTAPI_E + 46)
#define DTAPI_E_NO_SUCH_PORT (DTAPI_E + 47)
#define DTAPI_E_WINSOCK (DTAPI_E + 48)
#define DTAPI_E_MULTICASTJOIN (DTAPI_E + 49)
#define DTAPI_E_EMBEDDED (DTAPI_E + 50)
#define DTAPI_E_LOCKED (DTAPI_E + 51)
#define DTAPI_E_NO_VALID_CALDATA (DTAPI_E + 52)
#define DTAPI_E_NO_LINK (DTAPI_E + 53)
#define DTAPI_E_INVALID_HEADER (DTAPI_E + 54)
#define DTAPI_E_INVALID_PARS (DTAPI_E + 55)
#define DTAPI_E_NOT_SDI_MODE (DTAPI_E + 56)
#define DTAPI_E_INCOMP_FRAME (DTAPI_E + 57)
#define DTAPI_E_UNSUP_CONV (DTAPI_E + 58)
#define DTAPI_E_OUTBUF_TOO_SMALL (DTAPI_E + 59)
#define DTAPI_E_CONFIG (DTAPI_E + 60)
#define DTAPI_E_TIMEOUT (DTAPI_E + 61)
#define DTAPI_E_INVALID_TIMEOUT (DTAPI_E + 62)
#define DTAPI_E_INVALID_FHMODE (DTAPI_E + 63)
#define DTAPI_E_INVALID_PILOTS (DTAPI_E + 64)
#define DTAPI_E_INVALID_USEFRAMENO (DTAPI_E + 65)
#define DTAPI_E_SYMRATE_REQD (DTAPI_E + 66)
#define DTAPI_E_NO_SYMRATE (DTAPI_E + 67)
#define DTAPI_E_INVALID_NUMSEGM (DTAPI_E + 68)
#define DTAPI_E_INVALID_NUMTAPS (DTAPI_E + 69)
#define DTAPI_E_COMMUNICATION (DTAPI_E + 70)
#define DTAPI_E_BIND (DTAPI_E + 71)
#define DTAPI_E_FRAME_INTERVAL (DTAPI_E + 72)
#define DTAPI_E_INVALID_BWT_EXT (DTAPI_E + 73)
#define DTAPI_E_INVALID_FFTMODE (DTAPI_E + 74)
#define DTAPI_E_INVALID_NUMDTSYM (DTAPI_E + 75)
#define DTAPI_E_INVALID_NUMT2FRM (DTAPI_E + 76)
#define DTAPI_E_INVALID_SUBCH (DTAPI_E + 77)
#define DTAPI_E_INVALID_TIME_IL (DTAPI_E + 78)
#define DTAPI_E_NUM_PLP (DTAPI_E + 79)
#define DTAPI_E_PLP_NUMBLOCKS (DTAPI_E + 80)
#define DTAPI_E_NUMPLPS_MUSTBE_1 (DTAPI_E + 81)
#define DTAPI_E_INBAND (DTAPI_E + 82)
#define DTAPI_E_ISSY (DTAPI_E + 83)
#define DTAPI_E_OTHER_PLP_IN_BAND (DTAPI_E + 84)
#define DTAPI_E_CM_NUMPATHS (DTAPI_E + 85)
#define DTAPI_E_PILOT_PATTERN (DTAPI_E + 86)
#define DTAPI_E_SUBSLICES (DTAPI_E + 87)
#define DTAPI_E_NO_GENREF (DTAPI_E + 88)
#define DTAPI_E_TI_MEM_OVF (DTAPI_E + 89)
#define DTAPI_E_FEF (DTAPI_E + 90)
#define DTAPI_E_UNSUP_FORMAT (DTAPI_E + 91)
#define DTAPI_E_OUT_OF_SYNC (DTAPI_E + 92)
#define DTAPI_E_NO_FRAME (DTAPI_E + 93)
#define DTAPI_E_NO_SUCH_DATA (DTAPI_E + 94)
#define DTAPI_E_INVALID_TYPE (DTAPI_E + 95)
#define DTAPI_E_INVALID_MODPARS (DTAPI_E + 96)
#define DTAPI_E_BIAS_BAL_CELLS (DTAPI_E + 97)
#define DTAPI_E_COMMON_PLP_COUNT (DTAPI_E + 98)
#define DTAPI_E_PLP_ID (DTAPI_E + 99)
#define DTAPI_E_BUFS (DTAPI_E + 100)
#define DTAPI_E_FIXED_CELL_PARS (DTAPI_E + 101)
#define DTAPI_E_CM_CHANNEL (DTAPI_E + 102)
#define DTAPI_E_INVALID_FIFO_IDX (DTAPI_E + 103)
#define DTAPI_E_INVALID_INP_TYPE (DTAPI_E + 104)
#define DTAPI_E_INVALID_OUTP_TYPE (DTAPI_E + 105)
#define DTAPI_E_INVALID_START_FREQ (DTAPI_E + 106)
#define DTAPI_E_DSLICE_TUNE_POS (DTAPI_E + 107)
#define DTAPI_E_DSLICE_OFFSETS (DTAPI_E + 108)
#define DTAPI_E_DSLICE_OVERLAP (DTAPI_E + 109)
#define DTAPI_E_NOTCH_OFFSETS (DTAPI_E + 110)
#define DTAPI_E_PLP_BUNDLED (DTAPI_E + 111)
#define DTAPI_E_BROADBAND_NOTCH (DTAPI_E + 112)
#define DTAPI_E_L1_PART2_TOO_LONG (DTAPI_E + 113)
#define DTAPI_E_DSLICE_T1_NDP (DTAPI_E + 114)
#define DTAPI_E_DSLICE_T1_TSRATE (DTAPI_E + 115)
#define DTAPI_E_CONNECT_TO_SERVICE (DTAPI_E + 116)
#define DTAPI_E_INVALID_SYMRATE (DTAPI_E + 117)
#define DTAPI_E_MODPARS_NOT_SET (DTAPI_E + 118)
#define DTAPI_E_SERVICE_INCOMP (DTAPI_E + 119)
#define DTAPI_E_INVALID_LEVEL (DTAPI_E + 120)
#define DTAPI_E_MODTYPE_UNSUP (DTAPI_E + 121)
#define DTAPI_E_I2C_LOCK_TIMEOUT (DTAPI_E + 122)
#define DTAPI_E_INVALID_FREQ (DTAPI_E + 123)
#define DTAPI_E_INVALID_TSRATESEL (DTAPI_E + 124)
#define DTAPI_E_INVALID_SPICLKSEL (DTAPI_E + 125)
#define DTAPI_E_INVALID_SPIMODE (DTAPI_E + 126)
#define DTAPI_E_NOT_INITIALIZED (DTAPI_E + 127)
#define DTAPI_E_NOT_LOCKED (DTAPI_E + 128)
#define DTAPI_E_NO_PERMISSION (DTAPI_E + 129)
#define DTAPI_E_CANCELLED (DTAPI_E + 130)
#define DTAPI_E_OUT_OF_RESOURCES (DTAPI_E + 131)
#define DTAPI_E_LISTEN (DTAPI_E + 132)
#define DTAPI_E_INVALID_STREAMFMT (DTAPI_E + 133)
#define DTAPI_E_EVENT_POWER (DTAPI_E + 134)
#define DTAPI_E_EVENT_REMOVAL (DTAPI_E + 135)
#define DTAPI_E_UNSUP_ROLLOFF (DTAPI_E + 136)
#define DTAPI_E_T2_LITE (DTAPI_E + 137)
#define DTAPI_E_COMP_OVERLAP (DTAPI_E + 138)
#define DTAPI_E_MULTI_COMPS (DTAPI_E + 139)
#define DTAPI_E_INVALID_ISI (DTAPI_E + 140)
#define DTAPI_E_FIRMW_INCOMP (DTAPI_E + 141)
#define DTAPI_E_INVALID_MODTYPE (DTAPI_E + 142)
#define DTAPI_E_NO_VIDSTD (DTAPI_E + 143)
#define DTAPI_E_INVALID_VIDSTD (DTAPI_E + 144)
#define DTAPI_E_INVALID_AUDSTD (DTAPI_E + 145)
#define DTAPI_E_INVALID_SCALING (DTAPI_E + 146)
#define DTAPI_E_INVALID_ROW (DTAPI_E + 147)
#define DTAPI_E_NOT_STARTED (DTAPI_E + 148)
#define DTAPI_E_STARTED (DTAPI_E + 149)
#define DTAPI_E_INVALID_LINE (DTAPI_E + 150)
#define DTAPI_E_INVALID_STREAM (DTAPI_E + 151)
#define DTAPI_E_INVALID_ANC (DTAPI_E + 152)
#define DTAPI_E_INVALID_FRAME (DTAPI_E + 153)
#define DTAPI_E_NOT_IMPLEMENTED (DTAPI_E + 154)
#define DTAPI_E_INVALID_CHANNEL (DTAPI_E + 155)
#define DTAPI_E_INVALID_GROUP (DTAPI_E + 156)
#define DTAPI_E_INVALID_FORMAT (DTAPI_E + 157)
#define DTAPI_E_INVALID_FIELD (DTAPI_E + 158)
#define DTAPI_E_BUF_TOO_LARGE (DTAPI_E + 159)
#define DTAPI_E_INVALID_DELAY (DTAPI_E + 160)
#define DTAPI_E_EXCL_MANDATORY (DTAPI_E + 161)
#define DTAPI_E_INVALID_ROLLOFF (DTAPI_E + 162)
#define DTAPI_E_CM_UNSUP (DTAPI_E + 163)
#define DTAPI_E_I2C (DTAPI_E + 164)
#define DTAPI_E_STATE (DTAPI_E + 165)
#define DTAPI_E_NO_LOCK (DTAPI_E + 166)
#define DTAPI_E_RANGE (DTAPI_E + 167)
#define DTAPI_E_INVALID_T2PROFILE (DTAPI_E + 168)
#define DTAPI_E_DSLICE_ID (DTAPI_E + 169)
#define DTAPI_E_EXCL_ACCESS_REQD (DTAPI_E + 170)
#define DTAPI_E_CHAN_ALREADY_ADDED (DTAPI_E + 171)
#define DTAPI_E_LAYER_ID (DTAPI_E + 172)
#define DTAPI_E_INVALID_FECMODE (DTAPI_E + 173)
#define DTAPI_E_INVALID_PORT (DTAPI_E + 174)
#define DTAPI_E_INVALID_PROTOCOL (DTAPI_E + 175)
#define DTAPI_E_INVALID_FEC_MATRIX (DTAPI_E + 176)
#define DTAPI_E_INVALID_IP_ADDR (DTAPI_E + 177)
#define DTAPI_E_INVALID_SRCIP_ADDR (DTAPI_E + 178)
#define DTAPI_E_IPV6_NOT_SUPPORTED (DTAPI_E + 179)
#define DTAPI_E_INVALID_DIFFSERV (DTAPI_E + 180)
#define DTAPI_E_INVALID_FOR_ACM (DTAPI_E + 181)
#define DTAPI_E_NWAP_DRIVER (DTAPI_E + 182)
#define DTAPI_E_INIT_ERROR (DTAPI_E + 183)
#define DTAPI_E_NOT_USB3 (DTAPI_E + 184)
#define DTAPI_E_INSUF_BW (DTAPI_E + 185)
#define DTAPI_E_NO_ANC_DATA (DTAPI_E + 186)
#define DTAPI_E_MATRIX_HALTED (DTAPI_E + 187)
#define DTAPI_E_VLAN_NOT_FOUND (DTAPI_E + 188)
#define DTAPI_E_NO_ADAPTER_IP_ADDR (DTAPI_E + 189)
#define DTAPI_E_INVALID_BTYPE (DTAPI_E + 190)
#define DTAPI_E_INVALID_PARTIAL (DTAPI_E + 191)
#define DTAPI_E_INVALID_NUMTS (DTAPI_E + 192)
#define DTAPI_E_INVALID (DTAPI_E + 193)
#define DTAPI_E_NO_RS422 (DTAPI_E + 194)
#define DTAPI_E_FECFRAMESIZE (DTAPI_E + 195)
#define DTAPI_E_SFN_NOT_SUPPORTED (DTAPI_E + 196)
#define DTAPI_E_SFN_INVALID_MODE (DTAPI_E + 197)
#define DTAPI_E_SFN_INVALID_OFFSET (DTAPI_E + 198)
#define DTAPI_E_SFN_DISABLED (DTAPI_E + 199)
#define DTAPI_E_SFN_INVALID_TIMEDIFF (DTAPI_E + 200)
#define DTAPI_E_NO_GPSCLKREF (DTAPI_E + 201)
#define DTAPI_E_NO_GPSSYNC (DTAPI_E + 202)
#define DTAPI_E_INVALID_PROFILE (DTAPI_E + 203)
#define DTAPI_E_INVALID_LINKSTD (DTAPI_E + 204)
#define DTAPI_E_FRAMERATE_MISMATCH (DTAPI_E + 205)
#define DTAPI_E_CID_INVALID_ID (DTAPI_E + 206)
#define DTAPI_E_CID_INVALID_INFO (DTAPI_E + 207)
#define DTAPI_E_CID_INVALID_FORMAT (DTAPI_E + 208)
#define DTAPI_E_CID_NOT_SUPPORTED (DTAPI_E + 209)
#define DTAPI_E_INVALID_SAMPRATE (DTAPI_E + 210)
#define DTAPI_E_MULTIMOD_UNSUP (DTAPI_E + 211)
#define DTAPI_E_NUM_CHAN (DTAPI_E + 212)
#define DTAPI_E_INVALID_TIME (DTAPI_E + 213)
#define DTAPI_E_INVALID_LINK (DTAPI_E + 214)
#define DTAPI_E_MODE_VIDEOSTD (DTAPI_E + 215)
struct DtBigTsSplitPars
{
bool m_Enabled;
bool m_IsCommonPlp;
bool m_SplitSdtIn;
std::vector<int> m_Pids;
int m_OnwId;
int m_TsId;
int m_ServiceId;
int m_PmtPid;
int m_NewTsId;
int m_SdtLoopDataLength;
unsigned char m_SdtLoopData[168];
public:
void Init(void);
bool operator == (DtBigTsSplitPars& TsSplitPars);
bool operator != (DtBigTsSplitPars& TsSplitPars);
bool IsEqual(DtBigTsSplitPars& TsSplitPars);
};
struct DtPlpInpPars
{
enum InDataType
{
TS188,
TS204,
GSE
};
public:
int m_FifoIdx;
InDataType m_DataType;
DtBigTsSplitPars m_BigTsSplit;
public:
void Init(int Idx = 0);
bool operator == (DtPlpInpPars& PlpInPars);
bool operator != (DtPlpInpPars& PlpInPars);
bool IsEqual(DtPlpInpPars& PlpInPars);
};
#define DTAPI_TP_FORMAT_HEX 0
#define DTAPI_TP_FORMAT_BIT 1
#define DTAPI_TP_FORMAT_CFLOAT32 2
#define DTAPI_TP_FORMAT_INT64 3
struct DtComplexFloat
{
float m_Re, m_Im;
};
typedef void DtTpWriteDataFunc(void* pOpaque, int TpIndex, int StreamIndex,
const void* Buffer, int Length, int Format, float Mult, int IsNewFrame);
struct DtTestPointOutPars
{
public:
bool m_Enabled;
void* m_pTpWriteDataOpaque;
DtTpWriteDataFunc* m_pTpWriteDataFunc;
public:
void Init(void);
bool operator == (DtTestPointOutPars& RbmPars);
bool operator != (DtTestPointOutPars& RbmPars);
bool IsEqual(DtTestPointOutPars& RbmPars);
};
struct DtVirtualOutData
{
enum OutDataType
{
IQ_INT16,
IQ_FLOAT32,
T2MI_TS188,
DVBS2_L3,
};
OutDataType m_DataType;
union {
struct {
const unsigned char** m_pBuffer;
int m_NumBuffers;
int m_NumBytes;
} IqSamplesInt16;
struct {
const unsigned char** m_pBuffer;
int m_NumBuffers;
int m_NumBytes;
} IqSamplesFloat32;
struct {
const unsigned char* m_pBuffer;
int m_NumBytes;
__int64 m_T2MiFrameNr;
} T2MiTs188;
struct {
const unsigned char* m_pBuffer;
int m_NumBytes;
} DvbS2L3;
} u;
};
struct DtVirtualOutPars
{
bool m_Enabled;
DtVirtualOutData::OutDataType m_DataType;
double m_Gain;
public:
void Init(void);
bool IsEqual(DtVirtualOutPars& VirtOutPars);
bool operator == (DtVirtualOutPars& VirtOutPars);
bool operator != (DtVirtualOutPars& VirtOutPars);
};
#define DTAPI_DAB_UEP 0
#define DTAPI_DAB_EEP 1
enum DtDabExtractionMode
{
DAB_RAW,
DAB_EXTRACTION_AAC,
DAB_EXTRACTION_DMB
};
struct DtDabEtiStreamSelPars
{
};
struct DtDabStreamSelPars
{
int m_BitrateKbps;
int m_ErrProtLevel;
int m_ErrProtMode;
int m_ErrProtOption;
int m_StartAddress;
DtDabExtractionMode m_ExtractionMode;
};
struct DtDabFicStreamSelPars
{
int m_CifIndex;
int m_FibIndex;
};
struct DtDabService;
struct DtDabSubChannel;
struct DtDabServiceComp;
struct DtDabEnsembleInfo
{
int m_CountryId;
int m_EnsembleReference;
int m_ExtCountryCode;
int m_InterTableId;
std::wstring m_Label;
int m_LocalTimeOffset;
int m_LtoUnique;
int m_TransmissionMode;
std::vector<DtDabService> m_Services;
std::map<int, DtDabSubChannel> m_SubChannels;
};
struct DtDabService
{
int m_CondAccessId;
int m_CountryId;
int m_ExtCountryCode;
bool m_IsLocal;
std::wstring m_Label;
int m_ServiceReference;
std::vector<DtDabServiceComp> m_Components;
};
struct DtDabServiceComp
{
int m_AudioServiceCompType;
int m_DataServiceCompType;
int m_FidChannelId;
bool m_HasCondAccess;
bool m_IsPrimary;
std::wstring m_Label;
int m_Language;
int m_SubChannelId;
int m_ServiceCompId;
int m_TransportMechanismId;
};
struct DtDabSubChannel
{
int m_BitrateKbps;
int m_ErrProtLevel;
int m_ErrProtMode;
int m_ErrProtOption;
int m_FecScheme;
int m_StartAddress;
int m_SubChannelId;
int m_SubChannelSize;
int m_UepTableIndex;
int m_UepTableSwitch;
};
struct DtDabTransmitterId
{
int m_TxMainId;
int m_TxSubId;
double m_RelativePowerdB;;
};
struct DtDabTransmitterIdInfo
{
std::vector<DtDabTransmitterId> m_Transmitters;
};
#define DTAPI_DVBC2_NUM_DSLICE_MAX 255
#define DTAPI_DVBC2_NUM_PLP_MAX 255
#define DTAPI_DVBC2_NUM_NOTCH_MAX 16
#define DTAPI_DVBC2_PLP_ID_NONE -1
#define DTAPI_DVBC2_PLP_ID_AUTO -2
#define DTAPI_DVBC2_DSLICE_ID_AUTO -2
#define DTAPI_DVBC2_6MHZ 6
#define DTAPI_DVBC2_8MHZ 8
#define DTAPI_DVBC2_GI_1_128 0
#define DTAPI_DVBC2_GI_1_64 1
#define DTAPI_DVBC2_L1TIMODE_NONE 0
#define DTAPI_DVBC2_L1TIMODE_BEST 1
#define DTAPI_DVBC2_L1TIMODE_4 2
#define DTAPI_DVBC2_L1TIMODE_8 3
#define DTAPI_DVBC2_PLP_TYPE_COMMON 0
#define DTAPI_DVBC2_PLP_TYPE_GROUPED 1
#define DTAPI_DVBC2_PLP_TYPE_NORMAL 2
#define DTAPI_DVBC2_LDPC_16K 0
#define DTAPI_DVBC2_LDPC_64K 1
#define DTAPI_DVBC2_COD_2_3 1
#define DTAPI_DVBC2_COD_3_4 2
#define DTAPI_DVBC2_COD_4_5 3
#define DTAPI_DVBC2_COD_5_6 4
#define DTAPI_DVBC2_COD_8_9 5
#define DTAPI_DVBC2_COD_9_10 5
#define DTAPI_DVBC2_QAM16 1
#define DTAPI_DVBC2_QAM64 2
#define DTAPI_DVBC2_QAM256 3
#define DTAPI_DVBC2_QAM1024 4
#define DTAPI_DVBC2_QAM4096 5
#define DTAPI_DVBC2_QAM16384 6
#define DTAPI_DVBC2_QAM65536 7
#define DTAPI_DVBC2_VERSION_1_2_1 0
#define DTAPI_DVBC2_VERSION_1_3_1 1
#define DTAPI_DVBC2_ISSY_NONE 0
#define DTAPI_DVBC2_ISSY_SHORT 1
#define DTAPI_DVBC2_ISSY_LONG 2
#define DTAPI_DVBC2_TIDEPTH_NONE 0
#define DTAPI_DVBC2_TIDEPTH_4 1
#define DTAPI_DVBC2_TIDEPTH_8 2
#define DTAPI_DVBC2_TIDEPTH_16 3
#define DTAPI_DVBC2_DSLICE_TYPE_1 0
#define DTAPI_DVBC2_DSLICE_TYPE_2 1
#define DTAPI_DVBC2_FECHDR_TYPE_ROBUST 0
#define DTAPI_DVBC2_FECHDR_TYPE_HEM 1
enum {
DTAPI_DVBC2_TP07,
DTAPI_DVBC2_TP08,
DTAPI_DVBC2_TP10,
DTAPI_DVBC2_TP13,
DTAPI_DVBC2_TP15,
DTAPI_DVBC2_TP18,
DTAPI_DVBC2_TP20,
DTAPI_DVBC2_TP22,
DTAPI_DVBC2_TP26,
DTAPI_DVBC2_TP27,
DTAPI_DVBC2_TP31,
DTAPI_DVBC2_TP32,
DTAPI_DVBC2_TP33,
DTAPI_DVBC2_TP37,
DTAPI_DVBC2_TP40,
DTAPI_DVBC2_TP41,
DTAPI_DVBC2_TP42,
DTAPI_DVBC2_TP01,
DTAPI_DVBC2_TP_COUNT,
};
extern const int DTAPI_DVBC2_TESTPOINTS[DTAPI_DVBC2_TP_COUNT];
struct DtDvbC2DSlicePars
{
int m_Id;
int m_TunePosition;
int m_OffsetLeft;
int m_OffsetRight;
int m_TiDepth;
int m_Type;
int m_FecHdrType;
bool m_ConstConfig;
bool m_LeftNotch;
std::vector<DtDvbC2PlpPars> m_Plps;
public:
void Init(int Id=0);
bool IsEqual(DtDvbC2DSlicePars& DSlicePars);
bool operator == (DtDvbC2DSlicePars& DSlicePars);
bool operator != (DtDvbC2DSlicePars& DSlicePars);
};
struct DtDvbC2L1UpdatePlpPars
{
bool m_Enable;
public:
void Init();
bool IsEqual(DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
bool operator == (DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
bool operator != (DtDvbC2L1UpdatePlpPars& PlpUpdatePars);
};
struct DtDvbC2L1UpdateDSlicePars
{
bool m_Enable;
int m_OffsetLeft;
int m_OffsetRight;
std::vector<DtDvbC2L1UpdatePlpPars> m_Plps;
public:
void Init();
bool IsEqual(DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
bool operator == (DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
bool operator != (DtDvbC2L1UpdateDSlicePars& DSliceUpdatePars);
};
struct DtDvbC2L1UpdatePars
{
int m_NumFrames;
std::vector<DtDvbC2L1UpdateDSlicePars> m_DSlices;
bool m_EarlyWarningSystem;
public:
void Init();
bool IsEqual(DtDvbC2L1UpdatePars& L1UpdatePars);
bool operator == (DtDvbC2L1UpdatePars& L1UpdatePars);
bool operator != (DtDvbC2L1UpdatePars& L1UpdatePars);
};
struct DtDvbC2ModStatus
{
int m_MplpModFlags;
__int64 m_DjbOverflows;
__int64 m_DjbUnderflows;
};
struct DtDvbC2NotchPars
{
int m_Start;
int m_Width;
public:
void Init(void);
bool IsEqual(DtDvbC2NotchPars& NotchPars);
bool operator == (DtDvbC2NotchPars& NotchPars);
bool operator != (DtDvbC2NotchPars& NotchPars);
};
struct DtDvbC2PaprPars
{
bool m_TrEnabled;
double m_TrVclip;
int m_TrMaxIter;
public:
void Init(void);
bool IsEqual(DtDvbC2PaprPars& PaprPars);
bool operator == (DtDvbC2PaprPars& PaprPars);
bool operator != (DtDvbC2PaprPars& PaprPars);
};
struct DtDvbC2ParamInfo
{
int m_L1Part2Length;
int m_NumL1Symbols;
int m_NumSymbols;
int m_PilotSpacing;
int m_FftSize;
int m_MinCarrierOffset;
int m_CenterFrequency;
};
struct DtDvbC2PlpPars
{
bool m_Hem;
bool m_Npd;
int m_Issy;
int m_IssyBufs;
int m_IssyOutputDelay;
int m_TsRate;
int m_Ccm;
int m_Id;
bool m_Bundled;
int m_Type;
int m_GroupId;
int m_FecType;
int m_CodeRate;
int m_Modulation;
int m_HdrCntr;
std::vector<DtDvbC2XFecFrameHeader> m_AcmHeaders;
bool m_PsiSiReproc;
int m_TsId;
int m_OnwId;
bool m_NoData;
public:
void Init(int PlpId = 0);
bool IsEqual(DtDvbC2PlpPars& PlpPars);
bool operator == (DtDvbC2PlpPars& PlpPars);
bool operator != (DtDvbC2PlpPars& PlpPars);
};
struct DtDvbC2XFecFrameHeader
{
int m_FecType;
int m_Modulation;
int m_CodeRate;
int m_HdrCntr;
int m_XFecFrameCount;
public:
void Init(void);
bool IsEqual(DtDvbC2XFecFrameHeader& FecHeader);
bool operator == (DtDvbC2XFecFrameHeader& FecHeader);
bool operator != (DtDvbC2XFecFrameHeader& FecHeader);
};
struct DtDvbC2Pars
{
public:
int m_Bandwidth;
int m_NetworkId;
int m_C2SystemId;
int m_StartFrequency;
int m_C2Bandwidth;
int m_GuardInterval;
bool m_ReservedTone;
bool m_EarlyWarningSystem;
int m_C2Version;
int m_L1TiMode;
int m_NumDSlices;
DtDvbC2DSlicePars m_DSlices[DTAPI_DVBC2_NUM_DSLICE_MAX];
int m_NumNotches;
DtDvbC2NotchPars m_Notches[DTAPI_DVBC2_NUM_NOTCH_MAX];
int m_NumPlpInputs;
DtPlpInpPars m_PlpInputs[DTAPI_DVBC2_NUM_PLP_MAX];
DtDvbC2PaprPars m_PaprPars;
DtVirtualOutPars m_VirtOutput;
DtTestPointOutPars m_TpOutput;
int m_OutpFreqOffset;
int m_OutpBandwidth;
std::vector<DtDvbC2L1UpdatePars> m_L1Updates;
int m_L1P2ChangeCtr;
bool m_NotchTestEnable;
int m_TimeWindowLength;
public:
DTAPI_RESULT CheckValidity(void);
DTAPI_RESULT GetParamInfo(DtDvbC2ParamInfo& C2Info);
void Init(void);
bool IsEqual(DtDvbC2Pars& C2Pars);
bool operator == (DtDvbC2Pars& C2Pars);
bool operator != (DtDvbC2Pars& C2Pars);
};
#define DTAPI_DVBC2_PAYLOAD_GFPS 0
#define DTAPI_DVBC2_PAYLOAD_GCS 1
#define DTAPI_DVBC2_PAYLOAD_GSE 2
#define DTAPI_DVBC2_PAYLOAD_TS 3
struct DtDvbC2DemodL1PlpSigDataPlp
{
int m_Id;
int m_FecType;
int m_Modulation;
int m_CodeRate;
int m_HdrCntr;
DtDvbC2DemodL1PlpSigDataPlp();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbC2DemodL1PlpSigData
{
int m_NumPlps;
std::vector<DtDvbC2DemodL1PlpSigDataPlp> m_Plps;
DtDvbC2DemodL1PlpSigData();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbC2DemodL1Part2Plp
{
int m_Id;
int m_Bundled;
int m_Type;
int m_PayloadType;
int m_GroupId;
int m_Start;
int m_FecType;
int m_Modulation;
int m_CodeRate;
int m_PsiSiReproc;
int m_TsId;
int m_OnwId;
DtDvbC2DemodL1Part2Plp();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbC2DemodL1Part2DSlice
{
int m_Id;
int m_TunePosition;
int m_OffsetLeft;
int m_OffsetRight;
int m_TiDepth;
int m_Type;
int m_FecHdrType;
int m_ConstConfig;
int m_LeftNotch;
int m_NumPlps;
std::vector<DtDvbC2DemodL1Part2Plp> m_Plps;
DtDvbC2DemodL1Part2DSlice();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbC2DemodL1Part2Data
{
int m_NetworkId;
int m_C2SystemId;
int m_StartFrequency;
int m_C2Bandwidth;
int m_GuardInterval;
int m_C2FrameLength;
int m_L1P2ChangeCtr;
int m_ReservedTone;
bool m_EarlyWarningSystem;
int m_C2Version;
int m_NumDSlices;
std::vector<DtDvbC2DemodL1Part2DSlice> m_DSlices;
int m_NumNotches;
std::vector<DtDvbC2NotchPars> m_Notches;
DtDvbC2DemodL1Part2Data();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbC2StreamSelPars
{
int m_DSliceId;
int m_PlpId;
int m_CommonPlpId;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
#define DTAPI_DVBS2_NUM_PLP_MAX 255
#define DTAPI_DVBS2_ISSY_NONE 0
#define DTAPI_DVBS2_ISSY_SHORT 1
#define DTAPI_DVBS2_ISSY_LONG 2
struct DtDvbS2ModStatus
{
int m_MplpModFlags;
__int64 m_DjbOverflows;
__int64 m_DjbUnderflows;
};
struct DtDvbS2FecFrameHeader
{
int m_Modulation;
int m_CodeRate;
int m_FecFrameSize;
bool m_HasPilots;
int m_FecFrameCount;
};
struct DtDvbS2ModCod
{
int m_ModType;
int m_CodeRate;
DtDvbS2ModCod();
DtDvbS2ModCod(int ModType, int CodeRate);
bool operator < (const DtDvbS2ModCod& ModCod) const;
};
struct DtDvbS2PlpPars
{
bool m_Hem;
bool m_Npd;
int m_Issy;
int m_IssyBufs;
int m_IssyOutputDelay;
int m_TsRate;
int m_Ccm;
int m_Id;
std::vector<DtDvbS2FecFrameHeader> m_AcmHeaders;
};
struct DtDvbS2Pars
{
DtVirtualOutPars m_VirtOutput;
bool m_L3Output;
int m_SymRate;
int m_RollOff;
std::vector<DtDvbS2PlpPars> m_Plps;
int m_NumPlpInputs;
DtPlpInpPars m_PlpInputs[DTAPI_DVBS2_NUM_PLP_MAX];
DtDvbS2Pars();
DTAPI_RESULT CheckValidity();
};
#define DTAPI_DVBT2_NUM_PLP_MAX 255
#define DTAPI_DVBT2_NUM_RF_MAX 7
#define DTAPI_DVBT2_PLP_ID_NONE -1
#define DTAPI_DVBT2_PLP_ID_AUTO -2
#define DTAPI_DVBT2_ISSY_NONE 0
#define DTAPI_DVBT2_ISSY_SHORT 1
#define DTAPI_DVBT2_ISSY_LONG 2
#define DTAPI_DVBT2_1_7MHZ 0
#define DTAPI_DVBT2_5MHZ 1
#define DTAPI_DVBT2_6MHZ 2
#define DTAPI_DVBT2_7MHZ 3
#define DTAPI_DVBT2_8MHZ 4
#define DTAPI_DVBT2_10MHZ 5
#define DTAPI_DVBT2_BW_UNK -1
#define DTAPI_DVBT2MI_BW_MSK 0xF
#define DTAPI_DVBT2MI_BW_UNK 0xF
#define DTAPI_DVBT2_FFT_1K 0
#define DTAPI_DVBT2_FFT_2K 1
#define DTAPI_DVBT2_FFT_4K 2
#define DTAPI_DVBT2_FFT_8K 3
#define DTAPI_DVBT2_FFT_16K 4
#define DTAPI_DVBT2_FFT_32K 5
#define DTAPI_DVBT2_FFT_UNK -1
#define DTAPI_DVBT2_MISO_OFF 0
#define DTAPI_DVBT2_MISO_TX1 1
#define DTAPI_DVBT2_MISO_TX2 2
#define DTAPI_DVBT2_MISO_TX1TX2 3
#define DTAPI_DVBT2_MISO_SUM 3
#define DTAPI_DVBT2_MISO_BOTH 4
#define DTAPI_DVBT2_GI_1_128 0
#define DTAPI_DVBT2_GI_1_32 1
#define DTAPI_DVBT2_GI_1_16 2
#define DTAPI_DVBT2_GI_19_256 3
#define DTAPI_DVBT2_GI_1_8 4
#define DTAPI_DVBT2_GI_19_128 5
#define DTAPI_DVBT2_GI_1_4 6
#define DTAPI_DVBT2_GI_UNK -1
#define DTAPI_DVBT2_PAPR_NONE 0
#define DTAPI_DVBT2_PAPR_ACE 1
#define DTAPI_DVBT2_PAPR_TR 2
#define DTAPI_DVBT2_PAPR_ACE_TR 3
#define DTAPI_DVBT2_BWTEXT_OFF false
#define DTAPI_DVBT2_BWTEXT_ON true
#define DTAPI_DVBT2_PP_1 1
#define DTAPI_DVBT2_PP_2 2
#define DTAPI_DVBT2_PP_3 3
#define DTAPI_DVBT2_PP_4 4
#define DTAPI_DVBT2_PP_5 5
#define DTAPI_DVBT2_PP_6 6
#define DTAPI_DVBT2_PP_7 7
#define DTAPI_DVBT2_PP_8 8
#define DTAPI_DVBT2_COD_1_2 0
#define DTAPI_DVBT2_COD_3_5 1
#define DTAPI_DVBT2_COD_2_3 2
#define DTAPI_DVBT2_COD_3_4 3
#define DTAPI_DVBT2_COD_4_5 4
#define DTAPI_DVBT2_COD_5_6 5
#define DTAPI_DVBT2_COD_1_3 6
#define DTAPI_DVBT2_COD_2_5 7
#define DTAPI_DVBT2_FEF_ZERO 0
#define DTAPI_DVBT2_FEF_1K_OFDM 1
#define DTAPI_DVBT2_FEF_1K_OFDM_384 2
#define DTAPI_DVBT2_BPSK 0
#define DTAPI_DVBT2_QPSK 1
#define DTAPI_DVBT2_QAM16 2
#define DTAPI_DVBT2_QAM64 3
#define DTAPI_DVBT2_QAM256 4
#define DTAPI_DVBT2_PLP_TYPE_COMM 0
#define DTAPI_DVBT2_PLP_TYPE_1 1
#define DTAPI_DVBT2_PLP_TYPE_2 2
#define DTAPI_DVBT2_LDPC_16K 0
#define DTAPI_DVBT2_LDPC_64K 1
#define DTAPI_DVBT2_IL_ONETOONE 0
#define DTAPI_DVBT2_IL_MULTI 1
#define DTAPI_DVBT2MI_TIMESTAMP_NULL 0
#define DTAPI_DVBT2MI_TIMESTAMP_REL 1
#define DTAPI_DVBT2MI_TIMESTAMP_ABS 2
#define DTAPI_DVBT2_VERSION_1_1_1 0
#define DTAPI_DVBT2_VERSION_1_2_1 1
#define DTAPI_DVBT2_VERSION_1_3_1 2
#define DTAPI_DVBT2_PROFILE_BASE 0
#define DTAPI_DVBT2_PROFILE_LITE 1
#define DTAPI_DVBT2_BIAS_BAL_OFF 0
#define DTAPI_DVBT2_BIAS_BAL_ON 1
#define DTAPI_DVBT2_GSE_LABEL_6BYTE 0
#define DTAPI_DVBT2_GSE_LABEL_3BYTE 1
#define DTAPI_DVBT2_GSE_LABEL_NONE 2
#define DTAPI_TXSIG_FEF_LEN_MIN 162212
enum {
DTAPI_DVBT2_TP00,
DTAPI_DVBT2_TP01,
DTAPI_DVBT2_TP03,
DTAPI_DVBT2_TP04,
DTAPI_DVBT2_TP06,
DTAPI_DVBT2_TP08,
DTAPI_DVBT2_TP09,
DTAPI_DVBT2_TP11,
DTAPI_DVBT2_TP12,
DTAPI_DVBT2_TP15,
DTAPI_DVBT2_TP16,
DTAPI_DVBT2_TP19,
DTAPI_DVBT2_TP20,
DTAPI_DVBT2_TP21,
DTAPI_DVBT2_TP22,
DTAPI_DVBT2_TP23,
DTAPI_DVBT2_TP24,
DTAPI_DVBT2_TP25,
DTAPI_DVBT2_TP26,
DTAPI_DVBT2_TP27,
DTAPI_DVBT2_TP28,
DTAPI_DVBT2_TP29,
DTAPI_DVBT2_TP30,
DTAPI_DVBT2_TP32,
DTAPI_DVBT2_TP33,
DTAPI_DVBT2_TP34,
DTAPI_DVBT2_TP50,
DTAPI_DVBT2_TP51,
DTAPI_DVBT2_TP53,
DTAPI_DVBT2_TP_COUNT,
};
extern const int DTAPI_DVBT2_TESTPOINTS[DTAPI_DVBT2_TP_COUNT];
struct DtDvbT2AuxPars
{
int m_NumDummyStreams;
public:
void Init(void);
bool IsEqual(DtDvbT2AuxPars& AuxPars);
bool operator == (DtDvbT2AuxPars& AuxPars);
bool operator != (DtDvbT2AuxPars& AuxPars);
};
struct DtDvbT2MiPars
{
bool m_Enabled;
int m_Pid;
int m_StreamId;
int m_Pid2;
int m_StreamId2;
int m_PcrPid;
int m_PmtPid;
int m_TsRate;
int m_TimeStamping;
__int64 m_SecSince2000;
int m_Subseconds;
int m_T2miUtco;
bool m_EncodeFef;
bool m_SyncWithExtClock;
public:
void Init(void);
bool IsEqual(DtDvbT2MiPars& T2MiPars);
bool operator == (DtDvbT2MiPars& T2MiPars);
bool operator != (DtDvbT2MiPars& T2MiPars);
};
struct DtDvbT2ModStatus
{
int m_MplpModFlags;
__int64 m_PlpNumBlocksOverflows;
__int64 m_BitrateOverflows;
__int64 m_TtoErrorCount;
__int64 m_T2MiOutputRateOverFlows;
int m_T2MiOutputRate;
};
struct DtDvbT2PaprPars
{
bool m_AceEnabled;
double m_AceVclip;
double m_AceGain;
double m_AceLimit;
int m_AceInterpFactor;
int m_AcePlpIndex;
bool m_TrEnabled;
bool m_TrP2Only;
double m_TrVclip;
int m_TrMaxIter;
int m_L1ExtLength;
bool m_L1AceEnabled;
double m_L1AceCMax;
bool m_L1Scrambling;
int m_NumBiasBalCells;
int m_BiasBalancing;
int m_TrAlgorithm;
public:
void Init(void);
bool IsEqual(DtDvbT2PaprPars& PaprPars);
bool operator == (DtDvbT2PaprPars& PaprPars);
bool operator != (DtDvbT2PaprPars& PaprPars);
};
struct DtDvbT2ParamInfo
{
int m_TotalCellsPerFrame;
int m_L1CellsPerFrame;
int m_AuxCellsPerFrame;
int m_BiasBalCellsPerFrame;
int m_BiasBalCellsMax;
int m_DummyCellsPerFrame;
int m_SamplesPerFrame;
};
struct DtDvbT2PlpPars
{
bool m_Hem;
bool m_Npd;
int m_Issy;
int m_IssyBufs;
int m_IssyTDesign;
int m_CompensatingDelay;
int m_TsRate;
int m_GseLabelType;
int m_Id;
int m_GroupId;
int m_Type;
int m_PayloadType;
int m_CodeRate;
int m_Modulation;
bool m_Rotation;
int m_FecType;
int m_FrameInterval;
int m_FirstFrameIdx;
int m_TimeIlLength;
int m_TimeIlType;
bool m_InBandAFlag;
bool m_InBandBFlag;
int m_NumBlocks;
int m_NumOtherPlpInBand;
int m_OtherPlpInBand[DTAPI_DVBT2_NUM_PLP_MAX-1];
bool m_FfFlag;
int m_FirstRfIdx;
public:
void Init(int PlpId = 0);
bool IsEqual(DtDvbT2PlpPars& PlpPars);
bool operator == (DtDvbT2PlpPars& PlpPars);
bool operator != (DtDvbT2PlpPars& PlpPars);
};
enum DtDvbT2RbmEventType
{
DTAPI_DVBT2_RBM_EVENT_PLOT,
DTAPI_DVBT2_RBM_EVENT_DJB_UNDERFLOW,
DTAPI_DVBT2_RBM_EVENT_BUFS_TOO_SMALL,
DTAPI_DVBT2_RBM_EVENT_TTO_IN_THE_PAST,
DTAPI_DVBT2_RBM_EVENT_DJB_OVERFLOW,
DTAPI_DVBT2_RBM_EVENT_CRC8_ERROR_HEADER,
DTAPI_DVBT2_RBM_EVENT_DFL_TOO_LARGE,
DTAPI_DVBT2_RBM_EVENT_SYNCD_TOO_LARGE,
DTAPI_DVBT2_RBM_EVENT_INVALID_UPL,
DTAPI_DVBT2_RBM_EVENT_INVALID_SYNCD,
DTAPI_DVBT2_RBM_EVENT_TDI_OVERFLOW,
DTAPI_DVBT2_RBM_EVENT_TOO_MANY_TI_BLOCKS,
DTAPI_DVBT2_RBM_EVENT_INVALID_PLP_START,
DTAPI_DVBT2_RBM_EVENT_FDI_OVERFLOW,
DTAPI_DVBT2_RBM_EVENT_NO_TS_RATE,
DTAPI_DVBT2_RBM_EVENT_ISCR_ERROR,
DTAPI_DVBT2_RBM_EVENT_BUFS_NOT_CONSTANT,
DTAPI_DVBT2_RBM_EVENT_ISSYI_NOT_CONSTANT,
DTAPI_DVBT2_RBM_EVENT_HEM_NOT_CONSTANT,
DTAPI_DVBT2_RBM_EVENT_PLP_NUM_BLOCKS_TOO_SMALL,
};
struct DtDvbT2RbmEvent
{
int m_DataPlpId;
int m_DataPlpIndex;
double m_Time;
int m_IsCommonPlp;
DtDvbT2RbmEventType m_EventType;
union {
struct {
int m_TdiWriteIndex;
int m_TdiReadIndex;
int m_TdiReadAvailable;
int m_DjbSize;
} Plot;
struct {
int m_Bufs;
} BufsTooSmall;
struct {
int m_Tto;
} TtoInThePast;
struct {
int m_DjbSize;
int m_DjbMaxSize;
} DjbOverflow;
struct {
int m_Val;
} Crc8ErrorHeader;
struct {
int m_SyncD;
int m_Dfl;
} SyncDTooLarge;
struct {
int m_Syncd;
int m_Left;
} InvalidSyncD;
struct {
int m_TdiWriteIndex;
int m_TdiReadIndex;
} TdiOverflow;
struct {
int m_PlpId1;
int m_PlpId2;
} InvalidPlpStart;
struct {
int m_Delta;
} IscrError;
struct {
int m_CurBufs;
int m_newBufs;
} BufsNotConstant;
struct {
int m_PlpNumBlocks;
} PlpNumBlocksTooSmall;
} u;
};
struct DtDvbT2RbmValidation
{
public:
bool m_Enabled;
bool m_PlotEnabled;
int m_PlotPeriod;
void* m_pCallbackOpaque;
void (*m_pCallbackFunc)(void *pOpaque, const DtDvbT2RbmEvent* pRbmEvent);
public:
void Init(void);
bool IsEqual(DtDvbT2RbmValidation& RbmPars);
bool operator == (DtDvbT2RbmValidation& RbmPars);
bool operator != (DtDvbT2RbmValidation& RbmPars);
};
struct DtDvbT2TxSigPars
{
bool m_TxSigAuxEnabled;
int m_TxSigAuxId;
int m_TxSigAuxP;
int m_TxSigAuxQ;
int m_TxSigAuxR;
bool m_TxSigFefEnabled;
int m_TxSigFefId1;
int m_TxSigFefId2;
public:
void Init(void);
bool IsEqual(DtDvbT2TxSigPars& TxSigPars);
bool operator == (DtDvbT2TxSigPars& TxSigPars);
bool operator != (DtDvbT2TxSigPars& TxSigPars);
};
#define DTAPI_DVBT2_COMPA_ALL 0
#define DTAPI_DVBT2_COMPA_ESSENTIAL 1
class DtDvbT2ComponentPars
{
public:
int m_T2Version;
int m_T2Profile;
bool m_T2BaseLite;
int m_Bandwidth;
int m_FftMode;
int m_Miso;
int m_GuardInterval;
int m_Papr;
bool m_BwtExt;
int m_PilotPattern;
int m_L1Modulation;
int m_CellId;
int m_NetworkId;
int m_T2SystemId;
bool m_L1Repetition;
int m_NumT2Frames;
int m_NumDataSyms;
int m_NumSubslices;
int m_ComponentStartTime;
bool m_FefEnable;
int m_FefType;
int m_FefS1;
int m_FefS2;
int m_FefSignal;
int m_FefLength;
int m_FefInterval;
int m_NumRfChans;
int m_RfChanFreqs[DTAPI_DVBT2_NUM_RF_MAX];
int m_StartRfIdx;
int m_NumPlps;
DtDvbT2PlpPars m_Plps[DTAPI_DVBT2_NUM_PLP_MAX];
DtPlpInpPars m_PlpInputs[DTAPI_DVBT2_NUM_PLP_MAX];
DtDvbT2AuxPars m_Aux;
DtDvbT2PaprPars m_PaprPars;
DtDvbT2TxSigPars m_TxSignature;
DtDvbT2RbmValidation m_RbmValidation;
DtTestPointOutPars m_TpOutput;
int m_L1ChangeCounter;
public:
virtual void Init(void);
virtual bool IsEqual(DtDvbT2ComponentPars&, int CompareMode=DTAPI_DVBT2_COMPA_ALL);
virtual bool operator == (DtDvbT2ComponentPars& T2Pars);
virtual bool operator != (DtDvbT2ComponentPars& T2Pars);
};
class DtDvbT2Pars : public DtDvbT2ComponentPars
{
public:
DtVirtualOutPars m_VirtOutput;
DtDvbT2MiPars m_T2Mi;
int m_NumFefComponents;
DtDvbT2ComponentPars m_FefComponent[1];
public:
DtDvbT2Pars() { Init(); }
virtual void Init(void);
virtual DTAPI_RESULT CheckValidity(void);
virtual DTAPI_RESULT ComputeTDesign();
virtual DTAPI_RESULT GetParamInfo(DtDvbT2ParamInfo& T2Info);
virtual DTAPI_RESULT GetParamInfo(DtDvbT2ParamInfo& T2Info1,
DtDvbT2ParamInfo& T2Info2);
DTAPI_RESULT OptimisePlpNumBlocks(DtDvbT2ParamInfo&, int&);
DTAPI_RESULT OptimisePlpNumBlocks(DtDvbT2ParamInfo&, int&, int&);
static DTAPI_RESULT RetrieveT2miTsRateFromTs(char* pBuffer, int NumBytes,
int Bandwidth, int& TsRate);
virtual bool operator == (DtDvbT2Pars& T2Pars);
virtual bool operator != (DtDvbT2Pars& T2Pars);
virtual bool IsEqual(DtDvbT2Pars& T2Pars, int CompareMode=DTAPI_DVBT2_COMPA_ALL);
};
#define DTAPI_DVBT2_PAYLOAD_GFPS 0
#define DTAPI_DVBT2_PAYLOAD_GCS 1
#define DTAPI_DVBT2_PAYLOAD_GSE 2
#define DTAPI_DVBT2_PAYLOAD_TS 3
#define DTAPI_DVBT2_TYPE_TS 0
#define DTAPI_DVBT2_TYPE_GS 1
#define DTAPI_DVBT2_TYPE_TS_GS 2
struct DtDvbT2DemodAuxPars
{
int m_AuxStreamType;
int m_AuxPrivateConf;
};
struct DtDvbT2DemodL1PostPlp
{
int m_Id;
int m_Type;
int m_PayloadType;
int m_FfFlag;
int m_FirstRfIdx;
int m_FirstFrameIdx;
int m_GroupId;
int m_CodeRate;
int m_Modulation;
int m_Rotation;
int m_FecType;
int m_NumBlocks;
int m_FrameInterval;
int m_TimeIlLength;
int m_TimeIlType;
int m_InBandAFlag;
int m_InBandBFlag;
int m_Reserved1;
int m_PlpMode;
int m_Static;
int m_StaticPadding;
DtDvbT2DemodL1PostPlp();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbT2DemodRfPars
{
int m_RfIdx;
int m_Frequency;
};
struct DtDvbT2DemodL1Data
{
struct DtDvbT2DemodL1P1
{
bool m_Valid;
int m_FftMode;
int m_Miso;
int m_Fef;
int m_T2Profile;
} m_P1;
struct DtDvbT2DemodL1Pre
{
bool m_Valid;
int m_Type;
int m_BwtExt;
int m_S1;
int m_S2;
int m_L1Repetition;
int m_GuardInterval;
int m_Papr;
int m_L1Modulation;
int m_L1CodeRate;
int m_L1FecType;
int m_L1PostSize;
int m_l1PostInfoSize;
int m_PilotPattern;
int m_TxIdAvailability;
int m_CellId;
int m_NetworkId;
int m_T2SystemId;
int m_NumT2Frames;
int m_NumDataSyms;
int m_RegenFlag;
int m_L1PostExt;
int m_NumRfChans;
int m_CurrentRfIdx;
int m_T2Version;
int m_L1PostScrambling;
int m_T2BaseLite;
} m_L1Pre;
struct DtDvbT2DemodL1Post
{
bool m_Valid;
int m_NumSubslices;
int m_NumPlps;
int m_NumAux;
std::vector<DtDvbT2DemodRfPars> m_RfChanFreqs;
int m_FefType;
int m_FefLength;
int m_FefInterval;
std::vector<DtDvbT2DemodL1PostPlp> m_Plps;
std::vector<DtDvbT2DemodAuxPars> m_AuxPars;
} m_L1Post;
DtDvbT2DemodL1Data();
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
#define DTAPI_ISDBT_NUM_TS_MAX 14
struct DtIsdbTmmPars
{
int m_Bandwidth;
int m_SubChannel;
int m_NumTss;
DtVirtualOutPars m_VirtOutput;
DtIsdbtPars m_Tss[DTAPI_ISDBT_NUM_TS_MAX];
DtPlpInpPars m_TsInputs[DTAPI_ISDBT_NUM_TS_MAX];
DtIsdbTmmPars() { Init(); }
DTAPI_RESULT CheckValidity();
int NumSegm();
void Init();
DTAPI_RESULT SetSegmentFormat(int TsIdx, int SegmFormat);
bool operator == (DtIsdbTmmPars& Rhs);
bool operator != (DtIsdbTmmPars& Rhs);
};
enum DtStreamType
{
STREAM_CONSTEL,
STREAM_DAB,
STREAM_DABETI,
STREAM_DABFIC,
STREAM_DVBC2,
STREAM_DVBC2_BBFRAME,
STREAM_DVBT,
STREAM_DVBT2,
STREAM_DVBT2_BBFRAME,
STREAM_DVBT2_GSE,
STREAM_IMPRESP,
STREAM_ISDBT,
STREAM_MER,
STREAM_SPECTRUM,
STREAM_T2MI,
STREAM_TF_ABS,
STREAM_TF_PHASE,
STREAM_TF_GROUPDELAY
};
struct DtConstelPars
{
int m_Period;
int m_ConstellationType;
int m_Index;
int m_MaxNumPoints;
};
struct DtDvbTStreamSelPars
{
};
struct DtDvbTTpsInfo
{
int m_LengthIndicator;
int m_Constellation;
int m_HpCodeRate;
int m_LpCodeRate;
int m_Guard;
int m_Interleaving;
int m_Mode;
int m_Hierarchy;
int m_CellId;
int m_HpS48S49;
int m_LpS48S49;
int m_OddS50_S53;
int m_EvenS50_S53;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtDvbT2StreamSelPars
{
int m_PlpId;
int m_CommonPlpId;
DTAPI_RESULT FromXml(const std::wstring& XmlString);
DTAPI_RESULT ToXml(std::wstring& XmlString);
};
struct DtImpRespPars
{
int m_Period;
int m_Channel;
};
struct DtIsdbtStreamSelPars
{
};
struct DtMeasurement
{
DtStreamType m_MeasurementType;
__int64 m_TimeStamp;
int m_NumValues;
DtComplexFloat* m_pMeasurement;
};
struct DtMerPars
{
int m_Period;
};
struct DtSpectrumPars
{
int m_Period;
int m_FftLength;
int m_AverageLength;
};
struct DtT2MiStreamSelPars
{
int m_T2MiOutPid;
int m_T2MiTsRate;
};
struct DtTransFuncPars
{
int m_Period;
int m_Channel;
};
struct DtStreamSelPars
{
intptr_t m_Id;
DtStreamType m_StreamType;
union {
DtDvbC2StreamSelPars m_DvbC2;
DtDvbTStreamSelPars m_DvbT;
DtDvbT2StreamSelPars m_DvbT2;
DtIsdbtStreamSelPars m_Isdbt;
DtT2MiStreamSelPars m_T2Mi;
DtDabStreamSelPars m_Dab;
DtDabEtiStreamSelPars m_DabEti;
DtDabFicStreamSelPars m_DabFic;
DtConstelPars m_Constel;
DtImpRespPars m_ImpResp;
DtMerPars m_Mer;
DtSpectrumPars m_Spectrum;
DtTransFuncPars m_TransFunc;
} u;
bool operator == (DtStreamSelPars& Rhs);
bool operator != (DtStreamSelPars& Rhs);
};
typedef void DtOutputRateChangedFunc(void *pOpaque, DtStreamSelPars&, int Bitrate);
typedef void DtReadIqFunc(void* pOpaque,
unsigned char* pIqBuf, int IqBufSize, int& IqLength);
typedef void DtWriteMeasFunc(void *pOpaque, DtStreamSelPars&, DtMeasurement*);
typedef void DtWriteStreamFunc(void* pOpaque, DtStreamSelPars& StreamSel,
const unsigned char* pData, int Length);
class DtAdvDemod
{
public:
DtAdvDemod();
virtual ~DtAdvDemod();
private:
DtAdvDemod(const DtAdvDemod&);
public:
DtHwFuncDesc m_HwFuncDesc;
public:
int Category(void) { return m_HwFuncDesc.m_DvcDesc.m_Category; }
int FirmwareVersion(void) { return m_HwFuncDesc.m_DvcDesc.m_FirmwareVersion; }
bool IsAttached(void) { return m_pAdvDemod != NULL; }
int TypeNumber(void) { return m_HwFuncDesc.m_DvcDesc.m_TypeNumber; }
public:
DTAPI_RESULT AttachToPort(DtDevice* pDtDvc, int Port,
bool Exclusive=true, bool ProbeOnly=false);
DTAPI_RESULT AttachVirtual(DtDevice* pDtDvc,
DtReadIqFunc* pReadIqFunc, void* pOpaque);
DTAPI_RESULT ClearFlags(int Latched);
DTAPI_RESULT CloseStream(intptr_t Id);
DTAPI_RESULT Detach(int DetachMode);
DTAPI_RESULT GetDemodControl(DtDemodPars* pDemodPars);
DTAPI_RESULT GetDescriptor(DtHwFuncDesc& HwFunDesc);
DTAPI_RESULT GetFlags(int& Flags, int& Latched);
DTAPI_RESULT GetIoConfig(int Group, int& Value);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue, __int64& ParXtra0);
DTAPI_RESULT GetIoConfig(int Group, int& Value, int& SubValue,
__int64& ParXtra0, __int64& ParXtra1);
DTAPI_RESULT GetPars(int Count, DtPar* pPars);
DTAPI_RESULT GetRxControl(int& RxControl);
DTAPI_RESULT GetStatistics(int Count, DtStatistic* pStatistics);
DTAPI_RESULT GetStatistic(int Type, int& Statistic);
DTAPI_RESULT GetStatistic(int Type, double& Statistic);
DTAPI_RESULT GetStatistic(int Type, bool& Statistic);
DTAPI_RESULT GetStreamSelection(std::vector<DtStreamSelPars>& StreamSelList);
DTAPI_RESULT GetSupportedPars(int& NumPars, DtPar* pPars);
DTAPI_RESULT GetSupportedStatistics(int& Count, DtStatistic* pStatistics);
DTAPI_RESULT GetTsRateBps(intptr_t Id, int& TsRate);
DTAPI_RESULT GetTunerFrequency(__int64& FreqHz);
DTAPI_RESULT LedControl(int LedControl);
DTAPI_RESULT OpenStream(DtStreamSelPars StreamSel);
DTAPI_RESULT RegisterCallback(DtOutputRateChangedFunc* pCallback, void* pOpaque);
DTAPI_RESULT RegisterCallback(DtWriteStreamFunc* pCallback, void* pOpaque);
DTAPI_RESULT RegisterCallback(DtWriteMeasFunc* pCallback, void* pOpaque);
DTAPI_RESULT Reset(int ResetMode);
DTAPI_RESULT SetAntPower(int AntPower);
DTAPI_RESULT SetDemodControl(DtDemodPars *pDemodPars);
DTAPI_RESULT SetIoConfig(int Group, int Value, int SubValue,
__int64 ParXtra0 = -1, __int64 ParXtra1 = -1);
DTAPI_RESULT SetPars(int Count, DtPar* pPars);
DTAPI_RESULT SetRxControl(int RxControl);
DTAPI_RESULT SetTunerFrequency(__int64 FreqHz);
DTAPI_RESULT Tune(__int64 FreqHz, int ModType,
int ParXtra0, int ParXtra1, int ParXtra2);
DTAPI_RESULT Tune(__int64 FreqHz, DtDemodPars *pDemodPars);
protected:
AdvDemod* m_pAdvDemod;
bool m_IsAttachedToVirtual;
private:
IXpMutex* m_pMTLock;
void* m_pDetachLockCount;
int m_Port;
bool m_WantToDetach;
private:
DTAPI_RESULT DetachLock(void);
DTAPI_RESULT DetachUnlock(void);
DTAPI_RESULT ReadAccessLock(void);
DTAPI_RESULT ReadAccessUnlock(void);
};
class Rs422Channel;
class DtRs422Channel
{
public:
DtRs422Channel();
virtual ~DtRs422Channel();
private:
DtRs422Channel(const DtRs422Channel&);
public:
DTAPI_RESULT AttachToPort(DtDevice* pDtDvc, int Port,
bool Exclusive=true, bool ProbeOnly=false);
DTAPI_RESULT Detach();
DTAPI_RESULT Flush();
DTAPI_RESULT Read(char* pBuffer, int NumBytesToRead, int Timeout, int& NumBytesRead);
DTAPI_RESULT Write(char* pBuffer, int NumBytesToWrite, bool Blocking=true);
protected:
Rs422Channel* m_pRs422Channel;
void* m_pDetachLockCount;
bool m_WantToDetach;
private:
DTAPI_RESULT DetachLock(void);
DTAPI_RESULT DetachUnlock(void);
};
enum DtMxPixelFormat
{
DT_PXFMT_UYVY422_8B,
DT_PXFMT_UYVY422_10B,
DT_PXFMT_UYVY422_16B,
DT_PXFMT_UYVY422_10B_NBO,
DT_PXFMT_YUYV422_8B,
DT_PXFMT_YUYV422_10B,
DT_PXFMT_YUYV422_16B,
DT_PXFMT_Y_8B,
DT_PXFMT_Y_16B,
DT_PXFMT_YUV422P_8B,
DT_PXFMT_YUV422P_16B,
DT_PXFMT_YUV422P2_8B,
DT_PXFMT_YUV422P2_16B,
DT_PXFMT_BGR_8B,
DT_PXFMT_V210,
DT_PXFMT_INVALID = -1,
};
class DtMxVideoConfig
{
public:
int m_StartLine1;
int m_NumLines1;
int m_StartLine2;
int m_NumLines2;
int m_Scaling;
int m_LineAlignment;
DtMxPixelFormat m_PixelFormat;
bool m_UserBuffer;
DtMxVideoConfig();
};
class DtMxRawConfigSdi
{
public:
DtMxPixelFormat m_PixelFormat;
int m_StartLine;
int m_NumLines;
int m_LineAlignment;
};
enum DtMxRawDataType
{
DT_RAWDATA_SDI,
};
class DtMxRawConfig
{
public:
DtMxRawDataType m_Type;
union {
DtMxRawConfigSdi m_Sdi;
};
DtMxRawConfig();
};
enum DtMxAudioSampleType
{
DT_AUDIO_SAMPLE_PCM,
DT_AUDIO_SAMPLE_AES3,
};
enum DtMxOutputMode
{
DT_OUTPUT_MODE_ADD,
DT_OUTPUT_MODE_COPY,
DT_OUTPUT_MODE_DROP,
};
class DtMxAudioConfig
{
public:
int m_Index;
bool m_DeEmbed;
DtMxOutputMode m_OutputMode;
DtMxAudioSampleType m_Format;
DtMxAudioConfig();
};
enum DtMxAuxDataType
{
DT_AUXDATA_SDI,
};
class DtMxAuxObjConfig
{
public:
bool m_DeEmbed;
DtMxOutputMode m_OutputMode;
};
class DtMxAuxConfigSdi
{
public:
DtMxAuxObjConfig m_AncPackets;
};
class DtMxAuxDataConfig
{
public:
bool m_DeEmbedAll;
DtMxAuxDataType m_DataType;
union
{
DtMxAuxConfigSdi m_Sdi;
};
DtMxAuxDataConfig();
};
class DtMxRowConfig
{
public:
static const int MAX_NUM_AUDIO_CHANNELS = 16;
public:
DtMxRowConfig();
virtual ~DtMxRowConfig();
public:
bool m_Enable;
int m_RowSize;
void* m_pOpaq;
bool m_RawDataEnable;
DtMxRawConfig m_RawData;
bool m_VideoEnable;
DtMxVideoConfig m_Video;
bool m_AudioEnable;
DtMxAudioConfig m_AudioDef;
std::vector<DtMxAudioConfig> m_Audio;
bool m_AuxDataEnable;
DtMxAuxDataConfig m_AuxData;
};
class DtMxRawDataSdi
{
public:
unsigned char* m_pBuf;
int m_BufSize;
int m_Stride;
int m_StartLine;
int m_NumLines;
DtMxPixelFormat m_PixelFormat;
int m_Width;
int m_Height;
};
class DtMxRawData
{
public:
DtMxRawDataType m_Type;
union {
DtMxRawDataSdi m_Sdi;
};
};
class DtMxVideoPlaneBuf
{
public:
unsigned char* m_pBuf;
int m_BufSize;
int m_Stride;
int m_StartLine;
int m_NumLines;
DtMxVideoPlaneBuf();
};
enum DtMxVidPattern
{
DT_VIDPAT_BLACK_FRAME,
DT_VIDPAT_RED_FRAME,
DT_VIDPAT_GREEN_FRAME,
DT_VIDPAT_BLUE_FRAME,
DT_VIDPAT_WHITE_FRAME,
};
class DtMxVideoBuf
{
public:
DtMxVideoPlaneBuf m_Planes[3];
int m_NumPlanes;
DtMxPixelFormat m_PixelFormat;
int m_Scaling;
int m_Width;
int m_Height;
DTAPI_RESULT InitBuf(DtMxVidPattern Pattern);
DtMxVideoBuf();
};
class DtMxAuxData
{
public:
bool m_AncTimeCodeValid;
__int64 m_AncTimeCode;
};
class DtMxAncPacket
{
public:
int m_Did;
int m_SdidOrDbn;
int m_Dc;
int m_Cs;
unsigned short* m_pUdw;
int m_Line;
public:
int Type() const { return (m_Did & 0x80)==0 ? 2 : 1; }
public:
DtMxAncPacket();
virtual ~DtMxAncPacket();
private:
DtMxAncPacket(const DtMxAncPacket&);
};
class DtMxAudioChannelStatus
{
public:
DTAPI_RESULT GetSampleRate(int& SampleRate);
DTAPI_RESULT SetSampleRate(int SampleRate);
DTAPI_RESULT GetPcmAudio(bool& IsPcm);
DTAPI_RESULT SetPcmAudio(bool IsPcm);
DTAPI_RESULT GetPcmNumBits(int& NumBits, int& NumAuxBits);
DTAPI_RESULT SetPcmNumBits(int NumBits, int NumAuxBits=0);
unsigned char m_Data[24];
bool m_Valid;
DtMxAudioChannelStatus();
virtual ~DtMxAudioChannelStatus();
};
class DtMxAudioChannel
{
public:
int m_Index;
bool m_Present;
int m_Service;
unsigned int* m_pBuf;
int m_BufSizeSamples;
int m_NumValidSamples;
DtMxAudioChannelStatus m_Status;
const int m_NumSamplesHint;
const DtMxAudioSampleType m_Format;
public:
DtMxAudioChannel();
virtual ~DtMxAudioChannel();
DtMxAudioChannel& operator=(const DtMxAudioChannel& Other);
};
enum DtMxAudioServiceType
{
DT_AUDIOSERVICE_UNKNOWN,
DT_AUDIOSERVICE_MONO,
DT_AUDIOSERVICE_DUAL_MONO,
DT_AUDIOSERVICE_STEREO,
DT_AUDIOSERVICE_5_1,
};
template<typename T>
class DtFixedVector
{
public:
bool empty() const { return m_Data.empty(); }
size_t size() const { return m_Data.size(); }
T& operator[](size_t n) { return m_Data[n]; }
protected:
inline operator typename std::vector<T>& () { return m_Data; }
inline DtFixedVector& operator=(const DtFixedVector& Oth)
{
this->m_Data = Oth.m_Data;
return *this;
}
private:
std::vector<T> m_Data;
public:
DtFixedVector() {}
virtual ~DtFixedVector() {}
protected:
DtFixedVector(size_t Size) { m_Data.resize(Size); }
DtFixedVector(const DtFixedVector& Oth) { *this= Oth; }
private:
friend class MxFrameImpl;
friend class MxCommonData;
friend class MxDecData;
friend class MxActionAncEnc;
friend class MxProcessImpl;
};
class DtMxAudioService
{
public:
bool m_Valid;
DtMxAudioServiceType m_ServiceType;
std::vector<int> m_Channels;
int m_PcmNumBits;
bool m_ContainsData;
int m_SampleRate;
const int m_SamplesInFrame;
int m_AudioFrameNumber;
public:
DtMxAudioService();
DtMxAudioService& operator=(const DtMxAudioService& Other);
};
class DtMxAudioData
{
public:
DtFixedVector<DtMxAudioChannel> m_Channels;
DtFixedVector<DtMxAudioService> m_Services;
DTAPI_RESULT InitChannelStatus();
DTAPI_RESULT InitChannelStatus(const DtMxAudioService& Service);
};
enum DtMxFrameStatus
{
DT_FRMSTATUS_OK,
DT_FRMSTATUS_SKIPPED,
DT_FRMSTATUS_DISABLED,
DT_FRMSTATUS_DUPLICATE,
DT_FRMSTATUS_DROPPED,
DT_FRMSTATUS_NO_SIGNAL,
DT_FRMSTATUS_WRONG_VIDSTD,
DT_FRMSTATUS_DEV_DISCONNECTED,
DT_FRMSTATUS_ERROR_INTERNAL,
};
class DtMxFrame
{
public:
const DtMxRowConfig* const m_Config;
DtMxFrameStatus m_Status;
int m_VidStd;
DtMxFrame* m_DroppedFrame;
bool m_InpPhaseValid;
double m_InpPhase;
bool m_RawTimestampValid;
__int64 m_RawTimestamp;
bool m_RawDataValid;
DtMxRawData m_RawData;
bool m_VideoValid;
DtMxVideoBuf m_Video[2];
bool m_AudioValid;
DtMxAudioData m_Audio;
bool m_AuxDataValid;
DtMxAuxData m_AuxData;
virtual DTAPI_RESULT AncAddPacket(DtMxAncPacket& AncPacket, int HancVanc,
int Stream, int Link=-1) = 0;
virtual DTAPI_RESULT AncDelPacket(int Did, int Sdid, int StartLine,
int NumLines, int HancVanc, int Stream, int Mode, int Link=-1) = 0;
virtual DTAPI_RESULT AncGetPacket(int Did, int Sdid, DtMxAncPacket*, int& NumPackets,
int HancVanc, int Stream, int Link=-1) = 0;
protected:
DtMxFrame();
virtual ~DtMxFrame();
private:
DtMxFrame(const DtMxFrame&);
DtMxFrame& operator=(const DtMxFrame&);
};
class DtMxRowData
{
public:
DtMxFrame* m_CurFrame;
std::vector<const DtMxFrame*> m_Hist;
};
class DtMxData
{
public:
__int64 m_Frame;
int m_Phase;
int m_NumSkippedFrames;
DtFixedVector<DtMxRowData> m_Rows;
public:
DtMxData();
virtual ~DtMxData();
};
class DtMxPort
{
public:
DtMxPort();
DtMxPort(DtDevice*, int Port, int ClockPriority=0);
DtMxPort(int VidStd, int LinkStd);
DtMxPort(const DtMxPort&);
virtual ~DtMxPort();
DtMxPort& operator=(const DtMxPort&);
DTAPI_RESULT AddPhysicalPort(DtDevice*, int Port, int ClockPriority=0);
private:
class MxPortImpl* m_pImpl;
friend class DtMxProcess;
};
typedef void DtMxProcFrameFunc(DtMxData* pData, void* pOpaque);
typedef void DtMxVidBufFreeCallback(void* pMem, void* pOpaque);
enum DtMxClockMode
{
DT_MXCLOCK_AUTO,
DT_MXCLOCK_PCR_TIME_ACC,
DT_MXCLOCK_PCR_TIME_IP,
DT_MXCLOCK_SW_FIFO,
};
class DtMxCpuAffinity
{
public:
unsigned int m_Default;
unsigned int m_Dma;
unsigned int m_Decode;
unsigned int m_Encode;
};
class DtMxProcess
{
public:
DTAPI_RESULT AddMatrixCbFunc(DtMxProcFrameFunc* pFunc, void* pOpaque);
DTAPI_RESULT Reset();
DTAPI_RESULT AttachRowToInput(int Row, const DtMxPort& Port);
DTAPI_RESULT AttachRowToOutput(int Row, const DtMxPort& Port, int ExtraOutDelay=0);
DTAPI_RESULT SetClockControl(DtMxClockMode ClockMode, DtDevice* pDvc=NULL,
int AvgFifoLoad=-1);
DTAPI_RESULT NewClockSample(__int64 PcrOrFifoLoad, int RefClkCnt);
DTAPI_RESULT SetNumPhases(int NumPhases);
DTAPI_RESULT SetRowConfig(int Row, const DtMxRowConfig& Config);
DTAPI_RESULT SetVidStd(int Row, int VidStd);
DTAPI_RESULT SetVidBufFreeCb(DtMxVidBufFreeCallback* pFunc);
DTAPI_RESULT GetMinEndToEndDelay(int& Delay, double& CbFrames);
DTAPI_RESULT GetDefEndToEndDelay(int& Delay, double& CbFrames);
DTAPI_RESULT SetEndToEndDelay(int Delay);
DTAPI_RESULT Start();
DTAPI_RESULT Stop();
DTAPI_RESULT SetThreadAffinity(const DtMxCpuAffinity& Affinity);
DTAPI_RESULT PrintProfilingInfo();
private:
class MxProcessImpl* m_pImpl;
public:
DtMxProcess();
~DtMxProcess();
private:
DtMxProcess(const DtMxProcess&);
DtMxProcess& operator=(const DtMxProcess&);
};
}
#ifndef _NO_USING_NAMESPACE_DTAPI
using namespace Dtapi;
#endif
#endif