[Spice-devel] [PATCH spice-streaming-agent v2 2/2] gst-plugin: Use autovideoconvert element for color space conversion

Snir Sheriber ssheribe at redhat.com
Thu Jun 27 13:37:22 UTC 2019


When VAAPI based encoder is used it's likely that also VAAPI based
conversion is available (using the vaapipostproc element).
Moving to autovideoconvert will automatically choose a suitable
convert element according to elements availability (e.g. in the
VAAPI case it would select vaapipostproc due to its high rank).

Signed-off-by: Snir Sheriber <ssheribe at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
---
Basically Acked, for the record I'm sending it again with the minor changes
---
 src/gst-plugin.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gst-plugin.cpp b/src/gst-plugin.cpp
index 0dd7796..3887b47 100644
--- a/src/gst-plugin.cpp
+++ b/src/gst-plugin.cpp
@@ -216,9 +216,9 @@ void GstreamerFrameCapture::pipeline_init(const GstreamerEncoderSettings &settin
     if (!capture) {
         throw std::runtime_error("Gstreamer's capture element cannot be created");
     }
-    GstObjectUPtr<GstElement> convert(gst_element_factory_make("videoconvert", "convert"));
+    GstObjectUPtr<GstElement> convert(gst_element_factory_make("autovideoconvert", "convert"));
     if (!convert) {
-        throw std::runtime_error("Gstreamer's 'videoconvert' element cannot be created");
+        throw std::runtime_error("Gstreamer's 'autovideoconvert' element cannot be created");
     }
     GstCapsUPtr sink_caps;
     GstObjectUPtr<GstElement> encoder(get_encoder_plugin(settings, sink_caps));
-- 
2.21.0



More information about the Spice-devel mailing list