Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Du <frank.du@intel.com>
  • Loading branch information
frankdjx committed Jan 15, 2024
1 parent 2eba564 commit 63853c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/src/app_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ struct st_app_context {
bool enable_timing_parser;
bool tx_display;
bool rx_display;
uint16_t rx_burst_size;

bool ptp_systime_sync;
int ptp_sync_cnt;
Expand Down
5 changes: 5 additions & 0 deletions app/src/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ enum st_args_cmd {
ST_ARG_PTP_UNICAST_ADDR,
ST_ARG_CNI_THREAD,
ST_ARG_RX_TIMING_PARSER,
ST_ARG_RX_BURST_SZ,
ST_ARG_USER_LCORES,
ST_ARG_SCH_DATA_QUOTA,
ST_ARG_SCH_SESSION_QUOTA,
Expand Down Expand Up @@ -189,6 +190,7 @@ static struct option st_app_args_options[] = {
{"ptp_unicast", no_argument, 0, ST_ARG_PTP_UNICAST_ADDR},
{"cni_thread", no_argument, 0, ST_ARG_CNI_THREAD},
{"rx_timing_parser", no_argument, 0, ST_ARG_RX_TIMING_PARSER},
{"rx_burst_size", required_argument, 0, ST_ARG_RX_BURST_SZ},
{"lcores", required_argument, 0, ST_ARG_USER_LCORES},
{"sch_data_quota", required_argument, 0, ST_ARG_SCH_DATA_QUOTA},
{"sch_session_quota", required_argument, 0, ST_ARG_SCH_SESSION_QUOTA},
Expand Down Expand Up @@ -574,6 +576,9 @@ int st_app_parse_args(struct st_app_context* ctx, struct mtl_init_params* p, int
ctx->enable_timing_parser = true;
p->flags |= MTL_FLAG_ENABLE_HW_TIMESTAMP;
break;
case ST_ARG_RX_BURST_SZ:
ctx->rx_burst_size = atoi(optarg);
break;
case ST_ARG_RX_MONO_POOL:
p->flags |= MTL_FLAG_RX_MONO_POOL;
break;
Expand Down
1 change: 1 addition & 0 deletions app/src/rx_st20p_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ static int app_rx_st20p_init(struct st_app_context* ctx,
ops.port.payload_type = st20p ? st20p->base.payload_type : ST_APP_PAYLOAD_TYPE_VIDEO;
ops.device = st20p ? st20p->info.device : ST_PLUGIN_DEVICE_AUTO;
ops.flags |= ST20P_RX_FLAG_BLOCK_GET;
ops.rx_burst_size = ctx->rx_burst_size;
ops.framebuff_cnt = s->framebuff_cnt;
/* always try to enable DMA offload */
ops.flags |= ST20P_RX_FLAG_DMA_OFFLOAD;
Expand Down
1 change: 1 addition & 0 deletions app/src/rx_video_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ static int app_rx_video_init(struct st_app_context* ctx, st_json_video_session_t
ops.rtcp.nack_interval_us = 250;
}
if (ctx->enable_timing_parser) ops.flags |= ST20_RX_FLAG_TIMING_PARSER_STAT;
ops.rx_burst_size = ctx->rx_burst_size;

st_pthread_mutex_init(&s->st20_wake_mutex, NULL);
st_pthread_cond_init(&s->st20_wake_cond, NULL);
Expand Down

0 comments on commit 63853c8

Please sign in to comment.