94 typedef void (*OrtpLogFunc)(OrtpLogLevel lev,
const char *fmt, va_list args);
99 VAR_DECLSPEC OrtpLogFunc ortp_logv_out;
101 extern unsigned int __ortp_log_mask;
103 #define ortp_log_level_enabled(level) (__ortp_log_mask & (level)) 105 #if !defined(WIN32) && !defined(_WIN32_WCE) 106 #define ortp_logv(level,fmt,args) \ 108 if (ortp_logv_out!=NULL && ortp_log_level_enabled(level)) \ 109 ortp_logv_out(level,fmt,args);\ 110 if ((level)==ORTP_FATAL) abort();\ 113 void ortp_logv(
int level,
const char *fmt, va_list args);
119 #define CHECK_FORMAT_ARGS(m,n) __attribute__((format(printf,m,n))) 121 #define CHECK_FORMAT_ARGS(m,n) 125 #ifdef ORTP_DEBUG_MODE 126 static inline void CHECK_FORMAT_ARGS(1,2) ortp_debug(const
char *fmt,...)
129 va_start (args, fmt);
130 ortp_logv(ORTP_DEBUG, fmt, args);
135 #define ortp_debug(...) 139 #ifdef ORTP_NOMESSAGE_MODE 141 #define ortp_log(...) 142 #define ortp_message(...) 143 #define ortp_warning(...) 147 static inline void CHECK_FORMAT_ARGS(2,3) ortp_log(OrtpLogLevel lev, const
char *fmt,...) {
149 va_start (args, fmt);
150 ortp_logv(lev, fmt, args);
154 static inline void CHECK_FORMAT_ARGS(1,2) ortp_message(const
char *fmt,...)
157 va_start (args, fmt);
158 ortp_logv(ORTP_MESSAGE, fmt, args);
162 static inline void CHECK_FORMAT_ARGS(1,2) ortp_warning(const
char *fmt,...)
165 va_start (args, fmt);
166 ortp_logv(ORTP_WARNING, fmt, args);
172 static inline void CHECK_FORMAT_ARGS(1,2) ortp_error(const
char *fmt,...)
175 va_start (args, fmt);
176 ortp_logv(ORTP_ERROR, fmt, args);
180 static inline void CHECK_FORMAT_ARGS(1,2) ortp_fatal(const
char *fmt,...)
183 va_start (args, fmt);
184 ortp_logv(ORTP_FATAL, fmt, args);
195 void ortp_global_stats_reset(
void);
202 #if defined(_MSC_VER) 203 #define ORTP_PUBLIC __declspec(dllexport) void ortp_set_log_file(FILE *file)
Definition: ortp.c:155
void ortp_global_stats_display(void)
Definition: ortp.c:287
bool_t ortp_min_version_required(int major, int minor, int micro)
Definition: ortp.c:384
void rtp_stats_display(const rtp_stats_t *stats, const char *header)
Definition: ortp.c:298
void ortp_exit(void)
Definition: ortp.c:132
void ortp_init(void)
Definition: ortp.c:77
void ortp_scheduler_init(void)
Definition: ortp.c:107
void ortp_set_log_handler(OrtpLogFunc func)
Definition: ortp.c:168
Sending and receiving multiple streams together with only one thread.
void ortp_set_log_level_mask(int levelmask)
Definition: ortp.c:179