GStreamer dynamic decodebin linking callback handler not resuming

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GStreamer dynamic decodebin linking callback handler not resuming

Brecht Verhoeve
Hi everyone,

Note beforehand: The code can be found here.

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.

Many thanks!

Brecht

--

Brecht Verhoeve

Master Student Computer Science Engineering
Ghent University



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: GStreamer dynamic decodebin linking callback handler not resuming

BGraaf

Hi Brecht,

 

Try to link the audio pad to fakesink.

 

Bernhard

 


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

 

Hi everyone,

 

Note beforehand: The code can be found here.

 

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.

 

Many thanks!

 

Brecht

 

--

 

Brecht Verhoeve

 

Master Student Computer Science Engineering

Ghent University

 

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: GStreamer dynamic decodebin linking callback handler not resuming

BVerhoeve
Hi BGraaf,

Thanks for your reply, this worked!

One more question though, how do I set and direct the debug messages from
GStreamer to python's stdout?

Thanks,

Brecht



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel