[Spice-devel] [PATCH spice-gtk v3 4/6] display-gst: move "caps=" from struct to pipeline

Christophe Fergeau cfergeau at redhat.com
Tue Jun 6 15:19:29 UTC 2017


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Tue, May 16, 2017 at 04:48:16PM +0200, Victor Toso wrote:
> From: Victor Toso <me at victortoso.com>
> 
> 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 at redhat.com>
> Signed-off-by: Victor Toso <me at victortoso.com>
> ---
>  src/channel-display-gst.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
> index 73c2d25..fa0ec90 100644
> --- a/src/channel-display-gst.c
> +++ b/src/channel-display-gst.c
> @@ -58,24 +58,24 @@ static struct {
>      { NULL, NULL },
>  
>      /* 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
>       * If setting video/x-h264, h264parse will complain if we don't have the
>       * stream-format or codec_data information. As stream-format is byte-stream
>       * (hardcodec in spice-server), let add it to avoid the warning.
>       */
> -    { "h264parse ! avdec_h264", "caps=video/x-h264,stream-format=byte-stream" },
> +    { "h264parse ! avdec_h264", "video/x-h264,stream-format=byte-stream" },
>  
>      /* 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);
> @@ -314,7 +314,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[decoder->base.codec_type].dec_caps,
>                             gst_opts[decoder->base.codec_type].dec_name);
> -- 
> 2.13.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170606/7df271de/attachment-0001.sig>


More information about the Spice-devel mailing list