From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 879E546A7F for ; Sun, 2 Jul 2023 16:13:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EEC5F68C373; Sun, 2 Jul 2023 19:12:58 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 455D268BF46 for ; Sun, 2 Jul 2023 19:12:52 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id B7C9DE8BCF for ; Sun, 2 Jul 2023 18:10:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2PuEwpWIWTFA for ; Sun, 2 Jul 2023 18:10:03 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 72929E8BCD for ; Sun, 2 Jul 2023 18:10:03 +0200 (CEST) Date: Sun, 2 Jul 2023 18:10:03 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <1688159679-3623-1-git-send-email-dheitmueller@ltnglobal.com> Message-ID: <5bb2a048-c795-e2bb-a216-6e8d1878b6a@passwd.hu> References: <1688159679-3623-1-git-send-email-dheitmueller@ltnglobal.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v3 1/2] decklink: move queue_size to an argument for ff_decklink_packet_queue_init X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 30 Jun 2023, Devin Heitmueller wrote: > 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 > --- > libavdevice/decklink_common.cpp | 4 ++-- > libavdevice/decklink_common.h | 2 +- > libavdevice/decklink_dec.cpp | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp > index b6cc8d7..5e8d612 100644 > --- a/libavdevice/decklink_common.cpp > +++ b/libavdevice/decklink_common.cpp > @@ -390,14 +390,14 @@ 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; This is now unused. > 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; > } Will apply with the change above. Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".