mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-15 05:11:37 +08:00
avdevice/decklink: move queue_size to an argument for ff_decklink_packet_queue_init
The existing queue initialization function would always sets it's maximum queue size to ctx->queue_size. But because we are introducing more queues we may want the sizes to differ between them. Move the specification of the queue size into an argument, which can be passed from the caller. This patch makes no functional change to the behavior. It is being made to accommodate Marton Balin's request to split out the queue size for the new VANC queue being introduced in a later patch. Signed-off-by: Devin Heitmueller <dheitmueller@ltnglobal.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:

committed by
Marton Balint

parent
5930d397ef
commit
e7d800fe89
@@ -390,14 +390,13 @@ int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t directio
|
||||
return ff_decklink_set_format(avctx, 0, 0, 0, 0, AV_FIELD_UNKNOWN, direction);
|
||||
}
|
||||
|
||||
void ff_decklink_packet_queue_init(AVFormatContext *avctx, DecklinkPacketQueue *q)
|
||||
void ff_decklink_packet_queue_init(AVFormatContext *avctx, DecklinkPacketQueue *q, int64_t queue_size)
|
||||
{
|
||||
struct decklink_cctx *ctx = (struct decklink_cctx *)avctx->priv_data;
|
||||
memset(q, 0, sizeof(DecklinkPacketQueue));
|
||||
pthread_mutex_init(&q->mutex, NULL);
|
||||
pthread_cond_init(&q->cond, NULL);
|
||||
q->avctx = avctx;
|
||||
q->max_q_size = ctx->queue_size;
|
||||
q->max_q_size = queue_size;
|
||||
}
|
||||
|
||||
void ff_decklink_packet_queue_flush(DecklinkPacketQueue *q)
|
||||
|
Reference in New Issue
Block a user