Go to file
Vivek Kasireddy 2bc2f125ce gstreamer-encoder: Use a h/w based encoder with Intel GPUs if possible (v5)
Once it is determined that an Intel GPU is available/active (after
looking into udev's database), we try to see if there is a h/w
based encoder (element) available (in Gstreamer's registry cache)
for the user selected video codec. In other words, if we find that
the Intel Media SDK Gstreamer plugin (libgstmsdk.so) and associated
libraries (such as va or vaapi) are all installed properly, we add
the appropriate h/w based encoder and post-processor/converter
elements to the pipeline (along with any relevant options) instead
of the s/w based elements.

For example, if the user selects h264 as the preferred codec format,
msdkh264enc and vapostproc will be preferred instead of x264enc
and videoconvert.

v2: (addressed some review comments from Frediano)
- Moved the udev helper into spice-common
- Refactored the code to choose plugins in order msdk > va > vaapi

v3: (Frediano)
- Added relevant encoder options for mjpeg and vp9 codecs (Jin Chung)

v4: (Fixups from Frediano)
- Free the encoder when we cannot find vpp
- Change type and find plugins array length using G_N_ELEMENTS
- Fix gstenc_name UAF by freeing it at the end of the function
- Use g_str_has_prefix instead of strstr
- Include the string "_hw_" in function names that deal with
  h/w based plugins
- Rebase on master

v5: rebase on master

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Co-developed-by: Jin Chung Teng <jin.chung.teng@intel.com>
Co-developed-by: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
2024-03-01 18:53:26 -08:00
build-aux ci: Update makecheck-windows job to Meson 2023-05-30 20:35:57 +01:00
docs docs: Fix building manual with Meson from tarball 2021-04-19 17:05:29 +01:00
m4 Exclude a warning causing new compiler to fail 2022-07-19 10:10:26 +01:00
server gstreamer-encoder: Use a h/w based encoder with Intel GPUs if possible (v5) 2024-03-01 18:53:26 -08:00
subprojects Update spice-common submodule 2022-07-19 10:07:06 +01:00
tests migrate.py: By default try to search system qemu executable 2020-03-09 12:28:45 +00:00
tools Fix compatibility with mremap and Darwin 2020-05-19 10:01:47 +01:00
uncrustify_cfg fresh start 2009-10-14 15:06:41 +02:00
.gitignore docs: update Makefile to match meson dist 2019-10-14 13:49:18 +01:00
.gitlab-ci.yml test-listen: Use OpenSSL BIO instead of GIO library 2023-11-22 07:36:40 +00:00
.gitmodules build: Move spice-common to subprojects/ directory 2018-07-23 14:49:19 -03:00
.mailmap syntax-check: Fix missing AUTHORS 2016-12-05 13:48:28 +00:00
.travis.yml Remove Celt support 2020-03-17 17:15:51 +00:00
AUTHORS gstreamer-encoder: Use an env var to override converter format 2023-11-15 18:04:56 +00:00
autogen.sh build-sys: Pass --enable-python-checks when running autogen.sh 2015-04-23 10:38:24 +02:00
cfg.mk Converting Spice_for_newbies.odt to AsciiDoctor format 2019-05-31 15:06:10 +01:00
CHANGELOG.md build: Prepare for 0.15.2 release 2023-05-11 12:26:06 +01:00
configure.ac build: Remove support for GStreamer 0.10 2023-09-17 10:00:41 +01:00
COPYING Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
doxygen.cfg build: Add Doxygen support 2020-06-25 09:12:37 +01:00
doxygen.sh build: Add Doxygen support 2020-06-25 09:12:37 +01:00
GNUmakefile syntax-check: Update gnufiles 2016-11-18 12:06:53 +00:00
maint.mk syntax-check: Update gnufiles 2016-11-18 12:06:53 +00:00
Makefile.am build: Add missing file to distribution 2023-05-11 12:26:06 +01:00
meson_options.txt build: Remove support for GStreamer 0.10 2023-09-17 10:00:41 +01:00
meson.build build: Remove support for GStreamer 0.10 2023-09-17 10:00:41 +01:00
README Update spice-protocol version 2019-04-26 11:45:12 +01:00
README.Windows.md Add some notes for the Windows port 2019-05-07 10:14:35 +01:00
spice-server.pc.in build: Change Autotools pkg-config name field to match Meson 2020-04-10 15:28:16 +01:00
TODO.multiclient Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00

   SPICE: Simple Protocol for Independent Computing Environments
   =============================================================

SPICE is a remote display system built for virtual environments which
allows you to view a computing 'desktop' environment not only on the
machine where it is running, but from anywhere on the Internet and
from a wide variety of machine architectures.

Installation
------------

The SPICE package uses GNU autotools, so the build install process
follows the standard process documented in the INSTALL file. As a
quick start you can do

  ./configure --prefix=/usr --sysconfdir=/etc \
        --localstatedir=/var --libdir=/usr/lib
  make
  sudo make install

Or to install into a private user specific location

  ./configure --prefix=$HOME/spice
  make
  make install

The following mandatory dependencies are required in order to
build SPICE

    Spice protocol >= 0.14.0
    Pixman         >= 0.17.7
    OpenSSL
    libjpeg
    zlib

The following optional dependencies increase the available
functionality

    Cyrus-SASL
    libcacard      >= 2.5.1             (Smartcard support)
    Opus           >= 1.0.0             (Opus audio encoding support)
    LZ4                                 (LZ4 compression support)
    GStreamer      >= 1.0.0

Communication
-------------

To communicate with the development team, or to post patches
there is a technical mailing list:

   http://lists.freedesktop.org/mailman/listinfo/spice-devel

There is also a mailing list for new release announcements:

   http://lists.freedesktop.org/archives/spice-announce/

To view known bugs, or report new bugs, in SPICE visit

   https://gitlab.freedesktop.org/spice/spice/issues/new?

Bugs found when using an OS distribution's binary packages should
be reported to the OS vendors' own bug tracker first.

The latest SPICE code can be found in GIT at:

   https://gitlab.freedesktop.org/spice/

Licensing
---------

SPICE is provided under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

Please see the COPYING file for the complete LGPLv2+ license
terms, or visit <http://www.gnu.org/licenses/>.

Experimental Features
---------------------
To enable multiple client connections, set:
SPICE_DEBUG_ALLOW_MC=1

-- End of readme