From 84ee47fd7f6c146a676bd5ee02ae29936a80f216 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 28 Jul 2012 22:51:29 +0200 Subject: [PATCH] correctly declare AVSYNC_TYPE --- azbox/audio_lib.h | 3 ++- azbox/dmx_lib.h | 2 +- azbox/video_lib.h | 2 +- common/cs_types.h | 23 +++++++++++++++++++++++ libspark/audio_lib.h | 2 +- libspark/dmx_lib.h | 2 +- libspark/video_lib.h | 2 +- libtriple/audio_td.h | 2 +- libtriple/dmx_td.h | 2 +- libtriple/video_td.h | 3 +-- 10 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 common/cs_types.h diff --git a/azbox/audio_lib.h b/azbox/audio_lib.h index de27f60..871060d 100644 --- a/azbox/audio_lib.h +++ b/azbox/audio_lib.h @@ -3,6 +3,8 @@ #ifndef _AUDIO_LIB_H_ #define _AUDIO_LIB_H_ +#include "../common/cs_types.h" + typedef enum { AUDIO_SYNC_WITH_PTS, @@ -76,7 +78,6 @@ class cAudio int Stop(void); bool Pause(bool Pcm = true); void SetStreamType(AUDIO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE Mode); /* select channels */ diff --git a/azbox/dmx_lib.h b/azbox/dmx_lib.h index 12f5206..4c32d6c 100644 --- a/azbox/dmx_lib.h +++ b/azbox/dmx_lib.h @@ -6,6 +6,7 @@ #include #include #include +#include "../common/cs_types.h" typedef enum { @@ -46,7 +47,6 @@ class cDemux 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 pesFilter(const unsigned short pid); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); void * getBuffer(); void * getChannel(); diff --git a/azbox/video_lib.h b/azbox/video_lib.h index cd088f0..9a44aae 100644 --- a/azbox/video_lib.h +++ b/azbox/video_lib.h @@ -2,6 +2,7 @@ #define _VIDEO_TD_H #include +#include "../common/cs_types.h" typedef enum { ANALOG_SD_RGB_CINCH = 0x00, @@ -169,7 +170,6 @@ class cVideo /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; }; void SetCECAutoView(bool) { return; }; diff --git a/common/cs_types.h b/common/cs_types.h new file mode 100644 index 0000000..d044475 --- /dev/null +++ b/common/cs_types.h @@ -0,0 +1,23 @@ +/* pretty useless, but we don't need to work around this if + * we just copy it over... */ + +#ifndef __CS_TYPES_H_ +#define __CS_TYPES_H_ + +typedef enum +{ + AVSYNC_DISABLED, + AVSYNC_ENABLED, + 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; + +#endif // __CS_TYPES_H_ diff --git a/libspark/audio_lib.h b/libspark/audio_lib.h index 74dce1a..a8b5362 100644 --- a/libspark/audio_lib.h +++ b/libspark/audio_lib.h @@ -2,6 +2,7 @@ #ifndef _AUDIO_TD_H_ #define _AUDIO_TD_H_ +#include "../common/cs_types.h" typedef enum { @@ -76,7 +77,6 @@ class cAudio int Stop(void); bool Pause(bool Pcm = true); void SetStreamType(AUDIO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE Mode); /* select channels */ diff --git a/libspark/dmx_lib.h b/libspark/dmx_lib.h index 12f5206..4c32d6c 100644 --- a/libspark/dmx_lib.h +++ b/libspark/dmx_lib.h @@ -6,6 +6,7 @@ #include #include #include +#include "../common/cs_types.h" typedef enum { @@ -46,7 +47,6 @@ class cDemux 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 pesFilter(const unsigned short pid); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); void * getBuffer(); void * getChannel(); diff --git a/libspark/video_lib.h b/libspark/video_lib.h index cd088f0..9a44aae 100644 --- a/libspark/video_lib.h +++ b/libspark/video_lib.h @@ -2,6 +2,7 @@ #define _VIDEO_TD_H #include +#include "../common/cs_types.h" typedef enum { ANALOG_SD_RGB_CINCH = 0x00, @@ -169,7 +170,6 @@ class cVideo /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; }; void SetCECAutoView(bool) { return; }; diff --git a/libtriple/audio_td.h b/libtriple/audio_td.h index c38afef..bc320f1 100644 --- a/libtriple/audio_td.h +++ b/libtriple/audio_td.h @@ -4,6 +4,7 @@ #define _AUDIO_TD_H_ #include +#include "../common/cs_types.h" typedef enum { @@ -78,7 +79,6 @@ class cAudio int Stop(void); bool Pause(bool Pcm = true); void SetStreamType(AUDIO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE Mode); /* select channels */ diff --git a/libtriple/dmx_td.h b/libtriple/dmx_td.h index 1eb9ba1..d2d02bd 100644 --- a/libtriple/dmx_td.h +++ b/libtriple/dmx_td.h @@ -8,6 +8,7 @@ extern "C" { #include #include } +#include "../common/cs_types.h" #if defined DMX_FILTER_SIZE #undef DMX_FILTER_SIZE #endif @@ -52,7 +53,6 @@ class cDemux 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 pesFilter(const unsigned short pid); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); void * getBuffer(); void * getChannel(); diff --git a/libtriple/video_td.h b/libtriple/video_td.h index 0493880..831dc93 100644 --- a/libtriple/video_td.h +++ b/libtriple/video_td.h @@ -4,7 +4,7 @@ #include #define video_format_t vidDispSize_t //#define video_displayformat_t vidDispMode_t - +#include "../common/cs_types.h" typedef enum { ANALOG_SD_RGB_SCART = 0x00, @@ -165,7 +165,6 @@ class cVideo /* set video_system */ int SetVideoSystem(int video_system, bool remember = true); int SetStreamType(VIDEO_FORMAT type); -#define AVSYNC_TYPE int void SetSyncMode(AVSYNC_TYPE mode); bool SetCECMode(VIDEO_HDMI_CEC_MODE) { return true; }; void SetCECAutoView(bool) { return; };