/** * Initialize the oRTP library. You should call this function first before using * oRTP API. **/ void ortp_init() { if (ortp_initialized++) return; #ifdef _WIN32 win32_init_sockets(); #endif ortp_init_logger(); av_profile_init(&av_profile); ortp_global_stats_reset(); init_random_number_generator(); ortp_message("oRTP-" ORTP_VERSION " initialized."); }
void ortp_init() { #ifdef _WIN32 #define WORD unsigned short WORD wVersionRequested; WSADATA wsaData; #endif /* !_WIN32 */ static gboolean initialized=FALSE; /* <UOLFONE> */ #ifdef MBDB_LOCAL_POOL mbdb_mutex_init(); #endif ortp_global_stats_reset(); /* </UOLFONE> */ if (initialized) return; initialized=TRUE; #ifndef _WIN32 if (sysconf(_SC_OPEN_MAX)>FD_SETSIZE){ g_warning("Your kernel can handle much more file descriptors (sockets+files) than ortp does."); g_warning("This can result in bugs and crash when using many file descriptors."); g_warning("If you want to get rid of this problem, consider recompiling oRTP on your target machine."); } #endif #ifdef _WIN32 wVersionRequested = MAKEWORD( 1, 0 ); if (WSAStartup(wVersionRequested,&wsaData)!=0) { g_error("Fail to initialise socket api"); } #endif #ifdef HAVE_GLIB g_log_set_handler ("oRTP", G_LOG_LEVEL_MESSAGE, dummy_log, NULL); if (!g_thread_supported()) g_thread_init (NULL); #endif av_profile_init(&av_profile); /* <UOLFONE> */ /* #ifdef MBDB_LOCAL_POOL mbdb_mutex_init(); #endif ortp_global_stats_reset(); */ /* </UOLFONE> */ }
/** * Initialize the oRTP library. You should call this function first before using * oRTP API. **/ void ortp_init() { static bool_t initialized=FALSE; if (initialized) return; initialized=TRUE; #ifdef WIN32 win32_init_sockets(); #endif av_profile_init(&av_profile); ortp_global_stats_reset(); init_random_number_generator(); ortp_message("oRTP-" ORTP_VERSION " initialized."); }