<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pica-pica/pica-client/main.cpp, branch audio_video_calls</title>
<subtitle>Main Pica Pica repository</subtitle>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/'/>
<entry>
<title>pica-client: get rid of running the openssl binary, use in-process library calls instead</title>
<updated>2026-09-20T23:43:27+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-09-20T23:43:27+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=1f7c350a83d6a515919255dc72266fd4e143cd1d'/>
<id>1f7c350a83d6a515919255dc72266fd4e143cd1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: use webrtc-audio-processing instead of speexdsp for echo cancellation</title>
<updated>2026-09-13T15:53:28+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-09-13T15:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=9a84c95af6771590d4e5fe436e77bbe92a9dea92'/>
<id>9a84c95af6771590d4e5fe436e77bbe92a9dea92</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: echo cancellation, and native audio on Windows and macOS</title>
<updated>2026-08-24T01:06:23+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-24T01:06:23+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=a4ddbc49c82e31ee980ea1096cc737db438c012e'/>
<id>a4ddbc49c82e31ee980ea1096cc737db438c012e</id>
<content type='text'>
PlatformDriverName() now takes a direction, and answers with one of two kinds
of name. A bare one - "alsa", "pulse", "oss" - is an FFmpeg libavdevice driver
opened the way everything else here is opened. One prefixed "platform-" is not
an FFmpeg driver at all: what follows names a platform audio API the caller
drives itself through NativeAudioBackend.

Windows and macOS take the second route, because both provide acoustic echo
cancellation but only to streams that declare themselves part of a voice call
- AudioCategory_Communications on WASAPI, the VoiceProcessingIO audio unit on
CoreAudio - and libavdevice's wrappers have no way to ask for either. Doing our
own cancelling on platforms that would have done it better below us is not a
trade worth making.

Where the platform will not do it, speexdsp does: one EchoCanceller per call,
shared by both directions through a QSharedPointer, since the call is torn down
without joining either audio thread. Playback feeds it the far end as it hands
it to the device; capture subtracts before encoding. Alignment is left to the
FIFO - in steady state its backlog settles at the sound card's buffer depth,
which is also how far ahead of the speaker the playback side runs, leaving only
the room for the filter tail to model. Measured 27 dB ERLE on a 60 ms echo with
1.6 dB of loss on speech when nothing is playing.

On macOS the canceller is a single audio unit that renders and captures at
once, so both directions share one refcounted instance. Ringtones deliberately
get a plain HALOutput unit instead - opening a voice unit to play a bell would
switch the microphone on and prompt for permission.

Linux gains a choice of alsa or pulse, with PulseAudio device enumeration
through libpulse when configure finds it.

Info.plist gains NSMicrophoneUsageDescription and NSCameraUsageDescription.
Without them macOS 10.14 and later kills the process on first use of the
microphone or camera rather than asking, so calls did not merely fail, they
took the application with them.

Two things fixed along the way that were not about echo at all: the settings
dialog's microphone test paced playback by counting timer ticks, which on
Windows meant a 20 ms packet every ~31 ms because the system timer granularity
is 15.6 ms - the recording came out slowed down and chopped up. It now paces
against a QElapsedTimer. And chooseEncoderSampleFmt() uses
avcodec_get_supported_config() where available, the AVCodec format arrays it
replaced having been removed in FFmpeg 9.

Only the Linux paths are verified here; the Windows and macOS backends compile
to nothing on this machine and have been reviewed by hand.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01CBqDgvq3Ty6C6BjLFH16bw
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PlatformDriverName() now takes a direction, and answers with one of two kinds
of name. A bare one - "alsa", "pulse", "oss" - is an FFmpeg libavdevice driver
opened the way everything else here is opened. One prefixed "platform-" is not
an FFmpeg driver at all: what follows names a platform audio API the caller
drives itself through NativeAudioBackend.

Windows and macOS take the second route, because both provide acoustic echo
cancellation but only to streams that declare themselves part of a voice call
- AudioCategory_Communications on WASAPI, the VoiceProcessingIO audio unit on
CoreAudio - and libavdevice's wrappers have no way to ask for either. Doing our
own cancelling on platforms that would have done it better below us is not a
trade worth making.

Where the platform will not do it, speexdsp does: one EchoCanceller per call,
shared by both directions through a QSharedPointer, since the call is torn down
without joining either audio thread. Playback feeds it the far end as it hands
it to the device; capture subtracts before encoding. Alignment is left to the
FIFO - in steady state its backlog settles at the sound card's buffer depth,
which is also how far ahead of the speaker the playback side runs, leaving only
the room for the filter tail to model. Measured 27 dB ERLE on a 60 ms echo with
1.6 dB of loss on speech when nothing is playing.

On macOS the canceller is a single audio unit that renders and captures at
once, so both directions share one refcounted instance. Ringtones deliberately
get a plain HALOutput unit instead - opening a voice unit to play a bell would
switch the microphone on and prompt for permission.

Linux gains a choice of alsa or pulse, with PulseAudio device enumeration
through libpulse when configure finds it.

Info.plist gains NSMicrophoneUsageDescription and NSCameraUsageDescription.
Without them macOS 10.14 and later kills the process on first use of the
microphone or camera rather than asking, so calls did not merely fail, they
took the application with them.

Two things fixed along the way that were not about echo at all: the settings
dialog's microphone test paced playback by counting timer ticks, which on
Windows meant a 20 ms packet every ~31 ms because the system timer granularity
is 15.6 ms - the recording came out slowed down and chopped up. It now paces
against a QElapsedTimer. And chooseEncoderSampleFmt() uses
avcodec_get_supported_config() where available, the AVCodec format arrays it
replaced having been removed in FFmpeg 9.

Only the Linux paths are verified here; the Windows and macOS backends compile
to nothing on this machine and have been reviewed by hand.

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_01CBqDgvq3Ty6C6BjLFH16bw
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: VAAPI on X11, two codepaths</title>
<updated>2026-08-15T23:28:51+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-15T23:28:51+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=1b7b9d46c84c38cbf2df293113a687481e205585'/>
<id>1b7b9d46c84c38cbf2df293113a687481e205585</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: VAAPI hardware acceleration</title>
<updated>2026-08-13T21:29:59+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-13T21:29:59+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=ad95ec8759777c4b8df0dcd66fd8200d24e912b1'/>
<id>ad95ec8759777c4b8df0dcd66fd8200d24e912b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: move SkyNet instance to the separate thread</title>
<updated>2026-08-11T20:19:00+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-11T20:19:00+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=cf44fd4cd45ed571a36cda5065158d29bdbe0c7b'/>
<id>cf44fd4cd45ed571a36cda5065158d29bdbe0c7b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add audiovideocallcontroller and callwindow, menu action to initiate call</title>
<updated>2021-06-28T22:13:06+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2021-06-28T22:13:06+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=1a150eb79fc9c041622a63d51e9a1adfd47c8bcd'/>
<id>1a150eb79fc9c041622a63d51e9a1adfd47c8bcd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>changed license from GPL-3.0-or-later to GPL-3.0-only</title>
<updated>2019-11-13T13:54:23+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2019-11-13T13:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=5e71499e3cb7ecf1bc8d0153e466b43de31b98c5'/>
<id>5e71499e3cb7ecf1bc8d0153e466b43de31b98c5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pica-client: Qt5 support</title>
<updated>2019-02-27T19:17:54+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2019-02-27T19:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=0b49edf464a238e7e7ff141310681613b1b1b050'/>
<id>0b49edf464a238e7e7ff141310681613b1b1b050</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add copyrigt and GPL-3.0-or-later license notice to source files</title>
<updated>2018-07-17T11:23:33+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2018-07-17T11:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=1d09a26a2ee94315dd23a7d759c4a182fdbb8664'/>
<id>1d09a26a2ee94315dd23a7d759c4a182fdbb8664</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
