Using gst-discoverer inside scripts

Hi, currently I’m building an application that will need to handle different types of streams, some of them with H264 and some other with MJPEG, thus I’m trying to build C++ code that generates the adecuate pipeline according to each stream.

My idea is to get the type of stream sent using the gst-discoverer, does anyone know if this feature can be used inside a C++ code ?

So far I’ve only managed to do it through the command line.

gst-discoverer is also just written in C and not magic :slight_smile: When checking its code, what problems do you get stuck with?

1 Like

When I try to use the GstDiscoverer class or the GstDiscovererInfo class it gives me unresolved external symbol errors.

I’m doing this:

GstDiscoverer* discoverer;
gst_discoverer_start(discoverer);
gst_discoverer_discover_uri(discoverer, source_video.c_str(), &error);

It returns me the following error:
image

You need to link to gstreamer-pbutils