How to use playbin with udpsrc element?

Denis Shienkov denis.shienkov at gmail.com
Fri Dec 29 11:26:48 UTC 2017


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_bin_add_many(GST_BIN(m_pipeline),
                       udpsrc,
                       depay,
                       decodebin,
                       videoconvert,
                       videofilter,
                       m_videosink,
                       nullptr);
    ...
    ::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?

BR,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20171229/4ac8c751/attachment-0001.html>


More information about the gstreamer-devel mailing list