include/ortp/ortp.h File Reference

General purpose library functions. More...

#include <ortp/rtpsession.h>
#include <ortp/sessionset.h>

Include dependency graph for ortp.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ortp_log_level_enabled(level)   (__ortp_log_mask & (level))
#define ortp_logv(level, fmt, args)
#define ortp_debug(...)

Typedefs

typedef void(*) OrtpLogFunc (OrtpLogLevel lev, const char *fmt, va_list args)

Enumerations

enum  OrtpLogLevel {
  ORTP_DEBUG = 1, ORTP_MESSAGE = 1<<1, ORTP_WARNING = 1<<2, ORTP_ERROR = 1<<3,
  ORTP_FATAL = 1<<4, ORTP_LOGLEV_END = 1<<5
}

Functions

bool_t ortp_min_version_required (int major, int minor, int micro)
void ortp_init (void)
void ortp_scheduler_init (void)
void ortp_exit (void)
void ortp_set_log_file (FILE *file)
void ortp_set_log_handler (OrtpLogFunc func)
void ortp_set_log_level_mask (int levelmask)
void ortp_global_stats_reset (void)
rtp_stats_tortp_get_global_stats (void)
void ortp_global_stats_display (void)
void rtp_stats_display (const rtp_stats_t *stats, const char *header)
void rtp_stats_reset (rtp_stats_t *stats)

Variables

VAR_DECLSPEC OrtpLogFunc ortp_logv_out
unsigned int __ortp_log_mask
rtp_stats_t ortp_global_stats


Detailed Description

General purpose library functions.

Definition in file ortp.h.


Define Documentation

#define ortp_logv ( level,
fmt,
args   ) 

Value:

{\
        if (ortp_logv_out!=NULL && ortp_log_level_enabled(level)) \
                ortp_logv_out(level,fmt,args);\
        if ((level)==ORTP_FATAL) abort();\
}while(0)

Definition at line 106 of file ortp.h.


Enumeration Type Documentation

enum OrtpLogLevel

Enumerator:
ORTP_DEBUG 
ORTP_MESSAGE 
ORTP_WARNING 
ORTP_ERROR 
ORTP_FATAL 
ORTP_LOGLEV_END 

Definition at line 84 of file ortp.h.


Function Documentation

void ortp_exit ( void   ) 

Gracefully uninitialize the library, including shutdowning the scheduler if it was started.

Definition at line 116 of file ortp.c.

void ortp_global_stats_display ( void   ) 

Display global statistics (cumulative for all RtpSession)

Definition at line 259 of file ortp.c.

void ortp_init ( void   ) 

Initialize the oRTP library. You should call this function first before using oRTP API.

Definition at line 69 of file ortp.c.

References av_profile.

bool_t ortp_min_version_required ( int  major,
int  minor,
int  micro 
)

This function give the opportunity to programs to check if the libortp they link to has the minimum version number they need.

Returns: true if ortp has a version number greater or equal than the required one.

Definition at line 342 of file ortp.c.

void ortp_scheduler_init ( void   ) 

Initialize the oRTP scheduler. You only have to do that if you intend to use the scheduled mode of the RtpSession in your application.

Definition at line 91 of file ortp.c.

void ortp_set_log_file ( FILE *  file  ) 

Parameters:
file a FILE pointer where to output the ortp logs.

Definition at line 139 of file ortp.c.

void ortp_set_log_handler ( OrtpLogFunc  func  ) 

Parameters:
func,: your logging function, compatible with the OrtpLogFunc prototype.

Definition at line 152 of file ortp.c.

void ortp_set_log_level_mask ( int  levelmask  ) 

@ param levelmask a mask of ORTP_DEBUG, ORTP_MESSAGE, ORTP_WARNING, ORTP_ERROR ORTP_FATAL .

Definition at line 163 of file ortp.c.

void rtp_stats_display ( const rtp_stats_t stats,
const char *  header 
)

Print RTP statistics.

Definition at line 270 of file ortp.c.

References rtp_stats::bad, rtp_stats::cum_packet_loss, rtp_stats::discarded, rtp_stats::hw_recv, ORTP_MESSAGE, rtp_stats::outoftime, rtp_stats::packet_recv, rtp_stats::packet_sent, rtp_stats::recv, rtp_stats::sent, and rtp_stats::unavaillable.


Generated on Fri Jun 22 17:52:13 2007 for oRTP by  doxygen 1.5.2