Skip to content

Commit 2ef73b4

Browse files
Fix: unify the app user paced time
1 parent df8218d commit 2ef73b4

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

lib/src/st2110/pipeline/st22_pipeline_tx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ static bool tx_st22p_if_frame_late(struct st22p_tx_ctx* ctx,
135135

136136
mt_pthread_mutex_unlock(&ctx->lock);
137137

138-
notice("%s(%d), frame %u drop late by %" PRIu64 "ns (> period %" PRIu64 "ns), cur %" PRIu64
139-
" frame %" PRIu64 "\n",
140-
__func__, ctx->idx, framebuff->seq_number, cur_tai - frame_tai, frame_period_ns,
141-
cur_tai, frame_tai);
138+
notice("%s(%d), frame %u drop late by %" PRIu64 "ns (> period %" PRIu64
139+
"ns), cur %" PRIu64 " frame %" PRIu64 "\n",
140+
__func__, ctx->idx, framebuff->seq_number, cur_tai - frame_tai, frame_period_ns,
141+
cur_tai, frame_tai);
142142

143143
if (ctx->ops.notify_frame_done && !framebuff->frame_done_cb_called) {
144144
frame->status = ST_FRAME_STATUS_DROPPED;

lib/src/st2110/st_tx_audio_session.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ static int tx_audio_session_sync_pacing(struct mtl_main_impl* impl,
325325
}
326326

327327
if (epochs > next_epochs) {
328-
ST_SESSION_STAT_ADD(s, port_user_stats.common, stat_epoch_drop, -to_epoch / pkt_time);
328+
ST_SESSION_STAT_ADD(s, port_user_stats.common, stat_epoch_drop,
329+
(epochs - next_epochs));
329330
}
330331

331332
if (epochs < next_epochs) {

tests/tools/RxTxApp/src/tx_st30p_app.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,7 @@ static int app_tx_st30p_init(struct st_app_context* ctx, st_json_st30p_session_t
210210
ops.channel = st30p ? st30p->info.audio_channel : 2;
211211
ops.sampling = st30p ? st30p->info.audio_sampling : ST30_SAMPLING_48K;
212212
ops.ptime = st30p ? st30p->info.audio_ptime : ST30_PTIME_1MS;
213-
214-
if (st30p && st30p->user_pacing) {
215-
s->packet_time = st30_get_packet_time(ops.ptime);
216-
} else {
217-
s->packet_time = ST_APP_TX_ST30P_DEFAULT_PACKET_TIME;
218-
}
213+
s->packet_time = ST_APP_TX_ST30P_DEFAULT_PACKET_TIME;
219214

220215
/* set frame size to 10ms time */
221216
int framebuff_size = st30_calculate_framebuff_size(

0 commit comments

Comments
 (0)