From 061225db9b5b9a19ad8ea87ab3983eb5a01a5639 Mon Sep 17 00:00:00 2001 From: seife Date: Sat, 25 Dec 2010 17:43:28 +0000 Subject: [PATCH] add generic dispatcher headers for frontend etc add generic audio, video and demux headers in zapit/include (TODO: put them into a better place, or put wrappers into lib directories) that automatically dispatch to the hardware specific functions and use them in the code git-svn-id: http://www.coolstreamtech.de/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@962 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- libtriple/cs_api.h | 66 +++++++++++++++++++++++++++++++++++++++++++++ libtriple/init_td.h | 12 --------- 2 files changed, 66 insertions(+), 12 deletions(-) create mode 100644 libtriple/cs_api.h diff --git a/libtriple/cs_api.h b/libtriple/cs_api.h new file mode 100644 index 0000000..5512b92 --- /dev/null +++ b/libtriple/cs_api.h @@ -0,0 +1,66 @@ +/* compatibility header for tripledragon. I'm lazy, so I just left it + as "cs_api.h" so that I don't need too many ifdefs in the code */ + +#ifndef __CS_API_H_ +#define __CS_API_H_ + +#include "init_td.h" +typedef void (*cs_messenger) (unsigned int msg, unsigned int data); + +#if 0 +enum CS_LOG_MODULE { + CS_LOG_CI = 0, + CS_LOG_HDMI_CEC, + CS_LOG_HDMI, + CS_LOG_VIDEO, + CS_LOG_VIDEO_DRM, + CS_LOG_AUDIO, + CS_LOG_DEMUX, + CS_LOG_DENC, + CS_LOG_PVR_RECORD, + CS_LOG_PVR_PLAY, + CS_LOG_POWER_CTRL, + CS_LOG_POWER_CLK, + CS_LOG_MEM, + CS_LOG_API, +}; +#endif + +inline void cs_api_init() +{ + init_td_api(); +}; + +inline void cs_api_exit() +{ + shutdown_td_api(); +}; + +#define cs_malloc_uncached malloc +#define cs_free_uncached free + +// Callback function helpers +static inline void cs_register_messenger(cs_messenger) { return; }; +static inline void cs_deregister_messenger(void) { return; }; +//cs_messenger cs_get_messenger(void); + +#if 0 +// Logging functions +void cs_log_enable(void); +void cs_log_disable(void); +void cs_log_message(const char *prefix, const char *fmt, ...); +void cs_log_module_enable(enum CS_LOG_MODULE module); +void cs_log_module_disable(enum CS_LOG_MODULE module); +void cs_log_module_message(enum CS_LOG_MODULE module, const char *fmt, ...); + +// TS Routing +unsigned int cs_get_ts_output(void); +int cs_set_ts_output(unsigned int port); + +// Serial nr and revision accessors +unsigned long long cs_get_serial(void); +#endif +/* compat... HD1 seems to be version 6. everything newer ist > 6... */ +static unsigned int cs_get_revision(void) { return 1; }; +extern int cnxt_debug; +#endif //__CS_API_H_ diff --git a/libtriple/init_td.h b/libtriple/init_td.h index a3a0314..d9a6f09 100644 --- a/libtriple/init_td.h +++ b/libtriple/init_td.h @@ -2,16 +2,4 @@ #define __INIT_TD_H void init_td_api(); void shutdown_td_api(); - -inline void cs_api_init() -{ - init_td_api(); -}; - -inline void cs_api_exit() -{ - shutdown_td_api(); -}; -#define cs_malloc_uncached malloc -#define cs_free_uncached free #endif