[PATCH spice-gtk 1/5] display-gst: move "caps=" from struct to pipeline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

This way we have a map of the necessary GstCaps to a given
SPICE_VIDEO_CODEC_TYPE.

This patch is also a preparatory patch to:

- Identify which GstElements in GstRegistry can handle this GstCaps

- Use Playbin as wrapper to all elements beside GstAppSrc and
  GstAppSink. In this case, we should rely on GstCaps to reduce
  typefind errors as we should know what kind of data is expected

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
Signed-off-by: Victor Toso <me@xxxxxxxxxxxxxx>
---
 src/channel-display-gst.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
index c4190b2..8c34b77 100644
--- a/src/channel-display-gst.c
+++ b/src/channel-display-gst.c
@@ -62,14 +62,14 @@ static struct {
     { "decodebin", "" },
 
     /* SPICE_VIDEO_CODEC_TYPE_MJPEG */
-    { "jpegdec", "caps=image/jpeg" },
+    { "jpegdec", "image/jpeg" },
 
     /* SPICE_VIDEO_CODEC_TYPE_VP8
      *
      * typefind is unable to identify VP8 streams by design.
      * See: https://bugzilla.gnome.org/show_bug.cgi?id=756457
      */
-    { "vp8dec", "caps=video/x-vp8" },
+    { "vp8dec", "video/x-vp8" },
 
     /* SPICE_VIDEO_CODEC_TYPE_H264
      * h264 streams detection works fine and setting an incomplete cap
@@ -78,7 +78,7 @@ static struct {
     { "h264parse ! avdec_h264", "" },
 
     /* SPICE_VIDEO_CODEC_TYPE_VP9 */
-    { "vp9dec", "caps=video/x-vp9" },
+    { "vp9dec", "video/x-vp9" },
 };
 
 G_STATIC_ASSERT(G_N_ELEMENTS(gst_opts) <= SPICE_VIDEO_CODEC_TYPE_ENUM_END);
@@ -330,7 +330,7 @@ static gboolean create_pipeline(SpiceGstDecoder *decoder)
      *   needed by those that follow.
      */
     desc = g_strdup_printf("appsrc name=src is-live=true format=time max-bytes=0 block=true "
-                           "%s ! %s ! videoconvert ! appsink name=sink "
+                           "caps=%s ! %s ! videoconvert ! appsink name=sink "
                            "caps=video/x-raw,format=BGRx sync=false drop=false",
                            gst_opts[opt].dec_caps, gst_opts[opt].dec_name);
     SPICE_DEBUG("GStreamer pipeline: %s", desc);
-- 
2.12.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]