qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] new configure option to enable gstreamer
@ 2025-04-07 10:59 Dietmar Maurer
  2025-04-07 10:59 ` [PATCH 2/3] add vnc h264 encoder Dietmar Maurer
  2025-04-07 10:59 ` [PATCH 3/3] vnc: h264: send additional frames after the display is clean Dietmar Maurer
  0 siblings, 2 replies; 9+ messages in thread
From: Dietmar Maurer @ 2025-04-07 10:59 UTC (permalink / raw)
  To: qemu-devel, marcandre.lureau; +Cc: Dietmar Maurer

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
---
 meson.build                   | 10 ++++++++++
 meson_options.txt             |  2 ++
 scripts/meson-buildoptions.sh |  5 ++++-
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 41f68d3806..28ca37855a 100644
--- a/meson.build
+++ b/meson.build
@@ -1348,6 +1348,14 @@ if not get_option('zstd').auto() or have_block
                     required: get_option('zstd'),
                     method: 'pkg-config')
 endif
+
+gstreamer = not_found
+if not get_option('gstreamer').auto() or have_block
+  gstreamer = dependency('gstreamer-1.0 gstreamer-base-1.0', version: '>=1.22.0',
+                          required: get_option('gstreamer'),
+                          method: 'pkg-config')
+endif
+
 qpl = not_found
 if not get_option('qpl').auto() or have_system
   qpl = dependency('qpl', version: '>=1.5.0',
@@ -2563,6 +2571,7 @@ config_host_data.set('CONFIG_MALLOC_TRIM', has_malloc_trim)
 config_host_data.set('CONFIG_STATX', has_statx)
 config_host_data.set('CONFIG_STATX_MNT_ID', has_statx_mnt_id)
 config_host_data.set('CONFIG_ZSTD', zstd.found())
+config_host_data.set('CONFIG_GSTREAMER', gstreamer.found())
 config_host_data.set('CONFIG_QPL', qpl.found())
 config_host_data.set('CONFIG_UADK', uadk.found())
 config_host_data.set('CONFIG_QATZIP', qatzip.found())
@@ -4836,6 +4845,7 @@ summary_info += {'snappy support':    snappy}
 summary_info += {'bzip2 support':     libbzip2}
 summary_info += {'lzfse support':     liblzfse}
 summary_info += {'zstd support':      zstd}
+summary_info += {'gstreamer support': gstreamer}
 summary_info += {'Query Processing Library support': qpl}
 summary_info += {'UADK Library support': uadk}
 summary_info += {'qatzip support':    qatzip}
diff --git a/meson_options.txt b/meson_options.txt
index 59d973bca0..11cd132be5 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -254,6 +254,8 @@ option('vnc_sasl', type : 'feature', value : 'auto',
        description: 'SASL authentication for VNC server')
 option('vte', type : 'feature', value : 'auto',
        description: 'vte support for the gtk UI')
+option('gstreamer', type : 'feature', value : 'auto',
+       description: 'for VNC H.264 encoding with gstreamer')
 
 # GTK Clipboard implementation is disabled by default, since it may cause hangs
 # of the guest VCPUs. See gitlab issue 1150:
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 3e8e00852b..b0c273d61e 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -229,6 +229,7 @@ meson_options_help() {
   printf "%s\n" '                  Xen PCI passthrough support'
   printf "%s\n" '  xkbcommon       xkbcommon support'
   printf "%s\n" '  zstd            zstd compression support'
+  printf "%s\n" '  gstreamer       gstreamer support (H264 for VNC)'
 }
 _meson_option_parse() {
   case $1 in
@@ -581,6 +582,8 @@ _meson_option_parse() {
     --disable-xkbcommon) printf "%s" -Dxkbcommon=disabled ;;
     --enable-zstd) printf "%s" -Dzstd=enabled ;;
     --disable-zstd) printf "%s" -Dzstd=disabled ;;
-    *) return 1 ;;
+    --enable-gstreamer) printf "%s" -Dgstreamer=enabled ;;
+    --disable-gstreamer) printf "%s" -Dgstreamer=disabled ;;
+   *) return 1 ;;
   esac
 }
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 0/3] Add VNC Open H.264 Encoding
@ 2025-04-08  7:15 Dietmar Maurer
  2025-04-08  7:15 ` [PATCH 2/3] add vnc h264 encoder Dietmar Maurer
  0 siblings, 1 reply; 9+ messages in thread
From: Dietmar Maurer @ 2025-04-08  7:15 UTC (permalink / raw)
  To: qemu-devel, marcandre.lureau; +Cc: Dietmar Maurer

As defined by:

https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#open-h-264-encoding

The noVNC HTML application recently added support for this encoding. There is
also an open pull request to add audio support to noVNC:

https://github.com/novnc/noVNC/pull/1952

With that in place, the web based VNC console is good enough to display
a VM showing a video with reasonable bandwidth.

Possible improvements:

- Dynamic switching to/from H264 mode at high change rates
- Support for hardware encoders

We may also extend the RFB Audio protocol with "opus" encoding, because uncompressed
audio need too much bandwidth.


Dietmar Maurer (3):
  new configure option to enable gstreamer
  add vnc h264 encoder
  vnc: h264: send additional frames after the display is clean

 meson.build                   |  10 ++
 meson_options.txt             |   2 +
 scripts/meson-buildoptions.sh |   5 +-
 ui/meson.build                |   1 +
 ui/vnc-enc-h264.c             | 269 ++++++++++++++++++++++++++++++++++
 ui/vnc-jobs.c                 |  49 +++++--
 ui/vnc.c                      |  46 +++++-
 ui/vnc.h                      |  24 +++
 8 files changed, 389 insertions(+), 17 deletions(-)
 create mode 100644 ui/vnc-enc-h264.c

-- 
2.39.5



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-08 11:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07 10:59 [PATCH 1/3] new configure option to enable gstreamer Dietmar Maurer
2025-04-07 10:59 ` [PATCH 2/3] add vnc h264 encoder Dietmar Maurer
2025-04-07 20:36   ` Marc-André Lureau
2025-04-08  9:53     ` Dietmar Maurer
2025-04-08 10:37       ` Marc-André Lureau
2025-04-08 11:10         ` Dietmar Maurer
2025-04-07 10:59 ` [PATCH 3/3] vnc: h264: send additional frames after the display is clean Dietmar Maurer
2025-04-07 20:17   ` Marc-André Lureau
  -- strict thread matches above, loose matches on Subject: below --
2025-04-08  7:15 [PATCH 0/3] Add VNC Open H.264 Encoding Dietmar Maurer
2025-04-08  7:15 ` [PATCH 2/3] add vnc h264 encoder Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).