Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample: add "--ptp" args #526

Merged
merged 1 commit into from
Oct 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/sample/sample_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum sample_args_cmd {
SAMPLE_ARG_RX_DUMP,
SAMPLE_ARG_USE_CPU_COPY,
SAMPLE_ARG_USER_META,
SAMPLE_ARG_LIB_PTP,

SAMPLE_ARG_UDP_MODE = 0x300,
SAMPLE_ARG_UDP_LEN,
Expand Down Expand Up @@ -108,6 +109,7 @@ static struct option sample_args_options[] = {
{"ext_frame", no_argument, 0, SAMPLE_ARG_EXT_FRAME},
{"st22_codec", required_argument, 0, SAMPLE_ARG_ST22_CODEC},
{"pipeline_fmt", required_argument, 0, SAMPLE_ARG_PIPELINE_FRAME_FMT},
{"ptp", no_argument, 0, SAMPLE_ARG_LIB_PTP},

{"udp_mode", required_argument, 0, SAMPLE_ARG_UDP_MODE},
{"udp_len", required_argument, 0, SAMPLE_ARG_UDP_LEN},
Expand Down Expand Up @@ -244,6 +246,9 @@ static int _sample_parse_args(struct st_sample_context* ctx, int argc, char** ar
case SAMPLE_ARG_PTP_TSC:
p->flags |= MTL_FLAG_PTP_SOURCE_TSC;
break;
case SAMPLE_ARG_LIB_PTP:
p->flags |= MTL_FLAG_PTP_ENABLE;
break;
case SAMPLE_ARG_UDP_LCORE:
p->flags |= MTL_FLAG_UDP_LCORE;
break;
Expand Down