diff options
-rw-r--r-- | pjsip-apps/src/samples/siprtp.c | 10 | ||||
-rw-r--r-- | pjsip-apps/src/samples/siprtp_report.c | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c index 14830640..46d6cba0 100644 --- a/pjsip-apps/src/samples/siprtp.c +++ b/pjsip-apps/src/samples/siprtp.c @@ -47,6 +47,7 @@ static const char *USAGE = " --log-level=N, -l Set log verbosity level (default=5)\n" " --app-log-level=N Set app screen log verbosity (default=3)\n" " --log-file=FILE Write log to file FILE\n" +" --report-file=FILE Write report to file FILE\n" "\n" /* Don't support this anymore, because codec is properly examined in pjmedia_session_info_from_sdp() function. @@ -155,6 +156,7 @@ static struct app int app_log_level; int log_level; char *log_filename; + char *report_filename; struct codec audio_codec; @@ -820,7 +822,8 @@ static pj_status_t init_options(int argc, char *argv[]) enum { OPT_START, OPT_APP_LOG_LEVEL, OPT_LOG_FILE, - OPT_A_PT, OPT_A_NAME, OPT_A_CLOCK, OPT_A_BITRATE, OPT_A_PTIME }; + OPT_A_PT, OPT_A_NAME, OPT_A_CLOCK, OPT_A_BITRATE, OPT_A_PTIME, + OPT_REPORT_FILE }; struct pj_getopt_option long_options[] = { { "count", 1, 0, 'c' }, @@ -834,6 +837,8 @@ static pj_status_t init_options(int argc, char *argv[]) { "app-log-level", 1, 0, OPT_APP_LOG_LEVEL }, { "log-file", 1, 0, OPT_LOG_FILE }, + { "report-file", 1, 0, OPT_REPORT_FILE }, + /* Don't support this anymore, see comments in USAGE above. { "a-pt", 1, 0, OPT_A_PT }, { "a-name", 1, 0, OPT_A_NAME }, @@ -927,6 +932,9 @@ static pj_status_t init_options(int argc, char *argv[]) case OPT_A_PTIME: app.audio_codec.ptime = atoi(pj_optarg); break; + case OPT_REPORT_FILE: + app.report_filename = pj_optarg; + break; default: puts(USAGE); diff --git a/pjsip-apps/src/samples/siprtp_report.c b/pjsip-apps/src/samples/siprtp_report.c index 192f223b..6fd7bb70 100644 --- a/pjsip-apps/src/samples/siprtp_report.c +++ b/pjsip-apps/src/samples/siprtp_report.c @@ -58,6 +58,9 @@ static void print_call(int call_index) pj_gettimeofday(&now); + if (app.report_filename) + puts(app.report_filename); + /* Print duration */ if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) { |