Check Plugin availability runtime

Walter Lucetti myzhar at gmail.com
Sun Feb 5 13:41:52 UTC 2017


Thank you very much guys.

I'm writing a streamer that can work both on desktop and embedded systems
and I would like to use HW encoder/decoder when available.

-- 
Walter Lucetti

email: myzhar at gmail.com
web: www.robot-home.it - www.opencv.it
project:  http://myzharbot.robot-home.it

Il 05 Feb 2017 11:30, "Tim Müller" <tim at centricular.com> ha scritto:

> On Sat, 2017-02-04 at 10:39 +0100, Walter Lucetti wrote:
>
> how can I check runtime if a plugin is available in my C++ code?
>
> To be more precise I would like to check if I can use omxh264enc to encode
> H264, if not I use xh264enc...
>
>
> if (!gst_registry_check_feature_version (gst_registry_get(),
> "omxh264", GST_VERSION_MAJOR, 0, 0)) {
> ...
> }
>
> Alternatively, you could also find H.264 encoders programmatically without
> knowing the names, something with:
>
> encs = gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER,
> GST_RANK_MARGINAL);
> h264_encoders = gst_element_factory_list_filter (encs, h264_caps,
> GST_PAD_SRC, FALSE);
>
> ...
>
> Cheers
> -Tim
>
> --
>
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170205/759423ec/attachment.html>


More information about the gstreamer-devel mailing list