diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:26:34 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-04-01 02:43:47 +0300 |
commit | cf9edda1d370d39bc8a3d020a9c2bc4090d2457e (patch) | |
tree | 1d1bbc529a4e8109fb6aa5cadf0dbbb7bd61013a /libaf/af.h | |
parent | 7af8417ae7beb409f54849956a7037bc66c4c334 (diff) | |
parent | 1c37a6427abef0827c608d328d37ca1b1a0a022d (diff) | |
download | mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.bz2 mpv-cf9edda1d370d39bc8a3d020a9c2bc4090d2457e.tar.xz |
Merge svn changes up to r29117
Diffstat (limited to 'libaf/af.h')
-rw-r--r-- | libaf/af.h | 43 |
1 files changed, 11 insertions, 32 deletions
diff --git a/libaf/af.h b/libaf/af.h index f5967d8bee..487c635a97 100644 --- a/libaf/af.h +++ b/libaf/af.h @@ -22,9 +22,18 @@ #include <stdio.h> #include "config.h" -#include "af_mp.h" -#include "control.h" + #include "af_format.h" +#include "control.h" +#include "cpudetect.h" +#include "mp_msg.h" + +/* Set the initialization type from mplayers cpudetect */ +#ifdef AF_INIT_TYPE +#undef AF_INIT_TYPE +#define AF_INIT_TYPE \ + ((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW) +#endif struct af_instance_s; @@ -342,34 +351,4 @@ void af_fix_parameters(af_data_t *data); #define lrnd(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5)) #endif -/* Error messages */ - -typedef struct af_msg_cfg_s -{ - int level; /* Message level for debug and error messages max = 2 - min = -2 default = 0 */ - FILE* err; // Stream to print error messages to - FILE* msg; // Stream to print information messages to -}af_msg_cfg_t; - -extern af_msg_cfg_t af_msg_cfg; // Message - -//! \addtogroup af_filter -//! \{ -#define AF_MSG_FATAL -3 ///< Fatal error exit immediately -#define AF_MSG_ERROR -2 ///< Error return gracefully -#define AF_MSG_WARN -1 ///< Print warning but do not exit (can be suppressed) -#define AF_MSG_INFO 0 ///< Important information -#define AF_MSG_VERBOSE 1 ///< Print this if verbose is enabled -#define AF_MSG_DEBUG0 2 ///< Print if very verbose -#define AF_MSG_DEBUG1 3 ///< Print if very very verbose - -//! Macro for printing error messages -#ifndef af_msg -#define af_msg(lev, args... ) \ -(((lev)<AF_MSG_WARN)?(fprintf(af_msg_cfg.err?af_msg_cfg.err:stderr, ## args )): \ -(((lev)<=af_msg_cfg.level)?(fprintf(af_msg_cfg.msg?af_msg_cfg.msg:stdout, ## args )):0)) -#endif -//! \} - #endif /* MPLAYER_AF_H */ |