summaryrefslogtreecommitdiffstats
path: root/pica-client/audiovideocallcontroller.h
Commit message (Collapse)AuthorAgeFilesLines
* pica-client: fix capture at requested fpsAnton12 days1-1/+6
|
* pica-client: callwindow layout, video resizeAnton12 days1-0/+4
|
* pica-client: use webrtc-audio-processing instead of speexdsp for echo ↵Anton2026-09-131-77/+2
| | | | cancellation
* pica-client: more improvements of echo cancellationAnton2026-09-031-9/+56
|
* pica-client: fix echo canceller and capture gain auto regulatorAnton2026-09-011-0/+29
|
* pica-client: echo cancellation, and native audio on Windows and macOSAnton2026-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CBqDgvq3Ty6C6BjLFH16bw
* pica-client: UDP transport for callsAnton2026-08-191-0/+2
|
* pica-client: VAAPI on X11, two codepathsAnton2026-08-161-0/+3
|
* pica-client: add support for compressed video formats provided by camera: ↵Anton2026-08-131-0/+1
| | | | hevc, h264, mjpeg
* pica-client: video callAnton2026-08-131-0/+27
|
* pica-client: voice callsAnton2026-08-121-1/+19
|
* pica-client: fix CallWindow only being usable for the first callAnton2026-08-091-0/+1
| | | | | | | | | | | AudioVideoCallController never cleared its callwindow pointer after a call ended, so start_call()/call_from() would see it as non-null forever and silently refuse every subsequent call. CallWindow now sets WA_DeleteOnClose and emits callwindow_closed() from closeEvent(), mirroring the ChatWindow/MsgUIRouter pattern. The controller resets its pointer to 0 in response, and end_call() closes the window once the hangup/reject has been handled.
* pica-client: add TonePlayer for classic telephony call tonesAnton2026-08-091-0/+17
| | | | | | | | | | | | | | | | Wires ringback, busy, special-information (unreachable) and an electromechanical-bell incoming ringtone into AudioVideoCallController, each played on its own QThread since TonePlayer::play() blocks. Device selection reads audio.playback_device and audio.ring_device from Settings so it follows what's configured in SettingsDialog. Centralizes the FFmpeg libavdevice output driver name (alsa/audiotoolbox/dsound) in AudioDevice::PlatformDriverName() rather than hardcoding ALSA, so it can also back capture/playback later. Adds toneplayer.{h,cpp} to the autotools build and adds the missing GPL v3 header to the touched files that lacked it.
* pica-client: add call initiation & termination in skynet and ↵Anton2025-08-191-0/+22
| | | | audiovideocallscontroller and callwindow
* add audiovideocallcontroller and callwindow, menu action to initiate callAnton2021-06-291-0/+35