69 bool_t ortp_min_version_required(
int major,
int minor,
int micro);
71 void ortp_scheduler_init(
void);
73 uint32_t ortp_random(
void);
79 typedef enum { ORTP_DEBUG = 1, ORTP_MESSAGE = 1 << 1, ORTP_WARNING = 1 << 2, ORTP_ERROR = 1 << 3, ORTP_FATAL = 1 << 4, ORTP_LOGLEV_END = 1 << 5 } OrtpLogLevel;
81 typedef void (*OrtpLogFunc)(OrtpLogLevel lev,
const char *fmt, va_list args);
83 void ortp_set_log_file(FILE *file);
84 void ortp_set_log_handler(OrtpLogFunc func);
86 VAR_DECLSPEC OrtpLogFunc ortp_logv_out;
88 extern unsigned int __ortp_log_mask;
90 #define ortp_log_level_enabled(level) (__ortp_log_mask & (level))
92 void ortp_logv(
int level,
const char *fmt, va_list args);
94 void ortp_set_log_level_mask(
int levelmask);
96 #ifdef ORTP_DEBUG_MODE
97 static inline void ortp_debug(
const char *fmt, ...) {
100 ortp_logv(ORTP_DEBUG, fmt, args);
105 #define ortp_debug(...)
109 #ifdef ORTP_NOMESSAGE_MODE
111 #define ortp_log(...)
112 #define ortp_message(...)
113 #define ortp_warning(...)
117 static inline void ortp_log(OrtpLogLevel lev,
const char *fmt, ...) {
120 ortp_logv(lev, fmt, args);
124 static inline void ortp_message(
const char *fmt, ...) {
127 ortp_logv(ORTP_MESSAGE, fmt, args);
131 static inline void ortp_warning(
const char *fmt, ...) {
134 ortp_logv(ORTP_WARNING, fmt, args);
140 static inline void ortp_error(
const char *fmt, ...) {
143 ortp_logv(ORTP_ERROR, fmt, args);
147 static inline void ortp_fatal(
const char *fmt, ...) {
150 ortp_logv(ORTP_FATAL, fmt, args);
160 void ortp_global_stats_reset(
void);
163 void ortp_global_stats_display(
void);
164 void rtp_stats_display(
const rtp_stats_t *stats,
const char *header);
175 #define o_list_next(elem) ((elem)->next)
176 #define o_list_prev(elem) ((elem)->prev)
178 OList *o_list_append(
OList *elem,
void *data);
179 OList *o_list_insert(
OList *before_elem,
void *data);
180 OList *o_list_remove(
OList *list,
void *data);