armbox: start implementing cec support

This commit is contained in:
TangoCash
2017-10-17 18:00:36 +02:00
parent 6268ebdb1b
commit a3ecb31bc9
2 changed files with 216 additions and 3 deletions

View File

@@ -135,6 +135,19 @@ typedef enum
VIDEO_CONTROL_MAX = VIDEO_CONTROL_SHARPNESS
} VIDEO_CONTROL;
struct cec_message
{
unsigned char address;
unsigned char length;
unsigned char data[256];
}__attribute__((packed));
#define cec_rx_message cec_message
struct addressinfo
{
unsigned char logical;
unsigned char physical[2];
unsigned char type;
};
class cVideo
{
@@ -167,6 +180,11 @@ class cVideo
/* used internally by dmx */
int64_t GetPTS(void);
unsigned char physicalAddress[2];
bool fixedAddress,standby_cec_activ,autoview_cec_activ;
unsigned char deviceType, logicalAddress;
int hdmiFd;
public:
/* constructor & destructor */
cVideo(int mode, void *, void *, unsigned int unit = 0);
@@ -208,9 +226,12 @@ class cVideo
int SetVideoSystem(int video_system, bool remember = true);
int SetStreamType(VIDEO_FORMAT type);
void SetSyncMode(AVSYNC_TYPE mode);
bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; };
void SetCECAutoView(bool) { return; };
void SetCECAutoStandby(bool) { return; };
bool SetCECMode(VIDEO_HDMI_CEC_MODE);
void SetCECAutoView(bool);
void SetCECAutoStandby(bool);
void getCECAddressInfo();
void sendCECMessage(struct cec_message &message);
void SetCECState(bool state);
void ShowPicture(const char * fname, const char *_destname = NULL);
void StopPicture();
void Standby(unsigned int bOn);