[Spice-devel] [PATCH 4/4] channel-display-gst: Use h/w based decoders with Intel GPUs if possible (v2)

2023-09-14 Thread Vivek Kasireddy
We first try to detect if an Intel GPU is available (by looking into udev's database) and then probe Gstreamer's registry cache to see if there is h/w based decoder (element) available for the incoming video codec format. If both these conditions are satisfied (i.e, Intel Media SDK Gstreamer

[Spice-devel] [PATCH 2/2] gstreamer-encoder: Use a h/w based encoder with Intel GPUs if possible (v2)

2023-09-14 Thread Vivek Kasireddy
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

[Spice-devel] [PATCH] common: Add a udev helper to identify GPU Vendor

2023-09-14 Thread Vivek Kasireddy
Given that libudev is widely available on many distros, we can use the relevant APIs to iterate over all the PCI devices on any given system to identify if a GPU is available by looking at the driver name associated with it. This capability (identifying GPU Vendor) is useful to determine whether

[Spice-devel] [PATCH 1/2] gstreamer-encoder: Use NV12 as the default vpp conversion format

2023-09-14 Thread Vivek Kasireddy
From: Hazwan Arif Mazlan Using NV12 as the output format for the videoconvert element would allow us to pair a s/w based encoder with a h/w based decoder for decoding the stream as most h/w based decoders only accept NV12 as the input format given its popularity. Cc: Frediano Ziglio Cc:

[Spice-devel] [PATCH 3/4] channel-display-gst: Don't unref appsink and pipeline objects

2023-09-14 Thread Vivek Kasireddy
It looks like setting the Gst pipeline state to GST_STATE_NULL would cause all the references on most of the objects associated with the pipeline to be dropped; therefore, there is no need to explicitly unref them while freeing the pipeline. This patch prevents the following errors from showing up

[Spice-devel] [PATCH 2/4] channel-display-gst: Add "byte-stream" as the stream format for h264

2023-09-14 Thread Vivek Kasireddy
Adding the string "stream-format=byte-stream" to decoder capabilities (dec_caps) for h264/h265 codecs stops Gstreamer from complaining about missing stream format. Cc: Frediano Ziglio Cc: Dongwon Kim Cc: Jin Chung Teng Cc: Hazwan Arif Mazlan Signed-off-by: Vivek Kasireddy ---

[Spice-devel] [PATCH 1/4] channel-display-gst: Prefer playbin3 to playbin

2023-09-14 Thread Vivek Kasireddy
From: Jin Chung Teng If playbin3 is available (checked in Gstreamer registry), it makes sense to prefer it given the major improvements and features it offers including the capability to handle higher bitrates. Cc: Frediano Ziglio Cc: Dongwon Kim Cc: Hazwan Arif Mazlan Signed-off-by: Jin

[Spice-devel] [PATCH 0/4] spice/gstreamer: Use h/w based encoders/decoders with Intel GPUs if possible (v2)

2023-09-14 Thread Vivek Kasireddy
This patch series includes a patch for Spice (server) to automatically select h/w based encoder elements and another one for Spice-gtk (client) to automatically select h/w based decoder elements with Intel GPUs when these two conditions are met: - An Intel GPU is available and is active (driver