includes: some manual code nicenings

Origin commit data
------------------
Branch: master
Commit: 59dd7a5268
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-11-07 (Sun, 07 Nov 2021)

Origin message was:
------------------
- includes: some manual code nicenings

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-11-07 00:57:01 +01:00
parent 734ae7aa84
commit 915ae81f37
9 changed files with 141 additions and 179 deletions

View File

@@ -5,6 +5,7 @@
#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;
@@ -105,16 +106,10 @@ class cCA
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;
};
/*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;
};
int GetCAIDS(CaIdVector & /*Caids*/) { return 0; };
bool Start(void);
void Stop(void);
void Ready(bool Set);
@@ -125,21 +120,12 @@ class cCA
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;
};
void SetTSClock(u32 /*Speed*/, int /*slot*/) { return; };
bool checkChannelID(u64 /*chanID*/) { return false; };
void setCheckLiveSlot(int /*check*/) { return; };
/// start pollthread after zapit is ready
virtual void setZapitReady(){zapitReady = true;};
virtual bool getZapitReady(){return zapitReady;};
virtual void setZapitReady() { zapitReady = true; };
virtual bool getZapitReady() { return zapitReady; };
/// Virtual destructor
virtual ~cCA();
};

View File

@@ -388,8 +388,8 @@ class cCA
/// as the name says
bool CheckCerts(void);
/// start pollthread after zapit is ready
virtual void setZapitReady(){zapitReady = true;};
virtual bool getZapitReady(){return zapitReady;};
virtual void setZapitReady() { zapitReady = true; };
virtual bool getZapitReady() { return zapitReady; };
/// Virtual destructor
virtual ~cCA();
};

View File

@@ -33,25 +33,13 @@ 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__

View File

@@ -92,19 +92,13 @@ class cDemux
void SetSyncMode(AVSYNC_TYPE mode);
void *getBuffer();
void *getChannel();
DMX_CHANNEL_TYPE getChannelType(void)
{
return dmx_type;
};
DMX_CHANNEL_TYPE getChannelType(void) { return dmx_type; };
bool addPid(unsigned short pid);
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:

View File

@@ -28,15 +28,9 @@ 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 */
}
std::vector<unsigned char> *getOSDBuffer() { return &osd_buf; } /* pointer to OSD bounce buffer */
void blit();
fb_var_screeninfo getScreenInfo()
{
return si;
}
fb_var_screeninfo getScreenInfo() { return si; }
private:
fb_var_screeninfo si;