summaryrefslogtreecommitdiffstats
path: root/pica-client/audiovideocallcontroller.cpp
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-12-05 16:19:13 +0400
committerAnton <anton@picapica.im>2026-12-05 16:19:13 +0400
commit59b0bdc4b0ff24dfaef0cfaed4051cfa0405379b (patch)
tree1cb39f54be7123aabb78b3edfbb3d960f7279f3b /pica-client/audiovideocallcontroller.cpp
parentc3298beb0779a8cc09b6d4ea0d2132c0612ea776 (diff)
downloadpica-pica-qr_codes.tar.gz
pica-pica-qr_codes.zip
pica-client: improve hwaccel probing and aligning bitrate with framerateqr_codes
Diffstat (limited to 'pica-client/audiovideocallcontroller.cpp')
-rw-r--r--pica-client/audiovideocallcontroller.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/pica-client/audiovideocallcontroller.cpp b/pica-client/audiovideocallcontroller.cpp
index 5a79c06..5f24e73 100644
--- a/pica-client/audiovideocallcontroller.cpp
+++ b/pica-client/audiovideocallcontroller.cpp
@@ -92,12 +92,6 @@ AudioVideoCallController::AudioVideoCallController(QObject *parent)
connect(cam, SIGNAL(streamChanged(QString,int,int)), this, SLOT(video_stream_changed(QString,int,int)));
cam_thread.start();
- // The presets choose among the hardware encoders that work, which takes
- // opening each of them to find out. Done now, on the camera's thread,
- // rather than holding up the first call's video.
- if (CallSettings::load().qualityPreset != CallQualityCustom)
- QMetaObject::invokeMethod(cam, "probeHardwareEncoders", Qt::QueuedConnection);
-
remotevideo = new VideoDevice();
remotevideo->moveToThread(&remotevideo_thread);
remotevideo_thread.start();
@@ -337,7 +331,9 @@ void AudioVideoCallController::startVideoPipeline()
// Anything but Custom replaces most of what configureCapture() was just
// given, within that limit - see VideoDevice::setQualityPreset().
QMetaObject::invokeMethod(cam, "setQualityPreset", Qt::QueuedConnection,
- Q_ARG(int, (int)cs.qualityPreset));
+ Q_ARG(int, (int)cs.qualityPreset),
+ Q_ARG(QStringList, VideoDevice::HardwareEncoderNames(
+ VideoDevice::PresetHardwareEncoders(cs.videoEncodingAcceleration))));
QMetaObject::invokeMethod(cam, "Capture", Qt::QueuedConnection);
// remotevideo is configured lazily, once the peer's own 0x75 (see