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: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Thilo Borgmann <thilo.borgmann@mail.de>,
	Marvin Scholz <epirat07@gmail.com>
Subject: [FFmpeg-devel] [PATCH 2/5] libavdevice/avfoundation.m: Replace mutex-based concurrency by a thread-safe fifo queue with maximum length
Date: Wed, 19 Jan 2022 08:35:33 -0600
Message-ID: <DEB7F2FD-F149-494A-9E26-6081BE10A259@rastageeks.org> (raw)
In-Reply-To: <CABWZ6ORCvLPGGMdOU8z3jSAupKkoNH+jVT8PH2UVoPdEmA+tEQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

The existing implementation of avdevice input has issues in its concurrent model as it only allows for one shared frame between writing and reading threads. This means that, if reading thread gets late, frames get dropped, resulting in corrupted input.

This patch changes the concurrency logic to use a single shared queue for both video and audio frames. Previous version of the patch used separate queues for audio and video but this could cause synchronization issues.

In order to avoid dropping initial audio frames, the video configuration logic is also changed to assume height/width as configured when opening the input device so as to not depend on the first video frame for it.


[-- Attachment #2: 0001-libavdevice-avfoundation.m-Replace-mutex-based-concurr.eml --]
[-- Type: message/rfc822, Size: 16846 bytes --]

Date: =20Sun,=2012=20Dec=202021=2017:29:27=20-0600=0ASubject:=20[PATCH]=20=



[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

_______________________________________________
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".

  parent reply	other threads:[~2022-01-19 14:35 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 ` Romain Beauxis [this message]
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
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=DEB7F2FD-F149-494A-9E26-6081BE10A259@rastageeks.org \
    --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