From patchwork Fri Mar 25 14:10:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 34964 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:ab0:5fda:0:0:0:0:0 with SMTP id g26csp1377109uaj; Fri, 25 Mar 2022 07:14:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw88BX0DUWEUFUY7AHc/DYpY/E1W3cfYe5P9wvKBKpz+nT5XI8jsKOkCGRctHHqHaYrKWfb X-Received: by 2002:a05:6402:1941:b0:413:2822:9c8 with SMTP id f1-20020a056402194100b00413282209c8mr13338817edz.13.1648217690529; Fri, 25 Mar 2022 07:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648217690; cv=none; d=google.com; s=arc-20160816; b=ZMR5CI3T0UXQB3wcX8oZgvo1pZazvEg6Q6ufI2ROzCZzCQ/+ExkhFGwxInXnVY0dc/ gjn62B9nnaSahAduAC7zh/gFwfxPrKES6LmapIHtnYpwOHbapEoWLey6PXiE/YkBCfjL yflh14X+/irzhkO8i9u0Bd3chBi8afy72jgOSBMY5PKUNXoFflkqss8+FLEwUkwiWnE+ pe+6uxjQDH7AGzvODoEfAHdsruRqakIoN5xwv5FmRh0zUKm9iUuMMnYRDI+eG1KRjSj4 pTAJnPGM03UKHWkjv0hfMZpNqztP3oSeNhJD8YKx/Y3KUaRK9V8e32GenNCWIIy1M3SU q2hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=MIZXe/thDOwHZv44C0EODTJ+GP/lLSx5JQarcZ5TqcQ=; b=BNwqff5EGaQQpnrALDGjXPXVidAjniXl8Ppg4n3oLWQNlRF/t2A2VrvSPt+6DBrIoB GpYMpqcaJW6YTaBBz+9E9f+9FhhrbvmGCCF6J2Nkwo2lC496nKzaRkxNT5eRfeauDN5A +TekHAheaQ0y9pwpNgy/ZX2xGTU8Cre5bLpzJiBhc5LP9ksXdIq75kLVWEv/y6u8EstZ nHL5N0a0eB91rWQC5Fg5pXIfqOkphM88/z3H7DMyuzDu2uQXZJ40CFXurrtwh1I/EPWF eX50VSx/Cvcufc3HNyyQse8lzkiCgk3NBLirTvNw/XpXYVPH+JrsnA502b7Cf1VtPFtW rBVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Y5Cfnfre; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d6-20020a1709061f4600b006df76385c95si2453990ejk.309.2022.03.25.07.14.50; Fri, 25 Mar 2022 07:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=Y5Cfnfre; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E336768B2A6; Fri, 25 Mar 2022 16:13:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6782468B2A6 for ; Fri, 25 Mar 2022 16:13:08 +0200 (EET) Received: by mail-lf1-f53.google.com with SMTP id a26so13578242lfg.10 for ; Fri, 25 Mar 2022 07:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DTG7CUILHEeE0pGMjxSBH8HNE15yQvmVQpX9iYaxfIw=; b=Y5CfnfreoKBjDWrtOGMWM34/xtxPNPKt+l2bJKxKsdYljSYPNkQ5qFFfxIOPdYVAMe 2ky9Kjtapeuv0GtRvhrkIi7vGJxNs+XqwZehZnHgHjE4JRmVHSFaA8dJCqBVL+4UOZ+I PARoKFc+EoAMCVLI5OoUhUWZXJr/iOK/xaAEPSCctYxTmWhQh1slv0OMcQHDfdmr8h72 KCVs7MHKwD/r+xDuFNXWIM0YDlYhG+GCJUniUvxs+3TM5j/4cHQEgI08g2Wh6D3ZZXWQ CUyhP7XwZPOyvlHRLs32e2iLNZiMzxgD5K8AkbVQfZEycw83k+r0DgGK2D7TUrh3qL3h Wdig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DTG7CUILHEeE0pGMjxSBH8HNE15yQvmVQpX9iYaxfIw=; b=iS1u7Y7pJvpQF4n2kKGZH1brRmvFYaCu0IbDFR/WqCxWeZvq2uGCfz66ECzexrUgJR b0k1vh8NvPouUc5D0qckQ9qvMTwLmn0f/pD2Hjyd+32DPJNshklpbmSurrwmioMiP/Jw 5cfJIqH8pfWWbPCaj3wkrcjCQnKS+TdOJ4Z8BlrXo2QbscO08HuffViUbBhPiQAk42py Ufq6MYZWa//0WDvtkmrpKBCUHwzBO9YGRJhgYuAYNusap9CodgxT/YM22UAk/u5aLYL5 yuyErcD5ykUyXeQVpgihhyZfCG4aE4a+08YotX+bnLNz7cODNylFIc9ct9XleCmxmAbV DHVg== X-Gm-Message-State: AOAM532ApFnX26VBodZ3FpIrZnIgDdh0Z7N6129xOaWsWXA4UglxHDsp caebPJSme1Y0urYg56kjWLM9aqA5n4s= X-Received: by 2002:ac2:5a49:0:b0:448:75c4:548b with SMTP id r9-20020ac25a49000000b0044875c4548bmr8033064lfn.54.1648217587205; Fri, 25 Mar 2022 07:13:07 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id f25-20020a193819000000b0044a59b380c0sm719095lfa.68.2022.03.25.07.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 07:13:06 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Mar 2022 15:10:37 +0100 Message-Id: <20220325141041.1748-19-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220325141041.1748-1-dcnieho@gmail.com> References: <20220325141041.1748-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 18/22] avdevice/dshow: cosmetics 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 Cc: Diederick Niehorster Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: mUDMrY1rWNBL Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 25c7f5a0e8..c426cef905 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -933,6 +933,7 @@ dshow_cycle_formats(AVFormatContext *avctx, enum dshowDeviceType devtype, AVOptionRange *new_range[3] = { NULL }; int nb_range = 0; struct dshow_format_info *fmt_info = NULL; + r = IAMStreamConfig_GetStreamCaps(config, i, &type, (void *) caps); if (r != S_OK) goto next; @@ -1558,7 +1559,8 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, goto error; } } - if (ctx->device_filter[otherDevType]) { + + if (ctx->device_filter[otherDevType]) { // avoid adding add two instances of the same device to the graph, one for video, one for audio // a few devices don't support this (could also do this check earlier to avoid double crossbars, etc. but they seem OK) if (strcmp(device_filter_unique_name, ctx->device_unique_name[otherDevType]) == 0) { @@ -2441,17 +2443,16 @@ static const AVClass dshow_class = { }; const AVInputFormat ff_dshow_demuxer = { - .name = "dshow", - .long_name = NULL_IF_CONFIG_SMALL("DirectShow capture"), - .priv_data_size = sizeof(struct dshow_ctx), - .read_header = dshow_read_header, - .read_packet = dshow_read_packet, - .read_close = dshow_read_close, - .get_device_list= dshow_get_device_list, - .control_message= dshow_control_message, - .get_device_list= dshow_get_device_list, + .name = "dshow", + .long_name = NULL_IF_CONFIG_SMALL("DirectShow capture"), + .priv_data_size = sizeof(struct dshow_ctx), + .read_header = dshow_read_header, + .read_packet = dshow_read_packet, + .read_close = dshow_read_close, + .control_message = dshow_control_message, + .get_device_list = dshow_get_device_list, .create_device_capabilities = dshow_create_device_capabilities, - .free_device_capabilities = dshow_free_device_capabilities, - .flags = AVFMT_NOFILE | AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK, - .priv_class = &dshow_class, + .free_device_capabilities = dshow_free_device_capabilities, + .flags = AVFMT_NOFILE | AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK, + .priv_class = &dshow_class, };