From patchwork Mon Jun 7 23:03:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 28159 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp3889697iof; Mon, 7 Jun 2021 16:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvQJDQycHM7m8yxYlbPIhFdEOTxBMlGeHB6Noywv7MAC2PA8gUlVKB7HfPNs6mk2UA6xtC X-Received: by 2002:a17:906:2b04:: with SMTP id a4mr6696251ejg.6.1623107425943; Mon, 07 Jun 2021 16:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623107425; cv=none; d=google.com; s=arc-20160816; b=DShZnSO+bLzF617bhSiVum3SFB06RucE+z69cYQbt48DbZHIbvFQVF3I7jLb7Wy8gH V2+Hvc+5li8JAtGDTw2A7QpmtZaRR2apUnj8bijr1dRpY3SCmAGWlMXl6YqFUySaF1Pd Gr36Gz0j1ztz/l9qJbiUG/+Yne0pHxtCSOilpI9+AySQPOLY+khb6AtyetYHCPxDs0YI 2h2NOldH+O6nROQ/EE9IqE7fvmqMCvENuv3LqQEe2J3VVFkcSElo8UZU+ExdKsV0A/GD +Stjos8Y1ElaFlFmjoUT4A+ibPSnnkC2SmRWdNaBPf7mwex8Tt3aUvwxLWtH0WVBrQ8U sQOA== 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=VX6uoCEoMNvdMSlqg7Kb1z3GWHz/DMqrSgx4X5ICJ9A=; b=Y7xzh8DVdWclvBj9yNabsZw3xXMEiG5sHwamrHwKo4+z0AGDzBMG5zStTSXWDmmHYP US/Uf6xnrH/Rdqj7x+pivS2Aq4SxoBMPNt001LnPvydhRkKyTtLggZETDnWVLz/Hk0lJ nf1f7HgVBycXauhOHzpa2sw6xYZ0I/3kNODeKvvhSx3RCDe511RzJ2QJ1e0iDH84p1Qa vUEnypnyErfaiBNjZrHHsLKJ6NJbPnFO6vufWt4AsJLlakcZYWTSFjtc7LNQxYqih9zT +v+SprgSXGfILMwoIGvyIu4/bNDOi0USkPDWy9xhOUM0oe1FgmEXYH9/E5iQkLczhh9C /0Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="Bxophv/Z"; 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 b22si6620284ejl.199.2021.06.07.16.10.25; Mon, 07 Jun 2021 16:10:25 -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=20161025 header.b="Bxophv/Z"; 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 27C9F687EC8; Tue, 8 Jun 2021 02:10:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C275680A07 for ; Tue, 8 Jun 2021 02:10:17 +0300 (EEST) Received: by mail-ej1-f42.google.com with SMTP id g8so29407423ejx.1 for ; Mon, 07 Jun 2021 16:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BAOzOt4BHq6+8NBQ68Xw34anW2BwSZfUjCa9hOJqUac=; b=Bxophv/ZP7kAgKVukNlU41GMgHp4dZZYRJ39wgEVBqF8Vd1EJfRc0w0eiujBwb94su 0/G6xCc9iXE/MxwxdJxsxGhj4L8H+cghN1l2M5RGNGsZlo1yvTH484tbxIGTJfa5r0sN SC25dJuSFUwpgtlTViH/eEkcQoAKFsZD0/v+lazxupBA1R1QpkcS3iKE7mg8xv3d8DNK vmc8j9HA6YbfSevX/6GoyjMxJsmsH90Z1ijT746nDgOxfO+ZJPezTLtSio5iyVdD56vS ePZ4K/+GOp2Ayiolejb1yFayldWuuI1NreO7uaaNwE1Mn7SWv0hZ/zNvC1SlVH0OS72j a1Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BAOzOt4BHq6+8NBQ68Xw34anW2BwSZfUjCa9hOJqUac=; b=VR7HjQIEbrgTIJTCjQFI/dmoAKWDcoLxzupNBj+d49XHiijtJyp18XErPylwZwNwWd q3S8wogEv9VSYQWANi+yqnyQVoE/TC5IxZmDpHoXE27ZPitKjw8pQ/lNLj/0u8HEw2EC KPedphhh8BqkdC0pfw154Wz7d44PfIOl2FfZA7RERs4Y9dPlgpv7d8YYC+tNTRc6M06T RE6xqVIbqzIdVcLAUQ7KRXEhFEFQShhLNZpCMlaohXfOKAlJkHrhc3grO0dtQoVzFvFB XhSn88mCowyhKFOL4jKLnOJhEyqlOZ9rAZ2hUBJlBQg9s8or44JAZvXxve0IX+bf6SVA u3wg== X-Gm-Message-State: AOAM5327PsgoHSMQOTYDpkatARP1LnLNnQrTTtUhMvydmIR28ofYTZYX v1LKTmBSkuuFFNuUCTk/3sKbdz4kwyvQmg== X-Received: by 2002:a05:6512:2023:: with SMTP id s3mr12807172lfs.169.1623107075379; Mon, 07 Jun 2021 16:04:35 -0700 (PDT) Received: from localhost.localdomain (84-217-56-54.customers.ownit.se. [84.217.56.54]) by smtp.gmail.com with ESMTPSA id v9sm1999563ljv.131.2021.06.07.16.04.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Jun 2021 16:04:34 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Tue, 8 Jun 2021 01:03:48 +0200 Message-Id: <20210607230414.612-10-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210607230414.612-1-dcnieho@gmail.com> References: <20210607230414.612-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 09/35] avdevice/dshow: add media type info to get_device_list 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: pAjshrHhV3LG The list returned by get_device_list now contains info about what media type(s), if any, can be provided by each device. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 5d7f065a8c..3e41f4f99f 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -377,6 +377,11 @@ dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum, if (!device->device_name || !device->device_description) goto fail1; + device->nb_media_types = nb_media_types; + device->media_types = media_types; + nb_media_types = 0; + media_types = NULL; + // store to device_list output if (av_reallocp_array(&(*device_list)->devices, (*device_list)->nb_devices + 1, @@ -412,6 +417,8 @@ dshow_cycle_devices(AVFormatContext *avctx, ICreateDevEnum *devenum, av_freep(&device->device_name); if (device->device_name) av_freep(&device->device_description); + if (device->media_types) + av_freep(&device->media_types); av_free(device); } if (olestr && co_malloc)