Added --report-file options in siprtp
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@454 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
d489300934
commit
fcb3672eae
|
@ -47,6 +47,7 @@ static const char *USAGE =
|
||||||
" --log-level=N, -l Set log verbosity level (default=5)\n"
|
" --log-level=N, -l Set log verbosity level (default=5)\n"
|
||||||
" --app-log-level=N Set app screen log verbosity (default=3)\n"
|
" --app-log-level=N Set app screen log verbosity (default=3)\n"
|
||||||
" --log-file=FILE Write log to file FILE\n"
|
" --log-file=FILE Write log to file FILE\n"
|
||||||
|
" --report-file=FILE Write report to file FILE\n"
|
||||||
"\n"
|
"\n"
|
||||||
/* Don't support this anymore, because codec is properly examined in
|
/* Don't support this anymore, because codec is properly examined in
|
||||||
pjmedia_session_info_from_sdp() function.
|
pjmedia_session_info_from_sdp() function.
|
||||||
|
@ -155,6 +156,7 @@ static struct app
|
||||||
int app_log_level;
|
int app_log_level;
|
||||||
int log_level;
|
int log_level;
|
||||||
char *log_filename;
|
char *log_filename;
|
||||||
|
char *report_filename;
|
||||||
|
|
||||||
struct codec audio_codec;
|
struct codec audio_codec;
|
||||||
|
|
||||||
|
@ -820,7 +822,8 @@ static pj_status_t init_options(int argc, char *argv[])
|
||||||
|
|
||||||
enum { OPT_START,
|
enum { OPT_START,
|
||||||
OPT_APP_LOG_LEVEL, OPT_LOG_FILE,
|
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[] = {
|
struct pj_getopt_option long_options[] = {
|
||||||
{ "count", 1, 0, 'c' },
|
{ "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 },
|
{ "app-log-level", 1, 0, OPT_APP_LOG_LEVEL },
|
||||||
{ "log-file", 1, 0, OPT_LOG_FILE },
|
{ "log-file", 1, 0, OPT_LOG_FILE },
|
||||||
|
|
||||||
|
{ "report-file", 1, 0, OPT_REPORT_FILE },
|
||||||
|
|
||||||
/* Don't support this anymore, see comments in USAGE above.
|
/* Don't support this anymore, see comments in USAGE above.
|
||||||
{ "a-pt", 1, 0, OPT_A_PT },
|
{ "a-pt", 1, 0, OPT_A_PT },
|
||||||
{ "a-name", 1, 0, OPT_A_NAME },
|
{ "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:
|
case OPT_A_PTIME:
|
||||||
app.audio_codec.ptime = atoi(pj_optarg);
|
app.audio_codec.ptime = atoi(pj_optarg);
|
||||||
break;
|
break;
|
||||||
|
case OPT_REPORT_FILE:
|
||||||
|
app.report_filename = pj_optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
puts(USAGE);
|
puts(USAGE);
|
||||||
|
|
|
@ -58,6 +58,9 @@ static void print_call(int call_index)
|
||||||
|
|
||||||
pj_gettimeofday(&now);
|
pj_gettimeofday(&now);
|
||||||
|
|
||||||
|
if (app.report_filename)
|
||||||
|
puts(app.report_filename);
|
||||||
|
|
||||||
/* Print duration */
|
/* Print duration */
|
||||||
if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) {
|
if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue