diff options
| author | Tobias Grimm <etobi@debian.org> | 2015-10-07 19:30:05 +0200 |
|---|---|---|
| committer | Tobias Grimm <etobi@debian.org> | 2015-10-07 19:30:05 +0200 |
| commit | 7092a2d6a6b2f988c86aea447edf553d0048cb4e (patch) | |
| tree | 57aac6ae7d5467527e3b07e898504b3d86ef48c8 /xineCommon.h | |
| download | vdr-plugin-xine-7092a2d6a6b2f988c86aea447edf553d0048cb4e.tar.gz vdr-plugin-xine-7092a2d6a6b2f988c86aea447edf553d0048cb4e.tar.bz2 | |
Imported v0.9.4v0.9.4
Diffstat (limited to 'xineCommon.h')
| -rw-r--r-- | xineCommon.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/xineCommon.h b/xineCommon.h new file mode 100644 index 0000000..ed5fe9d --- /dev/null +++ b/xineCommon.h @@ -0,0 +1,63 @@ + +#ifndef __XINECOMMON_H +#define __XINECOMMON_H + + + +#include <assert.h> +#include <math.h> +#include <signal.h> + +#define __STDC_FORMAT_MACROS +#include <inttypes.h> + +#include <string> +using namespace std; + +#include <xine.h> +#include <xine/vdr.h> + +#define MIN_XINE_VDR_VERSION 901 + +#if !defined(XINE_VDR_VERSION) || XINE_VDR_VERSION < MIN_XINE_VDR_VERSION +#error xine/vdr.h does not match. Please solve this issue by reading section XINE VDR VERSION MISMATCH in INSTALL! +#endif + +#include <vdr/config.h> // poisened + +#ifndef APIVERSNUM +#define APIVERSNUM VDRVERSNUM +#endif + + + +namespace PluginXine +{ + extern bool beQuiet; + + template <class DST_TYPE, class SRC_TYPE> + DST_TYPE &alias_cast(SRC_TYPE &rhs) + { + union hlp + { + SRC_TYPE src; + DST_TYPE dst; + }; + + return ((hlp &)rhs).dst; + } +}; + +#define xfprintf(fh, fmt, args...) \ + while (!PluginXine::beQuiet) \ + { \ + fprintf(fh, fmt, ##args); \ + /* char xfmt[ 500 ]; */ \ + /* sprintf(xfmt, "%s", fmt); */ \ + /* fprintf(fh, xfmt, ##args); */ \ + break; \ + } + + + +#endif //__XINECOMMON_H |
