How to use playbin with udpsrc element?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to use playbin with udpsrc element?

Denis Shienkov
Hi all.

Currently, I receive an external video x264 stream, using the following pipeline:

    const auto udpsrc = ::gst_element_factory_make("udpsrc", nullptr);
    const auto depay = ::gst_element_factory_make("rtph264depay", nullptr);
    const auto decodebin = ::gst_element_factory_make("decodebin", nullptr);
    const auto videoconvert = ::gst_element_factory_make("videoconvert", nullptr);
    const auto videofilter = ::gst_element_factory_make("capsfilter", nullptr);
    m_videosink = m_renderer->videoSink(); // my own video sink
    m_pipeline = ::gst_pipeline_new("pipeline");
    ::gst_element_link_many(udpsrc, depay, decodebin, nullptr);
    ::gst_element_link_many(videoconvert, videofilter, m_videosink, nullptr);
    const auto status = ::gst_element_set_state(m_pipeline, GST_STATE_PLAYING);

but a problem is that this code is too big.

I have read (as I understand), that we need to use the 'bin' elements, which
automatically loads the appropriate HW codecs, in my case it is the 'decodebin'.

So, my questions is:

* Is it possible to use the 'playbin' with 'udpsrc' element, instead set of a lot of
''rtph264depay", "decodebin", "videoconvert"  and so on? If YES - then point me
please on the some examples and tutorials..

* How I can know programmatically, what of decoders where loaded by the 'bin'
element? Is there are any callbacks? Is it possible to control a process of loading?


gstreamer-devel mailing list
[hidden email]