On Fri, Apr 18, 2025 at 01:29:48PM +0200, Dietmar Maurer wrote: > The search list is currently hardcoded to: ["x264enc", "openh264enc"] > > x264enc: is probably the best available software encoder > openh264enc: lower quality, but available on more systems. > > We restrict encoders to a known list because each encoder requires > fine tuning to get reasonable/usable results. > > Signed-off-by: Dietmar Maurer <diet...@proxmox.com> > --- > ui/vnc-enc-h264.c | 89 +++++++++++++++++++++++++++++++++++++++-------- > ui/vnc.h | 1 + > 2 files changed, 75 insertions(+), 15 deletions(-) > > diff --git a/ui/vnc-enc-h264.c b/ui/vnc-enc-h264.c > index 3abe6a1528..047f4a3128 100644 > --- a/ui/vnc-enc-h264.c > +++ b/ui/vnc-enc-h264.c
> @@ -172,9 +220,20 @@ static bool create_encoder_context(VncState *vs, int w, > int h) > > bool vnc_h264_encoder_init(VncState *vs) > { > + const char *encoder_name; > + > g_assert(vs->h264 == NULL); > > + encoder_name = get_available_encoder(); > + if (encoder_name == NULL) { > + VNC_DEBUG("No H264 encoder available.\n"); > + return -1; This method has return type 'bool', not 'int', this needs to be 'false'. > + } > + > vs->h264 = g_new0(VncH264, 1); > + vs->h264->encoder_name = encoder_name; > + > + VNC_DEBUG("Allow H264 using encoder '%s`\n", encoder_name); > > return true; > } With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|