History

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.

Devin Heitmueller committed 3 years ago

Commit e7d800f1 parent 5930d393 files · +4 −5Browse files

Showing the changes to libavdevice/decklink_common.cpp (1 of 3 files). Show all

Unified · Split

libavdevice/decklink_common.cpp+2−3
@@ -390,14 +390,13 @@ int ff_decklink_set_format(AVFormatContext *avctx, decklink_direction_t directio · 389 unmodified lines
390390 return ff_decklink_set_format(avctx, 0, 0, 0, 0, AV_FIELD_UNKNOWN, direction);
391391 }
392392
393−void ff_decklink_packet_queue_init(AVFormatContext *avctx, DecklinkPacketQueue *q)
393+void ff_decklink_packet_queue_init(AVFormatContext *avctx, DecklinkPacketQueue *q, int64_t queue_size)
394394 {
395− struct decklink_cctx *ctx = (struct decklink_cctx *)avctx->priv_data;
396395 memset(q, 0, sizeof(DecklinkPacketQueue));
397396 pthread_mutex_init(&q->mutex, NULL);
398397 pthread_cond_init(&q->cond, NULL);
399398 q->avctx = avctx;
400− q->max_q_size = ctx->queue_size;
399+ q->max_q_size = queue_size;
401400 }
402401
403402 void ff_decklink_packet_queue_flush(DecklinkPacketQueue *q)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t