mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
formatting code using astyle
Origin commit data
------------------
Branch: master
Commit: bc17c13de4
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-05-17 (Mon, 17 May 2021)
Origin message was:
------------------
- formatting code using astyle
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
140
include/ca.h
140
include/ca.h
@@ -5,49 +5,53 @@
|
||||
#include "cs_types.h"
|
||||
#include <vector>
|
||||
#include <set>
|
||||
typedef std::vector<u16> CaIdVector;
|
||||
typedef std::vector<u16>::iterator CaIdVectorIterator;
|
||||
typedef std::vector<u16>::const_iterator CaIdVectorConstIterator;
|
||||
typedef std::vector<u16> CaIdVector;
|
||||
typedef std::vector<u16>::iterator CaIdVectorIterator;
|
||||
typedef std::vector<u16>::const_iterator CaIdVectorConstIterator;
|
||||
|
||||
enum CA_INIT_MASK {
|
||||
enum CA_INIT_MASK
|
||||
{
|
||||
CA_INIT_SC = 1,
|
||||
CA_INIT_CI,
|
||||
CA_INIT_BOTH
|
||||
};
|
||||
|
||||
enum CA_SLOT_TYPE {
|
||||
enum CA_SLOT_TYPE
|
||||
{
|
||||
CA_SLOT_TYPE_SMARTCARD,
|
||||
CA_SLOT_TYPE_CI,
|
||||
CA_SLOT_TYPE_ALL
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_FLAGS {
|
||||
CA_MESSAGE_EMPTY = (1 << 0),
|
||||
CA_MESSAGE_HAS_PARAM1_DATA = (1 << 1), // Free after use!
|
||||
CA_MESSAGE_HAS_PARAM1_INT = (1 << 2),
|
||||
CA_MESSAGE_HAS_PARAM1_PTR = (1 << 3),
|
||||
CA_MESSAGE_HAS_PARAM2_INT = (1 << 4),
|
||||
CA_MESSAGE_HAS_PARAM2_PTR = (1 << 5),
|
||||
CA_MESSAGE_HAS_PARAM2_DATA = (1 << 6),
|
||||
CA_MESSAGE_HAS_PARAM3_DATA = (1 << 7), // Free after use!
|
||||
CA_MESSAGE_HAS_PARAM3_INT = (1 << 8),
|
||||
CA_MESSAGE_HAS_PARAM3_PTR = (1 << 9),
|
||||
CA_MESSAGE_HAS_PARAM4_INT = (1 << 10),
|
||||
CA_MESSAGE_HAS_PARAM4_PTR = (1 << 11),
|
||||
CA_MESSAGE_HAS_PARAM4_DATA = (1 << 12),
|
||||
CA_MESSAGE_HAS_PARAM5_INT = (1 << 13),
|
||||
CA_MESSAGE_HAS_PARAM5_PTR = (1 << 14),
|
||||
CA_MESSAGE_HAS_PARAM5_DATA = (1 << 15),
|
||||
CA_MESSAGE_HAS_PARAM6_INT = (1 << 16),
|
||||
CA_MESSAGE_HAS_PARAM6_PTR = (1 << 17),
|
||||
CA_MESSAGE_HAS_PARAM6_DATA = (1 << 18),
|
||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
||||
enum CA_MESSAGE_FLAGS
|
||||
{
|
||||
CA_MESSAGE_EMPTY = (1 << 0),
|
||||
CA_MESSAGE_HAS_PARAM1_DATA = (1 << 1), // Free after use!
|
||||
CA_MESSAGE_HAS_PARAM1_INT = (1 << 2),
|
||||
CA_MESSAGE_HAS_PARAM1_PTR = (1 << 3),
|
||||
CA_MESSAGE_HAS_PARAM2_INT = (1 << 4),
|
||||
CA_MESSAGE_HAS_PARAM2_PTR = (1 << 5),
|
||||
CA_MESSAGE_HAS_PARAM2_DATA = (1 << 6),
|
||||
CA_MESSAGE_HAS_PARAM3_DATA = (1 << 7), // Free after use!
|
||||
CA_MESSAGE_HAS_PARAM3_INT = (1 << 8),
|
||||
CA_MESSAGE_HAS_PARAM3_PTR = (1 << 9),
|
||||
CA_MESSAGE_HAS_PARAM4_INT = (1 << 10),
|
||||
CA_MESSAGE_HAS_PARAM4_PTR = (1 << 11),
|
||||
CA_MESSAGE_HAS_PARAM4_DATA = (1 << 12),
|
||||
CA_MESSAGE_HAS_PARAM5_INT = (1 << 13),
|
||||
CA_MESSAGE_HAS_PARAM5_PTR = (1 << 14),
|
||||
CA_MESSAGE_HAS_PARAM5_DATA = (1 << 15),
|
||||
CA_MESSAGE_HAS_PARAM6_INT = (1 << 16),
|
||||
CA_MESSAGE_HAS_PARAM6_PTR = (1 << 17),
|
||||
CA_MESSAGE_HAS_PARAM6_DATA = (1 << 18),
|
||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_MSGID {
|
||||
enum CA_MESSAGE_MSGID
|
||||
{
|
||||
CA_MESSAGE_MSG_INSERTED,
|
||||
CA_MESSAGE_MSG_REMOVED,
|
||||
CA_MESSAGE_MSG_INIT_OK,
|
||||
@@ -73,12 +77,14 @@ enum CA_MESSAGE_MSGID {
|
||||
typedef std::set<int> ca_map_t;
|
||||
typedef ca_map_t::iterator ca_map_iterator_t;
|
||||
|
||||
typedef struct CA_MESSAGE {
|
||||
typedef struct CA_MESSAGE
|
||||
{
|
||||
uint32_t MsgId;
|
||||
enum CA_SLOT_TYPE SlotType;
|
||||
int Slot;
|
||||
uint32_t Flags;
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8_t *Data[4];
|
||||
uint32_t Param[4];
|
||||
void *Ptr[4];
|
||||
@@ -86,34 +92,50 @@ typedef struct CA_MESSAGE {
|
||||
} Msg;
|
||||
} CA_MESSAGE;
|
||||
|
||||
class cCA {
|
||||
private:
|
||||
cCA(void);
|
||||
public:
|
||||
uint32_t GetNumberCISlots(void);
|
||||
uint32_t GetNumberSmartCardSlots(void);
|
||||
static cCA *GetInstance(void);
|
||||
bool SendPMT(int Unit, unsigned char *Data, int Len, CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL);
|
||||
class cCA
|
||||
{
|
||||
private:
|
||||
cCA(void);
|
||||
public:
|
||||
uint32_t GetNumberCISlots(void);
|
||||
uint32_t GetNumberSmartCardSlots(void);
|
||||
static cCA *GetInstance(void);
|
||||
bool SendPMT(int Unit, unsigned char *Data, int Len, CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL);
|
||||
// bool SendCAPMT(u64 /*Source*/, u8 /*DemuxSource*/, u8 /*DemuxMask*/, const unsigned char * /*CAPMT*/, u32 /*CAPMTLen*/, const unsigned char * /*RawPMT*/, u32 /*RawPMTLen*/) { return true; };
|
||||
bool SendCAPMT(u64 /*Source*/, u8 /*DemuxSource*/, u8 /*DemuxMask*/, const unsigned char * /*CAPMT*/, u32 /*CAPMTLen*/, const unsigned char * /*RawPMT*/, u32 /*RawPMTLen*/, enum CA_SLOT_TYPE
|
||||
/*SlotType*/, unsigned char /*scrambled = 0*/, ca_map_t /*camap = std::set<int>()*/, int /*mode = 0*/, bool /*enabled = false*/) { return true; };
|
||||
bool SendMessage(const CA_MESSAGE *Msg);
|
||||
void SetInitMask(enum CA_INIT_MASK InitMask);
|
||||
int GetCAIDS(CaIdVector & /*Caids*/) { return 0; };
|
||||
bool Start(void);
|
||||
void Stop(void);
|
||||
void Ready(bool Set);
|
||||
void ModuleReset(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
bool ModulePresent(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void ModuleName(enum CA_SLOT_TYPE, uint32_t Slot, char *Name);
|
||||
void MenuEnter(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void MenuAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint32_t choice);
|
||||
void InputAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint8_t * Data, int Len);
|
||||
void MenuClose(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void SetTSClock(u32 /*Speed*/, int /*slot*/) { return; };
|
||||
bool checkChannelID(u64 /*chanID*/) { return false; };
|
||||
void setCheckLiveSlot(int /*check*/) { return; };
|
||||
virtual ~cCA();
|
||||
bool SendCAPMT(u64 /*Source*/, u8 /*DemuxSource*/, u8 /*DemuxMask*/, const unsigned char * /*CAPMT*/, u32 /*CAPMTLen*/, const unsigned char * /*RawPMT*/, u32 /*RawPMTLen*/, enum CA_SLOT_TYPE
|
||||
/*SlotType*/, unsigned char /*scrambled = 0*/, ca_map_t /*camap = std::set<int>()*/, int /*mode = 0*/, bool /*enabled = false*/)
|
||||
{
|
||||
return true;
|
||||
};
|
||||
bool SendMessage(const CA_MESSAGE *Msg);
|
||||
void SetInitMask(enum CA_INIT_MASK InitMask);
|
||||
int GetCAIDS(CaIdVector & /*Caids*/)
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
bool Start(void);
|
||||
void Stop(void);
|
||||
void Ready(bool Set);
|
||||
void ModuleReset(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
bool ModulePresent(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void ModuleName(enum CA_SLOT_TYPE, uint32_t Slot, char *Name);
|
||||
void MenuEnter(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void MenuAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint32_t choice);
|
||||
void InputAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint8_t *Data, int Len);
|
||||
void MenuClose(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
void SetTSClock(u32 /*Speed*/, int /*slot*/)
|
||||
{
|
||||
return;
|
||||
};
|
||||
bool checkChannelID(u64 /*chanID*/)
|
||||
{
|
||||
return false;
|
||||
};
|
||||
void setCheckLiveSlot(int /*check*/)
|
||||
{
|
||||
return;
|
||||
};
|
||||
virtual ~cCA();
|
||||
};
|
||||
|
||||
#endif // __CA_H__
|
||||
|
364
include/ca_ci.h
364
include/ca_ci.h
@@ -15,60 +15,64 @@
|
||||
#include "cs_api.h"
|
||||
|
||||
/* constants taken from dvb-apps */
|
||||
#define T_SB 0x80 // sb primitive h<--m
|
||||
#define T_RCV 0x81 // receive primitive h-->m
|
||||
#define T_CREATE_T_C 0x82 // create transport connection primitive h-->m
|
||||
#define T_C_T_C_REPLY 0x83 // ctc reply primitive h<--m
|
||||
#define T_DELETE_T_C 0x84 // delete tc primitive h<->m
|
||||
#define T_D_T_C_REPLY 0x85 // dtc reply primitive h<->m
|
||||
#define T_REQUEST_T_C 0x86 // request transport connection primitive h<--m
|
||||
#define T_NEW_T_C 0x87 // new tc / reply to t_request primitive h-->m
|
||||
#define T_T_C_ERROR 0x77 // error creating tc primitive h-->m
|
||||
#define T_DATA_LAST 0xA0 // convey data from higher constructed h<->m
|
||||
#define T_DATA_MORE 0xA1 // convey data from higher constructed h<->m
|
||||
#define T_SB 0x80 // sb primitive h<--m
|
||||
#define T_RCV 0x81 // receive primitive h-->m
|
||||
#define T_CREATE_T_C 0x82 // create transport connection primitive h-->m
|
||||
#define T_C_T_C_REPLY 0x83 // ctc reply primitive h<--m
|
||||
#define T_DELETE_T_C 0x84 // delete tc primitive h<->m
|
||||
#define T_D_T_C_REPLY 0x85 // dtc reply primitive h<->m
|
||||
#define T_REQUEST_T_C 0x86 // request transport connection primitive h<--m
|
||||
#define T_NEW_T_C 0x87 // new tc / reply to t_request primitive h-->m
|
||||
#define T_T_C_ERROR 0x77 // error creating tc primitive h-->m
|
||||
#define T_DATA_LAST 0xA0 // convey data from higher constructed h<->m
|
||||
#define T_DATA_MORE 0xA1 // convey data from higher constructed h<->m
|
||||
|
||||
/* max multi decrypt per ci-cam */
|
||||
#define CI_MAX_MULTI 5
|
||||
#define CI_MAX_MULTI 5
|
||||
|
||||
enum CA_INIT_MASK {
|
||||
enum CA_INIT_MASK
|
||||
{
|
||||
CA_INIT_SC = 1,
|
||||
CA_INIT_CI,
|
||||
CA_INIT_BOTH
|
||||
};
|
||||
|
||||
enum CA_SLOT_TYPE {
|
||||
enum CA_SLOT_TYPE
|
||||
{
|
||||
CA_SLOT_TYPE_SMARTCARD,
|
||||
CA_SLOT_TYPE_CI,
|
||||
CA_SLOT_TYPE_ALL
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_FLAGS {
|
||||
CA_MESSAGE_EMPTY = (1 << 0),
|
||||
CA_MESSAGE_HAS_PARAM1_DATA = (1 << 1), /// Free after use!
|
||||
CA_MESSAGE_HAS_PARAM1_INT = (1 << 2),
|
||||
CA_MESSAGE_HAS_PARAM1_PTR = (1 << 3),
|
||||
CA_MESSAGE_HAS_PARAM2_INT = (1 << 4),
|
||||
CA_MESSAGE_HAS_PARAM2_PTR = (1 << 5),
|
||||
CA_MESSAGE_HAS_PARAM2_DATA = (1 << 6),
|
||||
CA_MESSAGE_HAS_PARAM3_DATA = (1 << 7), /// Free after use!
|
||||
CA_MESSAGE_HAS_PARAM3_INT = (1 << 8),
|
||||
CA_MESSAGE_HAS_PARAM3_PTR = (1 << 9),
|
||||
CA_MESSAGE_HAS_PARAM4_INT = (1 << 10),
|
||||
CA_MESSAGE_HAS_PARAM4_PTR = (1 << 11),
|
||||
CA_MESSAGE_HAS_PARAM4_DATA = (1 << 12),
|
||||
CA_MESSAGE_HAS_PARAM5_INT = (1 << 13),
|
||||
CA_MESSAGE_HAS_PARAM5_PTR = (1 << 14),
|
||||
CA_MESSAGE_HAS_PARAM5_DATA = (1 << 15),
|
||||
CA_MESSAGE_HAS_PARAM6_INT = (1 << 16),
|
||||
CA_MESSAGE_HAS_PARAM6_PTR = (1 << 17),
|
||||
CA_MESSAGE_HAS_PARAM6_DATA = (1 << 18),
|
||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
||||
enum CA_MESSAGE_FLAGS
|
||||
{
|
||||
CA_MESSAGE_EMPTY = (1 << 0),
|
||||
CA_MESSAGE_HAS_PARAM1_DATA = (1 << 1), /// Free after use!
|
||||
CA_MESSAGE_HAS_PARAM1_INT = (1 << 2),
|
||||
CA_MESSAGE_HAS_PARAM1_PTR = (1 << 3),
|
||||
CA_MESSAGE_HAS_PARAM2_INT = (1 << 4),
|
||||
CA_MESSAGE_HAS_PARAM2_PTR = (1 << 5),
|
||||
CA_MESSAGE_HAS_PARAM2_DATA = (1 << 6),
|
||||
CA_MESSAGE_HAS_PARAM3_DATA = (1 << 7), /// Free after use!
|
||||
CA_MESSAGE_HAS_PARAM3_INT = (1 << 8),
|
||||
CA_MESSAGE_HAS_PARAM3_PTR = (1 << 9),
|
||||
CA_MESSAGE_HAS_PARAM4_INT = (1 << 10),
|
||||
CA_MESSAGE_HAS_PARAM4_PTR = (1 << 11),
|
||||
CA_MESSAGE_HAS_PARAM4_DATA = (1 << 12),
|
||||
CA_MESSAGE_HAS_PARAM5_INT = (1 << 13),
|
||||
CA_MESSAGE_HAS_PARAM5_PTR = (1 << 14),
|
||||
CA_MESSAGE_HAS_PARAM5_DATA = (1 << 15),
|
||||
CA_MESSAGE_HAS_PARAM6_INT = (1 << 16),
|
||||
CA_MESSAGE_HAS_PARAM6_PTR = (1 << 17),
|
||||
CA_MESSAGE_HAS_PARAM6_DATA = (1 << 18),
|
||||
CA_MESSAGE_HAS_PARAM1_LONG = (1 << 19),
|
||||
CA_MESSAGE_HAS_PARAM2_LONG = (1 << 20),
|
||||
CA_MESSAGE_HAS_PARAM3_LONG = (1 << 21),
|
||||
CA_MESSAGE_HAS_PARAM4_LONG = (1 << 22)
|
||||
};
|
||||
|
||||
enum CA_MESSAGE_MSGID {
|
||||
enum CA_MESSAGE_MSGID
|
||||
{
|
||||
CA_MESSAGE_MSG_INSERTED,
|
||||
CA_MESSAGE_MSG_REMOVED,
|
||||
CA_MESSAGE_MSG_INIT_OK,
|
||||
@@ -91,12 +95,14 @@ enum CA_MESSAGE_MSGID {
|
||||
CA_MESSAGE_MSG_EXIT
|
||||
};
|
||||
|
||||
typedef struct CA_MESSAGE {
|
||||
typedef struct CA_MESSAGE
|
||||
{
|
||||
uint32_t MsgId;
|
||||
enum CA_SLOT_TYPE SlotType;
|
||||
int Slot;
|
||||
uint32_t Flags;
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint8_t *Data[4];
|
||||
uint32_t Param[4];
|
||||
void *Ptr[4];
|
||||
@@ -107,22 +113,23 @@ typedef struct CA_MESSAGE {
|
||||
typedef std::set<int> ca_map_t;
|
||||
typedef ca_map_t::iterator ca_map_iterator_t;
|
||||
|
||||
typedef std::vector<u16> bSIDVector;
|
||||
typedef std::vector<u16> bSIDVector;
|
||||
|
||||
typedef std::vector<u16> CaIdVector;
|
||||
typedef std::vector<u16>::iterator CaIdVectorIterator;
|
||||
typedef std::vector<u16>::const_iterator CaIdVectorConstIterator;
|
||||
typedef std::vector<u16> CaIdVector;
|
||||
typedef std::vector<u16>::iterator CaIdVectorIterator;
|
||||
typedef std::vector<u16>::const_iterator CaIdVectorConstIterator;
|
||||
|
||||
#define CA_MESSAGE_SIZE sizeof(CA_MESSAGE)
|
||||
#define CA_MESSAGE_ENTRIES 256
|
||||
#define CA_MESSAGE_ENTRIES_CI 128
|
||||
#define CA_MESSAGE_ENTRIES_SC 64
|
||||
#define CA_MESSAGE_SIZE sizeof(CA_MESSAGE)
|
||||
#define CA_MESSAGE_ENTRIES 256
|
||||
#define CA_MESSAGE_ENTRIES_CI 128
|
||||
#define CA_MESSAGE_ENTRIES_SC 64
|
||||
|
||||
#ifndef CS_CA_PDATA
|
||||
#define CS_CA_PDATA void
|
||||
#define CS_CA_PDATA void
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
TUNER_A,
|
||||
TUNER_B,
|
||||
TUNER_C,
|
||||
@@ -153,7 +160,8 @@ typedef enum {
|
||||
#endif
|
||||
} source_t;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
eDataTimeout,
|
||||
eDataError,
|
||||
eDataReady,
|
||||
@@ -161,7 +169,8 @@ typedef enum {
|
||||
eDataStatusChanged
|
||||
} eData;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
eStatusNone,
|
||||
eStatusWait,
|
||||
eStatusReset
|
||||
@@ -173,11 +182,11 @@ struct queueData
|
||||
unsigned char *data;
|
||||
unsigned int len;
|
||||
queueData(unsigned char *_data, unsigned int _len, __u8 _prio = 0)
|
||||
:prio(_prio), data(_data), len(_len)
|
||||
: prio(_prio), data(_data), len(_len)
|
||||
{
|
||||
|
||||
}
|
||||
bool operator < ( const struct queueData &a ) const
|
||||
bool operator < (const struct queueData &a) const
|
||||
{
|
||||
return prio < a.prio;
|
||||
}
|
||||
@@ -197,17 +206,17 @@ typedef struct
|
||||
eStatus status;
|
||||
|
||||
int receivedLen;
|
||||
unsigned char* receivedData;
|
||||
unsigned char *receivedData;
|
||||
|
||||
void* pClass;
|
||||
void *pClass;
|
||||
|
||||
bool pollConnection;
|
||||
bool camIsReady;
|
||||
|
||||
eDVBCIMMISession* mmiSession;
|
||||
eDVBCIApplicationManagerSession* appSession;
|
||||
eDVBCICAManagerSession* camgrSession;
|
||||
eDVBCIContentControlManagerSession* ccmgrSession;
|
||||
eDVBCIMMISession *mmiSession;
|
||||
eDVBCIApplicationManagerSession *appSession;
|
||||
eDVBCICAManagerSession *camgrSession;
|
||||
eDVBCIContentControlManagerSession *ccmgrSession;
|
||||
|
||||
bool hasAppManager;
|
||||
bool hasMMIManager;
|
||||
@@ -253,131 +262,132 @@ typedef struct
|
||||
|
||||
} eDVBCISlot;
|
||||
|
||||
eData sendData(eDVBCISlot *slot, unsigned char* data, int len);
|
||||
eData sendData(eDVBCISlot *slot, unsigned char *data, int len);
|
||||
|
||||
typedef std::list<eDVBCISlot*>::iterator SlotIt;
|
||||
typedef std::list<eDVBCISlot *>::iterator SlotIt;
|
||||
|
||||
/// CA module class
|
||||
class cCA {
|
||||
private:
|
||||
/// Static instance of the CA module
|
||||
class cCA
|
||||
{
|
||||
private:
|
||||
/// Static instance of the CA module
|
||||
// static cCA *inst;
|
||||
/// Private constructor (singleton method)
|
||||
cCA(void);
|
||||
/// Private data for the CA module
|
||||
CS_CA_PDATA *privateData;
|
||||
/// set inputs with tuner letter in tsmux
|
||||
void setInputs();
|
||||
/// write ci info file to /tmp
|
||||
void write_ci_info(int slot, CaIdVector caids);
|
||||
/// delete ci info file
|
||||
void del_ci_info(int slot);
|
||||
/// extract audio / video pids from capmt
|
||||
void extractPids(eDVBCISlot* slot);
|
||||
/// ci module is detected
|
||||
void ci_inserted(eDVBCISlot* slot);
|
||||
/// ci module is removed
|
||||
void ci_removed(eDVBCISlot* slot);
|
||||
/// decode the tpdu tag
|
||||
void process_tpdu(eDVBCISlot* slot, unsigned char tpdu_tag, __u8* data, int asn_data_length, int con_id);
|
||||
/// set flag of running ci record to false
|
||||
bool StopRecordCI( u64 TP, u16 SID, u8 source, u32 calen);
|
||||
/// set flag of running ci live-tv to false
|
||||
bool StopLiveCI( u64 TP, u16 SID, u8 source, u32 calen);
|
||||
/// find an unused ci slot for use with service
|
||||
SlotIt FindFreeSlot(u64 tpid, u8 source, u16 sid, ca_map_t camap, u8 scrambled);
|
||||
/// get slot iterator by slot number
|
||||
SlotIt GetSlot(unsigned int slot);
|
||||
/// send buffered capmt to ci modul
|
||||
bool SendCaPMT(eDVBCISlot* slot);
|
||||
/// send a dummy capmt to ci for deactivating
|
||||
bool SendNullPMT(eDVBCISlot* slot);
|
||||
/// set ci source
|
||||
void setSource(eDVBCISlot* slot);
|
||||
/// set demux source
|
||||
void setInputSource(eDVBCISlot* slot, bool ci);
|
||||
/// check if data in queue
|
||||
bool checkQueueSize(eDVBCISlot* slot);
|
||||
enum CA_INIT_MASK initMask;
|
||||
int num_slots;
|
||||
bool init;
|
||||
void SendPMT();
|
||||
pthread_mutex_t ciMutex;
|
||||
std::list<eDVBCISlot*> slot_data;
|
||||
pthread_t slot_thread;
|
||||
/// Private constructor (singleton method)
|
||||
cCA(void);
|
||||
/// Private data for the CA module
|
||||
CS_CA_PDATA *privateData;
|
||||
/// set inputs with tuner letter in tsmux
|
||||
void setInputs();
|
||||
/// write ci info file to /tmp
|
||||
void write_ci_info(int slot, CaIdVector caids);
|
||||
/// delete ci info file
|
||||
void del_ci_info(int slot);
|
||||
/// extract audio / video pids from capmt
|
||||
void extractPids(eDVBCISlot *slot);
|
||||
/// ci module is detected
|
||||
void ci_inserted(eDVBCISlot *slot);
|
||||
/// ci module is removed
|
||||
void ci_removed(eDVBCISlot *slot);
|
||||
/// decode the tpdu tag
|
||||
void process_tpdu(eDVBCISlot *slot, unsigned char tpdu_tag, __u8 *data, int asn_data_length, int con_id);
|
||||
/// set flag of running ci record to false
|
||||
bool StopRecordCI(u64 TP, u16 SID, u8 source, u32 calen);
|
||||
/// set flag of running ci live-tv to false
|
||||
bool StopLiveCI(u64 TP, u16 SID, u8 source, u32 calen);
|
||||
/// find an unused ci slot for use with service
|
||||
SlotIt FindFreeSlot(u64 tpid, u8 source, u16 sid, ca_map_t camap, u8 scrambled);
|
||||
/// get slot iterator by slot number
|
||||
SlotIt GetSlot(unsigned int slot);
|
||||
/// send buffered capmt to ci modul
|
||||
bool SendCaPMT(eDVBCISlot *slot);
|
||||
/// send a dummy capmt to ci for deactivating
|
||||
bool SendNullPMT(eDVBCISlot *slot);
|
||||
/// set ci source
|
||||
void setSource(eDVBCISlot *slot);
|
||||
/// set demux source
|
||||
void setInputSource(eDVBCISlot *slot, bool ci);
|
||||
/// check if data in queue
|
||||
bool checkQueueSize(eDVBCISlot *slot);
|
||||
enum CA_INIT_MASK initMask;
|
||||
int num_slots;
|
||||
bool init;
|
||||
void SendPMT();
|
||||
pthread_mutex_t ciMutex;
|
||||
std::list<eDVBCISlot *> slot_data;
|
||||
pthread_t slot_thread;
|
||||
|
||||
public:
|
||||
/// sh4 unused
|
||||
bool Init(void);
|
||||
/// init ci and start the loop
|
||||
cCA(int Slots);
|
||||
/// Returns the number of CI slots
|
||||
uint32_t GetNumberCISlots(void);
|
||||
/// Returns the number of Smartcard slots
|
||||
uint32_t GetNumberSmartCardSlots(void);
|
||||
/// Singleton
|
||||
static cCA *GetInstance(void);
|
||||
/// Send PMT to a individual or to all available modules (DEPRECATED)
|
||||
bool SendPMT(int Unit, unsigned char *Data, int Len, enum CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL);
|
||||
/// Sends a message to the CA thread
|
||||
bool SendMessage(const CA_MESSAGE *Msg);
|
||||
/// Sets which modules to initialize. It is only
|
||||
/// possible to change this once!
|
||||
/// sh4 unused
|
||||
void SetInitMask(enum CA_INIT_MASK InitMask);
|
||||
/// Sets the frequency (in Hz) of the TS stream input (only valid for CI)
|
||||
/// sh4 unused
|
||||
void SetTSClock(u32 Speed, int slot = 0);
|
||||
public:
|
||||
/// sh4 unused
|
||||
bool Init(void);
|
||||
/// init ci and start the loop
|
||||
cCA(int Slots);
|
||||
/// Returns the number of CI slots
|
||||
uint32_t GetNumberCISlots(void);
|
||||
/// Returns the number of Smartcard slots
|
||||
uint32_t GetNumberSmartCardSlots(void);
|
||||
/// Singleton
|
||||
static cCA *GetInstance(void);
|
||||
/// Send PMT to a individual or to all available modules (DEPRECATED)
|
||||
bool SendPMT(int Unit, unsigned char *Data, int Len, enum CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL);
|
||||
/// Sends a message to the CA thread
|
||||
bool SendMessage(const CA_MESSAGE *Msg);
|
||||
/// Sets which modules to initialize. It is only
|
||||
/// possible to change this once!
|
||||
/// sh4 unused
|
||||
void SetInitMask(enum CA_INIT_MASK InitMask);
|
||||
/// Sets the frequency (in Hz) of the TS stream input (only valid for CI)
|
||||
/// sh4 unused
|
||||
void SetTSClock(u32 Speed, int slot = 0);
|
||||
|
||||
#if BOXMODEL_VUPLUS_ALL
|
||||
/// dvb wait delay for ci response
|
||||
void SetCIDelay(int Delay);
|
||||
/// relevant pids routing
|
||||
void SetCIRelevantPidsRouting(int RPR, int slot = 0);
|
||||
/// dvb wait delay for ci response
|
||||
void SetCIDelay(int Delay);
|
||||
/// relevant pids routing
|
||||
void SetCIRelevantPidsRouting(int RPR, int slot = 0);
|
||||
#endif
|
||||
|
||||
/// Start the CA module
|
||||
/// sh4 unused
|
||||
bool Start(void);
|
||||
/// Stops the CA module
|
||||
/// sh4 unused
|
||||
void Stop(void);
|
||||
/// Notify that the GUI is ready to receive messages
|
||||
/// (CA messages coming from a module)
|
||||
/// sh4 unused
|
||||
void Ready(bool Set);
|
||||
/// Resets a module (if possible)
|
||||
/// sh4 unused
|
||||
void ModuleReset(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Checks if a module is present
|
||||
bool ModulePresent(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Returns the module name in array Name
|
||||
void ModuleName(enum CA_SLOT_TYPE, uint32_t Slot, char *Name);
|
||||
/// Notify the module we want to enter menu
|
||||
void MenuEnter(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Notify the module with our answer (choice nr)
|
||||
void MenuAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint32_t choice);
|
||||
/// Notify the module with our answer (binary)
|
||||
void InputAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint8_t * Data, int Len);
|
||||
/// Notify the module we closed the menu
|
||||
void MenuClose(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Get the supported CAIDs
|
||||
int GetCAIDS(CaIdVector &Caids);
|
||||
/// Send a CA-PMT object and Raw unparsed PMT to the CA layer
|
||||
bool SendCAPMT(u64 /*Source*/, u8 /*DemuxSource*/, u8 /*DemuxMask*/, const unsigned char * /*CAPMT*/, u32 /*CAPMTLen*/, const unsigned char * /*RawPMT*/, u32 /*RawPMTLen*/, enum CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL,
|
||||
unsigned char scrambled = 0, ca_map_t camap = std::set<int>(), int mode = 0, bool enabled = false);
|
||||
/// sh4 unused
|
||||
bool SendDateTime(void);
|
||||
/// the main loop
|
||||
void slot_pollthread(void *c);
|
||||
/// check if current channel uses any ci module
|
||||
bool checkChannelID(u64 chanID);
|
||||
/// set checking for live-tv use ci to true
|
||||
void setCheckLiveSlot(int check);
|
||||
/// as the name says
|
||||
bool CheckCerts(void);
|
||||
/// Virtual destructor
|
||||
virtual ~cCA();
|
||||
/// Start the CA module
|
||||
/// sh4 unused
|
||||
bool Start(void);
|
||||
/// Stops the CA module
|
||||
/// sh4 unused
|
||||
void Stop(void);
|
||||
/// Notify that the GUI is ready to receive messages
|
||||
/// (CA messages coming from a module)
|
||||
/// sh4 unused
|
||||
void Ready(bool Set);
|
||||
/// Resets a module (if possible)
|
||||
/// sh4 unused
|
||||
void ModuleReset(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Checks if a module is present
|
||||
bool ModulePresent(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Returns the module name in array Name
|
||||
void ModuleName(enum CA_SLOT_TYPE, uint32_t Slot, char *Name);
|
||||
/// Notify the module we want to enter menu
|
||||
void MenuEnter(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Notify the module with our answer (choice nr)
|
||||
void MenuAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint32_t choice);
|
||||
/// Notify the module with our answer (binary)
|
||||
void InputAnswer(enum CA_SLOT_TYPE, uint32_t Slot, uint8_t *Data, int Len);
|
||||
/// Notify the module we closed the menu
|
||||
void MenuClose(enum CA_SLOT_TYPE, uint32_t Slot);
|
||||
/// Get the supported CAIDs
|
||||
int GetCAIDS(CaIdVector &Caids);
|
||||
/// Send a CA-PMT object and Raw unparsed PMT to the CA layer
|
||||
bool SendCAPMT(u64 /*Source*/, u8 /*DemuxSource*/, u8 /*DemuxMask*/, const unsigned char * /*CAPMT*/, u32 /*CAPMTLen*/, const unsigned char * /*RawPMT*/, u32 /*RawPMTLen*/, enum CA_SLOT_TYPE SlotType = CA_SLOT_TYPE_ALL,
|
||||
unsigned char scrambled = 0, ca_map_t camap = std::set<int>(), int mode = 0, bool enabled = false);
|
||||
/// sh4 unused
|
||||
bool SendDateTime(void);
|
||||
/// the main loop
|
||||
void slot_pollthread(void *c);
|
||||
/// check if current channel uses any ci module
|
||||
bool checkChannelID(u64 chanID);
|
||||
/// set checking for live-tv use ci to true
|
||||
void setCheckLiveSlot(int check);
|
||||
/// as the name says
|
||||
bool CheckCerts(void);
|
||||
/// Virtual destructor
|
||||
virtual ~cCA();
|
||||
};
|
||||
|
||||
#endif // __CA_CI_H__
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#include "init.h"
|
||||
#include <config.h>
|
||||
|
||||
typedef void (*cs_messenger) (unsigned int msg, unsigned int data);
|
||||
typedef void (*cs_messenger)(unsigned int msg, unsigned int data);
|
||||
|
||||
inline void cs_api_init()
|
||||
{
|
||||
@@ -19,8 +19,8 @@ inline void cs_api_exit()
|
||||
hal_api_exit();
|
||||
};
|
||||
|
||||
#define cs_malloc_uncached malloc
|
||||
#define cs_free_uncached free
|
||||
#define cs_malloc_uncached malloc
|
||||
#define cs_free_uncached free
|
||||
|
||||
// Callback function helpers
|
||||
#if HAVE_DUCKBOX_HARDWARE \
|
||||
@@ -32,13 +32,25 @@ inline void cs_api_exit()
|
||||
)
|
||||
void cs_register_messenger(cs_messenger messenger);
|
||||
#else
|
||||
static inline void cs_register_messenger(cs_messenger) { return; };
|
||||
static inline void cs_register_messenger(cs_messenger)
|
||||
{
|
||||
return;
|
||||
};
|
||||
#endif
|
||||
static inline void cs_deregister_messenger(void) { return; };
|
||||
static inline void cs_deregister_messenger(void)
|
||||
{
|
||||
return;
|
||||
};
|
||||
|
||||
/* compat... HD1 seems to be version 6. everything newer ist > 6... */
|
||||
static inline unsigned int cs_get_revision(void) { return 1; };
|
||||
static inline unsigned int cs_get_chip_type(void) { return 0; };
|
||||
static inline unsigned int cs_get_revision(void)
|
||||
{
|
||||
return 1;
|
||||
};
|
||||
static inline unsigned int cs_get_chip_type(void)
|
||||
{
|
||||
return 0;
|
||||
};
|
||||
extern int cnxt_debug;
|
||||
|
||||
#endif // __CS_API_H__
|
||||
|
@@ -26,7 +26,8 @@
|
||||
#define VFDSETTIMEMODE 0xc0425b03
|
||||
#define VFDDISPLAYCLR 0xc0425b00
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
#if defined(BOXMODEL_OCTAGON1008)
|
||||
ICON_DOLBY = 0x10,
|
||||
ICON_DTS,
|
||||
@@ -248,42 +249,47 @@ typedef enum {
|
||||
#endif
|
||||
} fp_icon;
|
||||
|
||||
typedef enum {
|
||||
FP_FLAG_NONE = 0x00,
|
||||
FP_FLAG_SCROLL_ON = 0x01, /* switch scrolling on */
|
||||
FP_FLAG_SCROLL_LTR = 0x02, /* scroll from left to rightinstead of default right to left direction (i.e. for arabic text) */
|
||||
FP_FLAG_SCROLL_SIO = 0x04, /* start/stop scrolling with empty screen (scroll in/out) */
|
||||
FP_FLAG_SCROLL_DELAY = 0x08, /* delayed scroll start */
|
||||
FP_FLAG_ALIGN_LEFT = 0x10, /* align the text in display from the left (default) */
|
||||
FP_FLAG_ALIGN_RIGHT = 0x20, /* align the text in display from the right (arabic) */
|
||||
FP_FLAG_UPDATE_SCROLL_POS = 0x40, /* update the current position for scrolling */
|
||||
typedef enum
|
||||
{
|
||||
FP_FLAG_NONE = 0x00,
|
||||
FP_FLAG_SCROLL_ON = 0x01, /* switch scrolling on */
|
||||
FP_FLAG_SCROLL_LTR = 0x02, /* scroll from left to rightinstead of default right to left direction (i.e. for arabic text) */
|
||||
FP_FLAG_SCROLL_SIO = 0x04, /* start/stop scrolling with empty screen (scroll in/out) */
|
||||
FP_FLAG_SCROLL_DELAY = 0x08, /* delayed scroll start */
|
||||
FP_FLAG_ALIGN_LEFT = 0x10, /* align the text in display from the left (default) */
|
||||
FP_FLAG_ALIGN_RIGHT = 0x20, /* align the text in display from the right (arabic) */
|
||||
FP_FLAG_UPDATE_SCROLL_POS = 0x40, /* update the current position for scrolling */
|
||||
} fp_flag;
|
||||
|
||||
typedef struct {
|
||||
unsigned char brightness;
|
||||
unsigned char flags;
|
||||
unsigned char current_hour;
|
||||
unsigned char current_minute;
|
||||
unsigned char timer_minutes_hi;
|
||||
unsigned char timer_minutes_lo;
|
||||
typedef struct
|
||||
{
|
||||
unsigned char brightness;
|
||||
unsigned char flags;
|
||||
unsigned char current_hour;
|
||||
unsigned char current_minute;
|
||||
unsigned char timer_minutes_hi;
|
||||
unsigned char timer_minutes_lo;
|
||||
} fp_standby_data_t;
|
||||
|
||||
typedef enum {
|
||||
FP_LED_1_ON = 0x81,
|
||||
FP_LED_2_ON = 0x82,
|
||||
FP_LED_3_ON = 0x83,
|
||||
FP_LED_1_OFF = 0x01,
|
||||
FP_LED_2_OFF = 0x02,
|
||||
FP_LED_3_OFF = 0x03
|
||||
typedef enum
|
||||
{
|
||||
FP_LED_1_ON = 0x81,
|
||||
FP_LED_2_ON = 0x82,
|
||||
FP_LED_3_ON = 0x83,
|
||||
FP_LED_1_OFF = 0x01,
|
||||
FP_LED_2_OFF = 0x02,
|
||||
FP_LED_3_OFF = 0x03
|
||||
} fp_led_ctrl_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned char source;
|
||||
unsigned char time_minutes_hi;
|
||||
unsigned char time_minutes_lo;
|
||||
typedef struct
|
||||
{
|
||||
unsigned char source;
|
||||
unsigned char time_minutes_hi;
|
||||
unsigned char time_minutes_lo;
|
||||
} fp_wakeup_data_t;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
FP_WAKEUP_SOURCE_TIMER = 0x01,
|
||||
FP_WAKEUP_SOURCE_BUTTON = 0x02,
|
||||
FP_WAKEUP_SOURCE_REMOTE = 0x04,
|
||||
@@ -291,30 +297,34 @@ typedef enum {
|
||||
FP_WAKEUP_SOURCE_POWER = 0xFF
|
||||
} fp_wakeup_source;
|
||||
|
||||
typedef struct {
|
||||
unsigned short addr;
|
||||
unsigned short cmd;
|
||||
typedef struct
|
||||
{
|
||||
unsigned short addr;
|
||||
unsigned short cmd;
|
||||
} fp_standby_cmd_data_t;
|
||||
|
||||
typedef enum {
|
||||
FP_DISPLAY_TEXT_NONE = 0,
|
||||
typedef enum
|
||||
{
|
||||
FP_DISPLAY_TEXT_NONE = 0,
|
||||
FP_DISPLAY_TEXT_LIMITED,
|
||||
FP_DISPLAY_TEXT_ALL,
|
||||
} fp_display_text_type_t;
|
||||
|
||||
typedef enum {
|
||||
FP_DISPLAY_TYPE_NONE = 0,
|
||||
typedef enum
|
||||
{
|
||||
FP_DISPLAY_TYPE_NONE = 0,
|
||||
FP_DISPLAY_TYPE_VFD,
|
||||
FP_DISPLAY_TYPE_OLED,
|
||||
FP_DISPLAY_TYPE_LED_SEGMENT
|
||||
} fp_display_type_t;
|
||||
|
||||
typedef struct {
|
||||
fp_display_type_t display_type;
|
||||
unsigned short xres, yres;
|
||||
unsigned int segment_count;
|
||||
fp_display_text_type_t text_support;
|
||||
bool number_support;
|
||||
typedef struct
|
||||
{
|
||||
fp_display_type_t display_type;
|
||||
unsigned short xres, yres;
|
||||
unsigned int segment_count;
|
||||
fp_display_text_type_t text_support;
|
||||
bool number_support;
|
||||
} fp_display_caps_t;
|
||||
|
||||
#endif // __CS_FRONTPANEL_H__
|
||||
|
@@ -11,13 +11,13 @@ typedef enum
|
||||
AVSYNC_AUDIO_IS_MASTER
|
||||
} AVSYNC_TYPE;
|
||||
|
||||
typedef unsigned long long u64;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned char u8;
|
||||
typedef signed long long s64;
|
||||
typedef signed int s32;
|
||||
typedef signed short s16;
|
||||
typedef signed char s8;
|
||||
typedef unsigned long long u64;
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned char u8;
|
||||
typedef signed long long s64;
|
||||
typedef signed int s32;
|
||||
typedef signed short s16;
|
||||
typedef signed char s8;
|
||||
|
||||
#endif // __CS_TYPES_H__
|
||||
|
@@ -80,30 +80,36 @@ class cRecord;
|
||||
class cPlayback;
|
||||
class cDemux
|
||||
{
|
||||
friend class cRecord;
|
||||
friend class cPlayback;
|
||||
friend class cRecord;
|
||||
friend class cPlayback;
|
||||
public:
|
||||
bool Open(DMX_CHANNEL_TYPE pes_type, void * x = NULL, int y = 0);
|
||||
bool Open(DMX_CHANNEL_TYPE pes_type, void *x = NULL, int y = 0);
|
||||
void Close(void);
|
||||
bool Start(bool record = false);
|
||||
bool Stop(void);
|
||||
int Read(unsigned char *buff, int len, int Timeout = 0);
|
||||
bool sectionFilter(unsigned short pid, const unsigned char * const filter, const unsigned char * const mask, int len, int Timeout = 0, const unsigned char * const negmask = NULL);
|
||||
bool sectionFilter(unsigned short pid, const unsigned char *const filter, const unsigned char *const mask, int len, int Timeout = 0, const unsigned char *const negmask = NULL);
|
||||
bool pesFilter(const unsigned short pid);
|
||||
void SetSyncMode(AVSYNC_TYPE mode);
|
||||
void * getBuffer();
|
||||
void * getChannel();
|
||||
DMX_CHANNEL_TYPE getChannelType(void) { return dmx_type; };
|
||||
void *getBuffer();
|
||||
void *getChannel();
|
||||
DMX_CHANNEL_TYPE getChannelType(void)
|
||||
{
|
||||
return dmx_type;
|
||||
};
|
||||
bool addPid(unsigned short pid);
|
||||
void getSTC(int64_t * STC);
|
||||
void getSTC(int64_t *STC);
|
||||
int getUnit(void);
|
||||
static bool SetSource(int unit, int source);
|
||||
static int GetSource(int unit);
|
||||
int getFD(void) { return fd; }; /* needed by cPlayback class */
|
||||
int getFD(void)
|
||||
{
|
||||
return fd;
|
||||
}; /* needed by cPlayback class */
|
||||
cDemux(int num = 0);
|
||||
~cDemux();
|
||||
private:
|
||||
void removePid(unsigned short Pid); /* needed by cRecord class */
|
||||
void removePid(unsigned short Pid); /* needed by cRecord class */
|
||||
int num;
|
||||
int fd;
|
||||
int buffersize;
|
||||
|
@@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2010 Carsten Juttner <carjay@gmx.net>
|
||||
Copyright 2012,2013 Stefan Seyfried <seife@tuxboxcvs.slipkontur.de>
|
||||
Copyright 2010 Carsten Juttner <carjay@gmx.net>
|
||||
Copyright 2012,2013 Stefan Seyfried <seife@tuxboxcvs.slipkontur.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GLFB_H__
|
||||
@@ -25,20 +25,26 @@
|
||||
|
||||
class GLFramebuffer : public OpenThreads::Thread
|
||||
{
|
||||
public:
|
||||
GLFramebuffer(int x, int y);
|
||||
~GLFramebuffer();
|
||||
std::vector<unsigned char> *getOSDBuffer() { return &osd_buf; } /* pointer to OSD bounce buffer */
|
||||
void blit();
|
||||
fb_var_screeninfo getScreenInfo() { return si; }
|
||||
public:
|
||||
GLFramebuffer(int x, int y);
|
||||
~GLFramebuffer();
|
||||
std::vector<unsigned char> *getOSDBuffer()
|
||||
{
|
||||
return &osd_buf; /* pointer to OSD bounce buffer */
|
||||
}
|
||||
void blit();
|
||||
fb_var_screeninfo getScreenInfo()
|
||||
{
|
||||
return si;
|
||||
}
|
||||
|
||||
private:
|
||||
fb_var_screeninfo si;
|
||||
std::vector<unsigned char> osd_buf; /* silly bounce buffer */
|
||||
void run(); /* for OpenThreads::Thread */
|
||||
void setup();
|
||||
void blit_osd();
|
||||
void *pdata; /* not yet used */
|
||||
private:
|
||||
fb_var_screeninfo si;
|
||||
std::vector<unsigned char> osd_buf; /* silly bounce buffer */
|
||||
void run(); /* for OpenThreads::Thread */
|
||||
void setup();
|
||||
void blit_osd();
|
||||
void *pdata; /* not yet used */
|
||||
};
|
||||
|
||||
#endif // __GLFB_H__
|
||||
|
@@ -16,8 +16,8 @@ typedef enum
|
||||
{
|
||||
HW_DISPLAY_NONE,
|
||||
HW_DISPLAY_LED_ONLY,
|
||||
HW_DISPLAY_LED_NUM, /* simple 7 segment LED display */
|
||||
HW_DISPLAY_LINE_TEXT, /* 1 line text display */
|
||||
HW_DISPLAY_LED_NUM, /* simple 7 segment LED display */
|
||||
HW_DISPLAY_LINE_TEXT, /* 1 line text display */
|
||||
HW_DISPLAY_GFX
|
||||
} display_type_t;
|
||||
|
||||
@@ -33,11 +33,11 @@ typedef struct hw_caps
|
||||
int can_cpufreq;
|
||||
int can_shutdown;
|
||||
int can_cec;
|
||||
int can_ar_14_9; /* video drivers have 14:9 aspect ratio mode */
|
||||
int can_ps_14_9; /* video drivers have 14:9 panscan mode */
|
||||
int force_tuner_2G; /* force DVB-S2 even though driver may not advertise it */
|
||||
int can_ar_14_9; /* video drivers have 14:9 aspect ratio mode */
|
||||
int can_ps_14_9; /* video drivers have 14:9 panscan mode */
|
||||
int force_tuner_2G; /* force DVB-S2 even though driver may not advertise it */
|
||||
display_type_t display_type;
|
||||
int display_xres; /* x resolution or chars per line */
|
||||
int display_xres; /* x resolution or chars per line */
|
||||
int display_yres;
|
||||
int display_can_deepstandby;
|
||||
int display_can_set_brightness;
|
||||
|
@@ -1,11 +1,12 @@
|
||||
#ifndef __MMI_H__
|
||||
#define __MMI_H__
|
||||
|
||||
#define MAX_MMI_ITEMS 40
|
||||
#define MAX_MMI_TEXT_LEN 255
|
||||
#define MAX_MMI_CHOICE_TEXT_LEN 255
|
||||
#define MAX_MMI_ITEMS 40
|
||||
#define MAX_MMI_TEXT_LEN 255
|
||||
#define MAX_MMI_CHOICE_TEXT_LEN 255
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
MMI_TOP_MENU_SUBS = 1,
|
||||
MMI_TOP_MENU_EVENTS,
|
||||
MMI_TOP_MENU_TOKENS,
|
||||
@@ -14,20 +15,23 @@ typedef enum {
|
||||
MMI_TOP_MENU_ABOUT
|
||||
} MMI_MENU_CURRENT;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
MMI_MENU_LEVEL_MAIN = 0,
|
||||
MMI_MENU_LEVEL_MATURE,
|
||||
MMI_MENU_LEVEL_ASK_PIN_MATURE
|
||||
} MMI_MENU_LEVEL;
|
||||
|
||||
typedef enum {
|
||||
typedef enum
|
||||
{
|
||||
MMI_PIN_LEVEL_ASK_OLD = 0,
|
||||
MMI_PIN_LEVEL_CHECK_CURRENT,
|
||||
MMI_PIN_LEVEL_ASK_REPEAT,
|
||||
MMI_PIN_LEVEL_CHECK_AND_CHANGE
|
||||
} MMI_PIN_LEVEL;
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
int slot;
|
||||
int choice_nb;
|
||||
char title[MAX_MMI_TEXT_LEN];
|
||||
@@ -36,7 +40,8 @@ typedef struct {
|
||||
char choice_item[MAX_MMI_ITEMS][MAX_MMI_CHOICE_TEXT_LEN];
|
||||
} MMI_MENU_LIST_INFO;
|
||||
|
||||
typedef struct {
|
||||
typedef struct
|
||||
{
|
||||
int slot;
|
||||
int blind;
|
||||
int answerlen;
|
||||
|
@@ -20,28 +20,28 @@
|
||||
|
||||
class cCpuFreqManager
|
||||
{
|
||||
public:
|
||||
cCpuFreqManager(void);
|
||||
void Up(void);
|
||||
void Down(void);
|
||||
void Reset(void);
|
||||
public:
|
||||
cCpuFreqManager(void);
|
||||
void Up(void);
|
||||
void Down(void);
|
||||
void Reset(void);
|
||||
|
||||
bool SetCpuFreq(unsigned long CpuFreq);
|
||||
bool SetDelta(unsigned long Delta);
|
||||
unsigned long GetCpuFreq(void);
|
||||
unsigned long GetDelta(void);
|
||||
bool SetCpuFreq(unsigned long CpuFreq);
|
||||
bool SetDelta(unsigned long Delta);
|
||||
unsigned long GetCpuFreq(void);
|
||||
unsigned long GetDelta(void);
|
||||
};
|
||||
|
||||
class cPowerManager
|
||||
{
|
||||
public:
|
||||
cPowerManager(void);
|
||||
virtual ~cPowerManager();
|
||||
public:
|
||||
cPowerManager(void);
|
||||
virtual ~cPowerManager();
|
||||
|
||||
bool Open(void);
|
||||
void Close(void);
|
||||
bool Open(void);
|
||||
void Close(void);
|
||||
|
||||
bool SetStandby(bool Active, bool Passive);
|
||||
bool SetStandby(bool Active, bool Passive);
|
||||
};
|
||||
|
||||
#endif // __PWRMNGR_H__
|
||||
|
@@ -6,13 +6,13 @@
|
||||
// library version functions
|
||||
typedef struct hal_libversion_t
|
||||
{
|
||||
std::string vVersion;
|
||||
int vMajor;
|
||||
int vMinor;
|
||||
int vPatch;;
|
||||
std::string vName;
|
||||
std::string vStr;
|
||||
std::string vGitDescribe;
|
||||
std::string vVersion;
|
||||
int vMajor;
|
||||
int vMinor;
|
||||
int vPatch;;
|
||||
std::string vName;
|
||||
std::string vStr;
|
||||
std::string vGitDescribe;
|
||||
} hal_libversion_struct_t;
|
||||
|
||||
void hal_get_lib_version(hal_libversion_t *ver);
|
||||
|
Reference in New Issue
Block a user