Skip to content
Closed
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions lib/src/st2110/pipeline/st20_pipeline_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ static int tx_st20p_frame_done(void* priv, uint16_t frame_idx,
int ret;
struct st20p_tx_frame* framebuff = &ctx->framebuffs[frame_idx];

struct st_frame* frame = tx_st20p_user_frame(ctx, framebuff);
frame->tfmt = meta->tfmt;
frame->timestamp = meta->timestamp;
frame->epoch = meta->epoch;
frame->rtp_timestamp = meta->rtp_timestamp;

mt_pthread_mutex_lock(&ctx->lock);
if (ST20P_TX_FRAME_IN_TRANSMITTING == framebuff->stat) {
ret = 0;
Expand All @@ -124,12 +130,6 @@ static int tx_st20p_frame_done(void* priv, uint16_t frame_idx,
}
mt_pthread_mutex_unlock(&ctx->lock);

struct st_frame* frame = tx_st20p_user_frame(ctx, framebuff);
frame->tfmt = meta->tfmt;
frame->timestamp = meta->timestamp;
frame->epoch = meta->epoch;
frame->rtp_timestamp = meta->rtp_timestamp;

if (ctx->ops.notify_frame_done &&
!framebuff->frame_done_cb_called) { /* notify app which frame done */
ctx->ops.notify_frame_done(ctx->ops.priv, frame);
Expand Down
12 changes: 6 additions & 6 deletions lib/src/st2110/pipeline/st22_pipeline_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ static int tx_st22p_frame_done(void* priv, uint16_t frame_idx,
int ret;
struct st22p_tx_frame* framebuff = &ctx->framebuffs[frame_idx];

framebuff->src.tfmt = meta->tfmt;
framebuff->dst.tfmt = meta->tfmt;
framebuff->src.timestamp = meta->timestamp;
framebuff->dst.timestamp = meta->timestamp;
framebuff->src.rtp_timestamp = framebuff->dst.rtp_timestamp = meta->rtp_timestamp;

mt_pthread_mutex_lock(&ctx->lock);
if (ST22P_TX_FRAME_IN_TRANSMITTING == framebuff->stat) {
ret = 0;
Expand All @@ -145,12 +151,6 @@ static int tx_st22p_frame_done(void* priv, uint16_t frame_idx,
}
mt_pthread_mutex_unlock(&ctx->lock);

framebuff->src.tfmt = meta->tfmt;
framebuff->dst.tfmt = meta->tfmt;
framebuff->src.timestamp = meta->timestamp;
framebuff->dst.timestamp = meta->timestamp;
framebuff->src.rtp_timestamp = framebuff->dst.rtp_timestamp = meta->rtp_timestamp;

if (ctx->ops.notify_frame_done) { /* notify app which frame done */
struct st_frame* frame = tx_st22p_user_frame(ctx, framebuff);
ctx->ops.notify_frame_done(ctx->ops.priv, frame);
Expand Down
12 changes: 6 additions & 6 deletions lib/src/st2110/pipeline/st30_pipeline_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ static int tx_st30p_frame_done(void* priv, uint16_t frame_idx,
int ret;
struct st30p_tx_frame* framebuff = &ctx->framebuffs[frame_idx];

struct st30_frame* frame = &framebuff->frame;
frame->tfmt = meta->tfmt;
frame->timestamp = meta->timestamp;
frame->epoch = meta->epoch;
frame->rtp_timestamp = meta->rtp_timestamp;

mt_pthread_mutex_lock(&ctx->lock);
if (ST30P_TX_FRAME_IN_TRANSMITTING == framebuff->stat) {
ret = 0;
Expand All @@ -120,12 +126,6 @@ static int tx_st30p_frame_done(void* priv, uint16_t frame_idx,
}
mt_pthread_mutex_unlock(&ctx->lock);

struct st30_frame* frame = &framebuff->frame;
frame->tfmt = meta->tfmt;
frame->timestamp = meta->timestamp;
frame->epoch = meta->epoch;
frame->rtp_timestamp = meta->rtp_timestamp;

if (ctx->ops.notify_frame_done) { /* notify app which frame done */
ctx->ops.notify_frame_done(ctx->ops.priv, frame);
}
Expand Down
Loading