[Spice-devel] [PATCH spice-gtk] gst: Fix detection of h264 stream decoder

Victor Toso lists at victortoso.com
Thu Jul 13 12:36:58 UTC 2017


On Thu, Jul 13, 2017 at 01:31:34PM +0200, Pavel Grunt wrote:
> On Thu, 2017-07-13 at 13:22 +0200, Victor Toso wrote:
> > Hi,
> > 
> > On Thu, Jul 13, 2017 at 01:18:14PM +0200, Pavel Grunt wrote:
> > > On Thu, 2017-07-13 at 13:11 +0200, Victor Toso wrote:
> > > > On Thu, Jul 13, 2017 at 01:05:31PM +0200, Pavel Grunt wrote:
> > > > > GStreamer's avdec_h264 needs h264parse to be able to process H264 video
> > > > > streams. However the check for elements through GstRegistry forgot to
> > > > > include the parsers, thus making spice-gtk to not set the relevant cap
> > > > > to inform the server about H264 decoding capability.
> > > > 
> > > > Wouldn't that make it possible to find a parser but not a decoder and
> > > > evaluate the _has_codec() to true?
> > > 
> > > yes, it would
> > > 
> > > so it must be a check for parsers and then searching for decoders accepting
> > > the
> > > parser(s)'s output
> > 
> > Not really, avdec_h264 should show when we list the decoders.
> 
> it should not, the caps we set are not a subset of avdec_h264 caps.

A bit confusing but you were right!
https://paste.fedoraproject.org/paste/hx0F3Tbx5W1fDGRelvJCUw

Cheers,

> Documentation of GstCaps may not be clear, but take a look at tests. Basically
> "video/x-raw" is the superset for "video/x-raw, format=(string)YUY2".
> 
> Pavel



> 
> 
> > 
> > > 
> > > Pavel
> > > > > ---
> > > > >  src/channel-display-gst.c | 1 +
> > > > >  1 file changed, 1 insertion(+)
> > > > > 
> > > > > diff --git a/src/channel-display-gst.c b/src/channel-display-gst.c
> > > > > index 54edd6b..d883d9f 100644
> > > > > --- a/src/channel-display-gst.c
> > > > > +++ b/src/channel-display-gst.c
> > > > > @@ -652,6 +652,7 @@ gboolean gstvideo_has_codec(int codec_type)
> > > > >      g_return_val_if_fail(VALID_VIDEO_CODEC_TYPE(codec_type), FALSE);
> > > > >  
> > > > >      type = GST_ELEMENT_FACTORY_TYPE_DECODER |
> > > > > +           GST_ELEMENT_FACTORY_TYPE_PARSER |
> > > > >             GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO |
> > > > >             GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE;
> > > > >      all_decoders = gst_element_factory_list_get_elements(type,
> > > > > GST_RANK_NONE);
> > > > > -- 
> > > > > 2.13.0
> > > > > 
> > > > > _______________________________________________
> > > > > Spice-devel mailing list
> > > > > Spice-devel at lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> > > 
> > > _______________________________________________
> > > Spice-devel mailing list
> > > Spice-devel at lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> _______________________________________________
> 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: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170713/5fd5ac27/attachment.sig>


More information about the Spice-devel mailing list