From patchwork Tue Mar 22 13:39:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Beauxis X-Patchwork-Id: 34673 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:ab0:5fda:0:0:0:0:0 with SMTP id g26csp680061uaj; Tue, 22 Mar 2022 06:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS5XzsBPep0qmzwRZOcVSDR9z0JHPb5p+7y3UKwWiW7dpyAmccgn9/DMCFyjn8+ImSBzWn X-Received: by 2002:a17:906:6a13:b0:6db:ab28:9f00 with SMTP id qw19-20020a1709066a1300b006dbab289f00mr25720009ejc.296.1647956423162; Tue, 22 Mar 2022 06:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647956423; cv=none; d=google.com; s=arc-20160816; b=FcLvASxI/xRSeLnCkKPu3URQ9HvzThkzwsYk4zyBny4YiiZCUnExEnrUK5Mm6oHfAG 8ketxuWe9Kkwyq1gi6y0AXlaCxk8CYlSk8pP3XHifKvuoo87YUQu/PSO8HgSKOcugTXl +kNm9QRpODv6v6k1UL01zfq4C/lXwcprO8Efq2B+edgZ6Zn8MDXsVrfWwNF5cjiTLPtS CrcM1MJS82tt3BBNwmbaPVbVtFk9WpLI/plNeE8AW2wmwTGwtafcV2tzp7seQ/6SMD/T CMhuw7OpaAb1qduKvHlI8X15rS+N8feTZ3RSZwp3lcQSjZonOdwc5u+N7PPcRGJHuA8F cg1w== 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:message-id:date:to:from :delivered-to; bh=Y5ttHIVYh10OxB7ehd1IFR7YbRtGK9uUEuVXf+qcyyY=; b=kI45Noh5lcmwQgZQFHAbFTqLLkjEPgPgIM3a5LYYmUFhXi0UFjl0MZb4/9x16kD3M1 hlfmeniSeYZRKKWdMYsrkKX8gbh+O4E/pHHBpVKXxnnpElk3MDkvuduRmBpIuj5QvuZe 9saQ+rlQyq5P0+WBh9DRUe8Ly4B3U0rUFEqgptmo3SgAdMDf7Ow1o8oO7v/o44XjIA8a wqSkcx01deuRVKlYaGC+kZAEkBVd4yFiDn4v7a/XpdvVqoOJxn/r9Sa/p3jAVTVPpCKz TZuady34o+BQLfWsfODxrJ3OfZ838n1TB8+hEvNGEaFqpIe7matNEyGA/+NhT6ebuWTT L5GA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v20-20020a50d594000000b00418c2b5be5asi12918932edi.316.2022.03.22.06.40.22; Tue, 22 Mar 2022 06:40:23 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C6B8168A066; Tue, 22 Mar 2022 15:40:19 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CCA1A68A066 for ; Tue, 22 Mar 2022 15:40:13 +0200 (EET) Received: by mail-ed1-f45.google.com with SMTP id c62so2203805edf.5 for ; Tue, 22 Mar 2022 06:40:13 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=4+r0T6OKr24eev+M81qNtKWmvGoAS0pfIT90jzbGwLM=; b=TF8A2z3TbKAsg4gCNaBZIfnDK+LzH764HLL9wolusfZFR6qgEmlNSpHs0nnmQPuOK4 uabHi9OAG+bA2rH68+GJ3Fr2qvj3v8g8MiSrVp0EYXwV+LP6CTtJM4tO+KmSFVdBKjFI ikOIICTNa1ZrhY3NXr+wEdURvUIDILnOQY+rUbDKW0z48jvj7+SidWDIipxbEMDaCsi/ xzCNQcC3p74ffB/zp/LhfPQXD4qM9BLnmwUvBzDZ4/2e4BueX2+jEAHEwTEIDPZkSDh2 yKSkdNnb1xXxGnZi437agacd+57wWxKMsvK87y8IpoEsdFnKg45byv0qEBu2oHUdwuoi 1gkg== X-Gm-Message-State: AOAM532de6y2tsIL9uSWhjs7L2Rvl1tqIsNPmv3dfPGd2gi93bUuxAUi JzzVx8l3WDm0wSbcoJ6Zz4V6nQCIR5rQRJN1 X-Received: by 2002:a05:6402:d0e:b0:418:f011:275e with SMTP id eb14-20020a0564020d0e00b00418f011275emr28077078edb.323.1647956412506; Tue, 22 Mar 2022 06:40:12 -0700 (PDT) Received: from localhost.localdomain (82-171-134-41.fixed.kpn.net. [82.171.134.41]) by smtp.gmail.com with ESMTPSA id z6-20020a056402274600b004194fc1b7casm2125829edd.48.2022.03.22.06.40.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Mar 2022 06:40:11 -0700 (PDT) From: toots@rastageeks.org To: ffmpeg-devel@ffmpeg.org Date: Tue, 22 Mar 2022 14:39:51 +0100 Message-Id: <20220322133957.81743-1-toots@rastageeks.org> X-Mailer: git-send-email 2.32.0 (Apple Git-132) MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/6] Various libavdevice cleanup & enhancements 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: Romain Beauxis Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: N357+XUWWyCG From: Romain Beauxis This is a series of patches that fix and enhances libavdevice & have been submitted multiple times in the past 6 months. In the series, the most straightforward patches have been placed first in the list. While I have a lot of appreciation for all the solid work done in this project, seeing the difficulty in getting them included makes one wonder what is the status of libavdevice and if it is still actively maintained. Typically, in the first patch, we fix the name/machine readable ID of dshow devices. If the API has any significant use or maintenance, this should have been caught and fixed much sooner. Next, the patches fixing the avfoundation device audio format and concurrency models are absolutely required to get any use of this operator as audio input and, quite likely, as video input as well. This is a lot of changes to make the library usable for a cross-platform project and, with the lack of traction with the changes, this makes the developer wonder if the library is ready for production use and if it wouldn't be easier to implement hardware handling separately and plug into FFmpeg after retreiving media data. There are more that I have noticed with the API, in particular the fact that audio/video devices are labelled as video. I would love to submit changes to enhance that aspect but, not with all these patches already pending.. Thanks for y'all consideration. -- Romain Romain Beauxis (6): Fix dshow device name/description Use appropriate method for device discovery, fix crash with bogus device index. libavdevice/avfoundation.m: Allow to select devices by unique ID libavdevice/avfoundation.m: use setAudioSettings, extend supported formats libavdevice/avfoundation.m: Replace mutex-based concurrency handling in avfoundation.m by a thread-safe fifo queue with maximum length Add AudioToolbox audio input device. configure | 5 + doc/indevs.texi | 41 ++- libavdevice/Makefile | 1 + libavdevice/alldevices.c | 1 + libavdevice/audiotoolbox.m | 8 +- libavdevice/audiotoolbox_dec.m | 530 ++++++++++++++++++++++++++++++++ libavdevice/avfoundation.m | 547 ++++++++++++++++----------------- libavdevice/dshow.c | 4 +- 8 files changed, 843 insertions(+), 294 deletions(-) create mode 100644 libavdevice/audiotoolbox_dec.m