> > > > +#include <gst/gst.h> > > > > + > > > > +static void libavcodec_destroy_encoder_context(VncState *vs) > > > > > > it's not libavcodec. > > > > I will fix that in v2. > > What about encodebin suggestion?
I found no way to configure codec specific option (i.e. x264 zerolatency). I there a way? It is crucial to set those option to get reasonable quality. Anyway, I can test a view option, for example x264, openh264, and maybe vah264enc (hardware support), and then simply use what is available. I think we should also have the option to allow h264 if we detect HW support, but disable software encoders. Or let the user select the list of allowed codec? > > > > > > +#ifdef CONFIG_GSTREAMER > > > > + case VNC_ENCODING_H264: > > > > + if (vnc_h264_encoder_init(vs) == 0) { > > > > + vnc_set_feature(vs, VNC_FEATURE_H264); > > > > > > Before advertising support for the codec, it should actually check if > > > the encoder is present. > > > > ok. > > > > > It would also be useful to have an extra VNC > > > option like H264=on/off/auto. > > > > I thought it would be better to do that at the client? > > Well, it can be worth it to prevent h264 usage from the server too. Or > to ensure the server is h264-capable. (this wasn't seen as much > necessary for other codecs that are low-resource and/or patent-free, > but may make sense too) Maybe H264=on,off,codec-list on: automatically select the codec off: disable h264 codec-list: a list of allowed codecs - Dietmar