Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Romain Beauxis <toots@rastageeks.org>
To: Marvin Scholz <epirat07@gmail.com>
Cc: Thilo Borgmann <thilo.borgmann@mail.de>,
	FFmpeg development discussions and patches
	<ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 5/5] Add AudioToolbox audio input device.
Date: Mon, 24 Jan 2022 10:20:20 -0600
Message-ID: <CABWZ6OTZDEHyi03164_SBVduNbC+XZpsZHOAaTBVLPJM99M6tQ@mail.gmail.com> (raw)
In-Reply-To: <84901729-914E-40BB-9646-36C67FBC14EE@gmail.com>

Le lun. 24 janv. 2022 à 10:19, Marvin Scholz <epirat07@gmail.com> a écrit :
>
>
>
> On 24 Jan 2022, at 16:42, Romain Beauxis wrote:
>
> > Hi Marvin,
> >
> > Le mer. 19 janv. 2022 à 10:59, Marvin Scholz <epirat07@gmail.com> a
> > écrit :
> >> On 19 Jan 2022, at 15:42, Romain Beauxis wrote:
> >>
> >> Hi, thanks for the patch. I've not done a full code review yet, just
> >> a
> >> few
> >> initial remarks below:
> >>
> >>> This patch adds support for a new, audio-specific input device using
> >>> the documented and battle-tested AUHAL input. This provides a
> >>> pendant
> >>> to the AudioToolbox audio-only output.
> >>>
> >>> A couple of advantages for this:
> >>> * It avoids a lot of the complexity of supporting audio and video in
> >>> a
> >>> single input
> >>> * The AUHAL API seems tested, documented and robust
> >>> * This implementation hopefully gives good control over audio
> >>> latency
> >>> and also minimizes data copy
> >
> > Thanks!
> >
> > Do you need more time for this review? We discovered another issue
> > with the dynamic array of video devices and I'd like to send a revised
> > series soon.
>
> Well if you want to address the things I mentioned last time
> it will anyway change a bunch of things probably, so it
> might be easier if I just wait for the new patch.
>
> Additionally it might be useful to send it independent of the
> whole patchset as IIUC it does not really depend on any of the
> previous patches.

Will do, thanks!

> > Also, I think I'll reorder the patches so that the most
> > trivial one (unique device name, probing API call updates) can be
> > applied right away.
> >
> > Let me know!
> > Romain
> >
> >>> From: Romain Beauxis <toots@rastageeks.org>
> >>> To: ffmpeg-devel@ffmpeg.org
> >>> Subject: [PATCH] Add AudioToolbox audio input device.
> >>> Date: 18. January 2022 at 23:29
> >>> Signed-off-by: Romain Beauxis <toots@rastageeks.org>
> >>> ---
> >>>  configure                      |   5 +
> >>>  doc/indevs.texi                |  44 ++++
> >>>  libavdevice/Makefile           |   1 +
> >>>  libavdevice/alldevices.c       |   1 +
> >>>  libavdevice/audiotoolbox_dec.m | 466
> >>> +++++++++++++++++++++++++++++++++
> >>>  5 files changed, 517 insertions(+)
> >>>  create mode 100644 libavdevice/audiotoolbox_dec.m
> >>>
> >>> diff --git a/configure b/configure
> >>> index 1413122d87..80e39aae44 100755
> >>> --- a/configure
> >>> +++ b/configure
> >>> @@ -204,6 +204,7 @@ External library support:
> >>>    --disable-avfoundation   disable Apple AVFoundation framework
> >>> [autodetect]
> >>>    --enable-avisynth        enable reading of AviSynth script files
> >>> [no]
> >>>    --disable-bzlib          disable bzlib [autodetect]
> >>> +  --disable-coremedia      disable Apple CoreMedia framework
> >>> [autodetect]
> >>>    --disable-coreimage      disable Apple CoreImage framework
> >>> [autodetect]
> >>>    --enable-chromaprint     enable audio fingerprinting with
> >>> chromaprint [no]
> >>>    --enable-frei0r          enable frei0r video filtering [no]
> >>> @@ -1750,6 +1751,7 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST="
> >>>      appkit
> >>>      avfoundation
> >>>      bzlib
> >>> +    coremedia
> >>>      coreimage
> >>>      iconv
> >>>      libxcb
> >>> @@ -3493,6 +3495,8 @@ alsa_outdev_deps="alsa"
> >>>  avfoundation_indev_deps="avfoundation corevideo coremedia pthreads"
> >>>  avfoundation_indev_suggest="coregraphics applicationservices"
> >>>  avfoundation_indev_extralibs="-framework Foundation"
> >>> +audiotoolbox_indev_deps="coremedia audiotoolbox"
> >>> +audiotoolbox_indev_extralibs="-framework CoreMedia -framework
> >>> AudioToolbox"
> >>>  audiotoolbox_outdev_deps="audiotoolbox pthreads"
> >>>  audiotoolbox_outdev_extralibs="-framework AudioToolbox -framework
> >>> CoreAudio"
> >>>  bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h
> >>> dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
> >>> @@ -6340,6 +6344,7 @@ check_lib camera2ndk "stdbool.h stdint.h
> >>> camera/NdkCameraManager.h" ACameraManag
> >>>  enabled appkit       && check_apple_framework AppKit
> >>>  enabled audiotoolbox && check_apple_framework AudioToolbox
> >>>  enabled avfoundation && check_apple_framework AVFoundation
> >>> +enabled coremedia    && check_apple_framework CoreMedia
> >>>  enabled coreimage    && check_apple_framework CoreImage
> >>>  enabled metal        && check_apple_framework Metal
> >>>  enabled videotoolbox && check_apple_framework VideoToolbox
> >>> diff --git a/doc/indevs.texi b/doc/indevs.texi
> >>> index 858c0fa4e4..30a91d304f 100644
> >>> --- a/doc/indevs.texi
> >>> +++ b/doc/indevs.texi
> >>> @@ -103,6 +103,50 @@ Set the maximum number of frames to buffer.
> >>> Default is 5.
> >>>
> >>>  @end table
> >>>
> >>> +@section AudioToolbox
> >>> +
> >>> +AudioToolbox input device.
> >>> +
> >>> +Allows native input from CoreAudio devices on OSX.
> >> Nit: Nowadays it's macOS instead of OSX
> >>
> >>> +
> >>> +All available devices can be enumerated by using
> >>> @option{-list_devices true}, listing
> >>> +all device names, and corresponding unique ID.
> >>
> >> Instead of adding another device that uses a custom list-devices
> >> option,
> >> could you
> >> instead implement the .get_device_list callback? (See alsa or pulse
> >> modules for an
> >> example) Then listing would work properly with the `ffmpeg -sources`
> >> command and
> >> devices could be iterated over using the avdevice APIs as well.
> >>
> >> (Ideally we would have that for AVFoundation too but its really hard
> >> now
> >> to do that
> >> in a backwards compatible manner)
> >>
> >>> +
> >>> +@subsection Options
> >>> +
> >>> +AudioToolbox supports the following options:
> >>> +
> >>> +@table @option
> >>> +
> >>> +@item channels
> >>> +Set the number of channels. Default is device's default.
> >>> +
> >>> +@item frames_queue_length
> >>> +Maximum of buffers in the input queue
> >>> +
> >>> +@item buffer_frame_size
> >>> +Buffer frame size, gouverning internal latency
> >>> +
> >>> +@item big_endian
> >>> +Return big endian samples
> >>> +
> >>> +@item sample_format
> >>> +Sample format
> >>> +
> >>> +@end table
> >>> +
> >>> +@subsection Examples
> >>> +
> >>> +@itemize
> >>> +
> >>> +@item
> >>> +Print the list of supported devices
> >>> +@example
> >>> +$ ffmpeg -f audiotoolbox -list_devices true -i ""
> >>> +@end example
> >>> +
> >>> +@end itemize
> >>> +
> >>>  @section avfoundation
> >> […]
_______________________________________________
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".

  reply	other threads:[~2022-01-24 16:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 14:17 [FFmpeg-devel] [PATCH 0/5] macos avdevice fixes and improvements Romain Beauxis
2022-01-19 14:23 ` [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats Romain Beauxis
2022-01-19 14:27   ` Marvin Scholz
2022-01-19 14:28   ` Andreas Rheinhardt
2022-01-19 16:48     ` Thilo Borgmann
2022-01-19 14:31   ` Gyan Doshi
2022-01-19 15:14     ` Romain Beauxis
2022-01-19 15:19       ` Gyan Doshi
2022-01-19 15:21         ` Romain Beauxis
2022-01-19 15:45           ` Gyan Doshi
2022-01-19 15:52             ` Romain Beauxis
2022-01-19 14:35 ` [FFmpeg-devel] [PATCH 2/5] libavdevice/avfoundation.m: Replace mutex-based concurrency by a thread-safe fifo queue with maximum length Romain Beauxis
2022-01-19 14:38 ` [FFmpeg-devel] [PATCH 3/5] libavdevice/avfoundation.m: Allow to select devices by unique ID Romain Beauxis
2022-01-19 14:39 ` [FFmpeg-devel] [PATCH 4/5] Use appropriate method for device discovery Romain Beauxis
2022-01-19 14:42 ` [FFmpeg-devel] [PATCH 5/5] Add AudioToolbox audio input device Romain Beauxis
2022-01-19 16:59   ` Marvin Scholz
2022-01-24 15:42     ` Romain Beauxis
2022-01-24 16:19       ` Marvin Scholz
2022-01-24 16:20         ` Romain Beauxis [this message]
2022-01-29 20:35     ` Romain Beauxis
2022-01-29 20:41       ` Andreas Rheinhardt
2022-01-29 20:43         ` Romain Beauxis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABWZ6OTZDEHyi03164_SBVduNbC+XZpsZHOAaTBVLPJM99M6tQ@mail.gmail.com \
    --to=toots@rastageeks.org \
    --cc=epirat07@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=thilo.borgmann@mail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git