From patchwork Thu Nov 19 20:51:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marton Balint X-Patchwork-Id: 23732 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 44BAB44AC04 for ; Thu, 19 Nov 2020 22:51:45 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 23E6868B8D5; Thu, 19 Nov 2020 22:51:45 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0560868B8BC for ; Thu, 19 Nov 2020 22:51:39 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 4EE1DE4A65; Thu, 19 Nov 2020 21:51:39 +0100 (CET) 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 fFnTSjxb9A2U; Thu, 19 Nov 2020 21:51:37 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 80459E4A2E; Thu, 19 Nov 2020 21:51:37 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Thu, 19 Nov 2020 21:51:21 +0100 Message-Id: <20201119205123.21968-4-cus@passwd.hu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201119205123.21968-1-cus@passwd.hu> References: <20201119205123.21968-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] avdevice/decklink_enc: simplify usage of buffercount type X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Cc: Marton Balint Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Also remove some leftover declaration of CreateDeckLinkIteratorInstance(). Signed-off-by: Marton Balint --- libavdevice/decklink_common.h | 7 ------- libavdevice/decklink_enc.cpp | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/libavdevice/decklink_common.h b/libavdevice/decklink_common.h index f35bd9ae6f..02f179f920 100644 --- a/libavdevice/decklink_common.h +++ b/libavdevice/decklink_common.h @@ -155,13 +155,6 @@ struct decklink_ctx { typedef enum { DIRECTION_IN, DIRECTION_OUT} decklink_direction_t; -#ifdef _WIN32 -typedef unsigned int buffercount_type; -IDeckLinkIterator *CreateDeckLinkIteratorInstance(void); -#else -typedef uint32_t buffercount_type; -#endif - static const BMDAudioConnection decklink_audio_connection_map[] = { (BMDAudioConnection)0, bmdAudioConnectionEmbedded, diff --git a/libavdevice/decklink_enc.cpp b/libavdevice/decklink_enc.cpp index 883fdeadfb..ee341111ce 100644 --- a/libavdevice/decklink_enc.cpp +++ b/libavdevice/decklink_enc.cpp @@ -436,7 +436,7 @@ static int decklink_write_video_packet(AVFormatContext *avctx, AVPacket *pkt) AVFrame *avframe = NULL, *tmp = (AVFrame *)pkt->data; AVPacket *avpacket = NULL; decklink_frame *frame; - buffercount_type buffered; + uint32_t buffered; HRESULT hr; if (st->codecpar->codec_id == AV_CODEC_ID_WRAPPED_AVFRAME) { @@ -525,7 +525,7 @@ static int decklink_write_audio_packet(AVFormatContext *avctx, AVPacket *pkt) struct decklink_cctx *cctx = (struct decklink_cctx *)avctx->priv_data; struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; int sample_count = pkt->size / (ctx->channels << 1); - buffercount_type buffered; + uint32_t buffered; ctx->dlo->GetBufferedAudioSampleFrameCount(&buffered); if (pkt->pts > 1 && !buffered)