AW: GStreamer dynamic decodebin linking callback handler not resuming

Bernhard Graaf bernhard.graaf at gmx.de
Sat Apr 21 06:29:11 UTC 2018


Hi Brecht,

 

Try to link the audio pad to fakesink.

 

Bernhard

 

  _____  

Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org]
Im Auftrag von Brecht Verhoeve
Gesendet: Freitag, 20. April 2018 21:52
An: gstreamer-devel at lists.freedesktop.org
Cc: Brecht Verhoeve
Betreff: GStreamer dynamic decodebin linking callback handler not resuming

 

Hi everyone,

 

Note beforehand: The code can be found here
<https://gist.github.com/bjverhoe/01776b51b87e2045b4d54f1198e4a4e7> .

 

I'm using GStreamer to transmit data between Docker containers to use in
Machine Learning algorithms. I am using GStreamer 1.0 with the Python
bindings. My Python version is 3.6

 

I'm am trying to implement the following pipeline:

filesrc ! decodebin ! jpegenc ! rtpjpegpay ! udpsink

 

I've tried this pipeline and it works (also in the Docker container). Since
I need to dynamically set the host for the udpsink and the file location for
the filesrc I'm assembling the pipeline manually using Python.

 

The steps I've taken following the Dynamic Pipeline tutorial:

1. Initialize GStreamer

2. Create all the elements using Gst.ElementFactory.make()

3. Create  a pipeline and add all elements using Gst.Pipeline.new() and
pipeline.add()

4. Set properties of filesrc and udpsink

5. Link filesrc to decodebin, jpegenc to rtpjpegpay and rtpjpegpay to
udpsink.

6. Add a handler for the 'pad-added' signal for the decodebin

7. set the state of the pipeline to PLAYING

8. Try to link the elements when the handler is called.

 

The handler is called a first time when the decodebin creates a source pad
'src0' which has the capability 'audio/x-raw'. Since I'm interested in
video, I ignore this pad, and wait for the video pad. Unfortunately, the
handler is never called again and the pipeline stalls.

 

I don't know whether or not the handler is called again or not. I also don't
know if the pad actually get's created or not.

 

My questions are:

1. Why is my handler only called once? Is this because of the handler itself
or is it the pad which isn't created?

 

2. How do I get debug feed from GStreamer to Python's stdout stream? As for
now, I haven't found how to redirect it or change the level, which gives me
limited feedback on my attempts to get the stream to run.

 

I've posted the full gist here
<https://gist.github.com/bjverhoe/01776b51b87e2045b4d54f1198e4a4e7> .

 

Many thanks!

 

Brecht

 

-- 

 

Brecht Verhoeve

brecht.verhoeve at gmail.com

 

Master Student Computer Science Engineering

Ghent University

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180421/4d8b9966/attachment-0001.html>


More information about the gstreamer-devel mailing list