Skip to content

Commit ab7bffc

Browse files
committed
acap/aes67: Improve help text
1 parent d8db7bf commit ab7bffc

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/audio/capture/aes67.cpp

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -430,15 +430,15 @@ static void parse_sap(state_aes67_cap *s, std::string_view sap){
430430
} else {
431431
log_msg(LOG_LEVEL_WARNING, MOD_NAME "Got SAP with lower session version\n");
432432
}
433-
434-
return;
435-
}
436-
437-
print_sap_session(new_sess);
438-
if(s->curr_sap_hash == -1 && (sess_hash_is_prefix(s->requested_sess_hash, new_sess.unique_identifier) || s->requested_sess_hash == "any")){
439-
start_rtp_thread(s, new_sess);
433+
} else {
434+
print_sap_session(new_sess);
435+
if(s->curr_sap_hash == -1
436+
&& (sess_hash_is_prefix(s->requested_sess_hash, new_sess.unique_identifier) || s->requested_sess_hash == "any"))
437+
{
438+
start_rtp_thread(s, new_sess);
439+
}
440+
s->sap_sessions[new_sess.unique_identifier] = std::move(new_sess);
440441
}
441-
s->sap_sessions[new_sess.unique_identifier] = std::move(new_sess);
442442
}
443443

444444
static void aes67_sdp_worker(state_aes67_cap *s){
@@ -480,8 +480,13 @@ static void audio_cap_aes67_help(state_aes67_cap *s){
480480
color_printf(TERM_BOLD "\t\tstream=<index>" TERM_RESET " index of stream in a session to receive. If not specified stream 0 is received\n");
481481
color_printf(TERM_BOLD "\t\tsap_address=<IP>" TERM_RESET " multicast IP for SAP (default 239.255.255.255)\n");
482482
color_printf(TERM_BOLD "\t\tsap_port=<port>" TERM_RESET " port for SAP (default 9875)\n");
483-
484483
color_printf("\n");
484+
485+
if(s->network_interface_name.empty()){
486+
color_printf(TERM_BOLD TERM_FG_RED "To get available sessions run " TERM_FG_RESET "\"-s aes67:if=<interface>:help\"\n\n");
487+
return;
488+
}
489+
485490
color_printf("Waiting for SAP:\n");
486491

487492
s->requested_sess_hash = "none";

0 commit comments

Comments
 (0)