Re: [spice-gtk v1 3/4] channel-display-gst: improve check for decoder element

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

 



On Tue, 18 Oct 2016, Victor Toso wrote:
[...]
> +    elements = g_strsplit(gst_opts[codec_type].dec_name, "!", 0);

This would not work if one of the elements takes options.
(not the case right now but if we can keep the option open)


> +    for (i = 0; elements[i] != NULL; i++) {
> +        GstElementFactory *factory;
>  
> -    return has_codec;
> +        factory = gst_element_factory_find(g_strstrip(elements[i]));
> +        if (factory == NULL) {
> +            SPICE_DEBUG("no element %s", elements[i]);
> +            g_strfreev(elements);
> +            return FALSE;
> +        }

This will likely not be an issue with software decoders but with 
hardware ones that approach will not guarantee that the decoder is 
usable.

In a different context I have found that I can fnid dfbvideosink and 
even instantiate it. But it will refuse to switch to the READY state and 
is thus unusable. That makes sense since I was not using it in a Direct 
FB context.

I expect hardware decoders will be even worse. For instance vaapidecode 
is likely to be present but may not work if you don't have an Intel 
card. Even if you can instantiate it, it may cause a VP8 pipeline caps 
negotiation to fail if your graphics does not support VP8.

Given that this code is not speed critical I don't think there's much 
point in making it more complex and likely less reliable.


-- 
Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
_______________________________________________
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]