Commit 2e78b351 authored by Simon Morlat's avatar Simon Morlat

update for lastest oRTP with new logging api

parent d948afeb
......@@ -16,7 +16,7 @@ MEDIASTREAMER_MINOR_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f2)
MEDIASTREAMER_MICRO_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f3)
MEDIASTREAMER_EXTRA_VERSION=$(echo $PACKAGE_VERSION | cut -d. -f4)
LIBMEDIASTREAMER_SO_CURRENT=6 dnl increment this number when you add/change/remove an interface
LIBMEDIASTREAMER_SO_CURRENT=7 dnl increment this number when you add/change/remove an interface
LIBMEDIASTREAMER_SO_REVISION=0 dnl increment this number when you change source code, without changing interfaces; set to 0 when incrementing CURRENT
LIBMEDIASTREAMER_SO_AGE=0 dnl increment this number when you add an interface, set to 0 if you remove an interface
......
......@@ -89,7 +89,7 @@ static MS2_INLINE void ms_debug(const char *fmt,...)
{
va_list args;
va_start (args, fmt);
ortp_logv(ORTP_DEBUG, fmt, args);
ortp_logv(ORTP_LOG_DOMAIN, ORTP_DEBUG, fmt, args);
va_end (args);
}
#else
......
......@@ -620,7 +620,7 @@ void alsa_error_log_handler(const char *file, int line, const char *function, in
char * format = ms_strdup_printf("also error in %s:%d - %s", file, line, fmt);
va_list args;
va_start (args, fmt);
ortp_logv(ORTP_MESSAGE, format, args);
ortp_logv(ORTP_LOG_DOMAIN, ORTP_MESSAGE, format, args);
va_end (args);
ms_free(format);
}
......
......@@ -166,7 +166,7 @@ void ms_factory_init(MSFactory *obj){
debug_log_enabled=getenv("MEDIASTREAMER_DEBUG");
#endif
if (debug_log_enabled!=NULL && (strcmp("1",debug_log_enabled)==0) ){
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
}
ms_message("Mediastreamer2 factory " MEDIASTREAMER_VERSION " (git: " GIT_VERSION ") initialized.");
......
......@@ -40,7 +40,7 @@ static void log_handler(int lev, const char *fmt, va_list args) {
va_end(cap);
#endif
if (log_file){
ortp_logv_out(lev, fmt, args);
ortp_logv_out(ORTP_LOG_DOMAIN, lev, fmt, args);
}
}
......@@ -115,9 +115,9 @@ int main (int argc, char *argv[]) {
}
for(i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--verbose") == 0) {
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
} else if (strcmp(argv[i], "--silent") == 0) {
ortp_set_log_level_mask(ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_FATAL);
} else if (strcmp(argv[i],"--log-file")==0){
CHECK_ARG("--log-file", ++i, argc);
if (mediastreamer2_tester_set_log_file(argv[i]) < 0) return -2;
......
......@@ -335,7 +335,7 @@ int main(int argc, char *argv[]){
int pos;
int count;
ortp_init();
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ms_init();
rtp_profile_set_payload(&av_profile,115,&payload_type_lpc1015);
rtp_profile_set_payload(&av_profile,110,&payload_type_speex_nb);
......
......@@ -58,7 +58,7 @@ int main(int argc, char *argv[]){
#endif
ortp_init();
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ms_init();
#ifndef _WIN32_WCE
......
......@@ -681,9 +681,9 @@ void setup_media_streams(MediastreamDatas* args) {
ortp_set_log_file(args->logfile);
if (args->is_verbose) {
ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
} else {
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
}
ms_init();
......
......@@ -39,7 +39,7 @@ int main(int argc, char *argv[]){
if (argc>4){
params.chunk_size_ms = atoi(argv[4]);
}
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
if (ms_audio_diff(argv[1],argv[2],&ret,&params,completion_cb,NULL)==0){
fprintf(stdout,"%s and %s are similar with a degree of %g.\n",argv[1],argv[2],ret);
return 0;
......
......@@ -30,7 +30,7 @@ int main(int argc, char *argv[]){
ms_error("Usage: mtudiscover [host]");
return -1;
}
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
printf("result: %i \n",ms_discover_mtu(argv[1]));
ms_base_exit();
return 0;
......
......@@ -27,7 +27,7 @@ int main(int argc, char *argv[]){
const char * card_id=NULL;
ortp_init();
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ms_init();
if (argc>1){
file=argv[1];
......
......@@ -40,7 +40,7 @@ int main(int argc, char *argv[]){
MSTicker *ticker;
ms_base_init();
ortp_set_log_level_mask (ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask (ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
src=ms_filter_new(MS_FILE_PLAYER_ID);
rec=ms_filter_new(MS_FILE_REC_ID);
......
......@@ -40,7 +40,7 @@ int main(int argc, char *argv[]){
vsize.height=MS_VIDEO_SIZE_CIF_H;
ortp_init();
ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
ms_init();
cam=ms_web_cam_manager_get_default_cam(ms_web_cam_manager_get());
//cam=ms_web_cam_manager_get_cam(ms_web_cam_manager_get(),"StaticImage: Static picture");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment