<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pica-pica/pica-client/pica-client.pro, 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: configurable resolutions, codecs, bitrates for a call</title>
<updated>2026-09-26T15:00:40+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-09-26T15:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=76225a538e1e960eda9e31a34846f4bc62adef87'/>
<id>76225a538e1e960eda9e31a34846f4bc62adef87</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: 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: fix echo canceller and capture gain auto regulator</title>
<updated>2026-09-01T17:09:47+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-09-01T17:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=c6649895d58bcfab864bcc33b131db222e45bfef'/>
<id>c6649895d58bcfab864bcc33b131db222e45bfef</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: camera enumeration and capture on Windows</title>
<updated>2026-08-24T01:29:55+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-24T01:29:55+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=e4067492b4025509a94ac499106a69de356d740b'/>
<id>e4067492b4025509a94ac499106a69de356d740b</id>
<content type='text'>
Capture already went through FFmpeg's "dshow" demuxer, which does the job -
unlike the audio case there is nothing here the platform offers that we cannot
reach any other way, so there is no reason to drive DirectShow ourselves. Two
things were missing to make it work.

Enumeration, because the demuxer has none: it can only print device names to
the log with -list_devices, which is no use to a settings dialog. The list is
built in videodshow.cpp instead, walking the same CLSID_VideoInputDeviceCategory
the demuxer walks, so the names handed back are the ones it matches on. Where a
friendly name is not unique - two identical cameras - later duplicates fall
back to the device path, which the demuxer also accepts.

And the "video=" prefix, since DirectShow namespaces its devices by type and
the same name behind "audio=" would be a microphone. The name is stored
unprefixed and decorated at open time, so what the settings dialog shows and
writes stays readable.

Also adds a last-resort open with no constraints at all. DirectShow refuses a
video_size or framerate it cannot produce exactly rather than settling for the
nearest, so a camera with an unusual set of modes would otherwise give no
picture; whatever comes back is scaled by the transcode loop anyway.

The failure message on Windows now names the likely cause. A camera that
enumerated but will not open is usually not a broken camera: Windows lists
devices it then refuses to instantiate, which is what the "Let desktop apps
access your camera" privacy setting being off looks like from here, and what
another application holding the camera looks like too. None of them are
distinguishable from a real fault at that level, and the bare "I/O error" sent
me looking at the wrong layer entirely.

compressedFormats is left empty on Windows, so "prefer compressed formats" has
no effect there - finding out what a DirectShow camera can deliver means
walking its output pin's media types through IAMStreamConfig, which is a good
deal more than the one v4l2 ioctl that fills this in on Linux.

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>
Capture already went through FFmpeg's "dshow" demuxer, which does the job -
unlike the audio case there is nothing here the platform offers that we cannot
reach any other way, so there is no reason to drive DirectShow ourselves. Two
things were missing to make it work.

Enumeration, because the demuxer has none: it can only print device names to
the log with -list_devices, which is no use to a settings dialog. The list is
built in videodshow.cpp instead, walking the same CLSID_VideoInputDeviceCategory
the demuxer walks, so the names handed back are the ones it matches on. Where a
friendly name is not unique - two identical cameras - later duplicates fall
back to the device path, which the demuxer also accepts.

And the "video=" prefix, since DirectShow namespaces its devices by type and
the same name behind "audio=" would be a microphone. The name is stored
unprefixed and decorated at open time, so what the settings dialog shows and
writes stays readable.

Also adds a last-resort open with no constraints at all. DirectShow refuses a
video_size or framerate it cannot produce exactly rather than settling for the
nearest, so a camera with an unusual set of modes would otherwise give no
picture; whatever comes back is scaled by the transcode loop anyway.

The failure message on Windows now names the likely cause. A camera that
enumerated but will not open is usually not a broken camera: Windows lists
devices it then refuses to instantiate, which is what the "Let desktop apps
access your camera" privacy setting being off looks like from here, and what
another application holding the camera looks like too. None of them are
distinguishable from a real fault at that level, and the bare "I/O error" sent
me looking at the wrong layer entirely.

compressedFormats is left empty on Windows, so "prefer compressed formats" has
no effect there - finding out what a DirectShow camera can deliver means
walking its output pin's media types through IAMStreamConfig, which is a good
deal more than the one v4l2 ioctl that fills this in on Linux.

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: 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: UDP transport for calls</title>
<updated>2026-08-19T10:47:51+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica.im</email>
</author>
<published>2026-08-19T10:47:51+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=c9f6051380f4edf5f7ac336501ecb1f32946dc6e'/>
<id>c9f6051380f4edf5f7ac336501ecb1f32946dc6e</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>add classes for audio &amp; video devices, implemented video device enumeration for Linux</title>
<updated>2020-05-30T02:18:34+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2020-05-30T02:18:34+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=90e2f0ae3bf00e1b9850e1b96b90944d06491532'/>
<id>90e2f0ae3bf00e1b9850e1b96b90944d06491532</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: implement nodes dialog, shows locally stored nodes</title>
<updated>2019-03-14T11:52:47+00:00</updated>
<author>
<name>Anton</name>
<email>anton@picapica</email>
</author>
<published>2019-03-14T11:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://picapica.im/cgit/cgit.cgi/pica-pica/commit/?id=5156d5280c679bf3c9dcb7ba78babd2dafdd59f9'/>
<id>5156d5280c679bf3c9dcb7ba78babd2dafdd59f9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
