Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

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

Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

HM
Hi!

I'm having problems to port a Python gstreamer 0.10 program to the 1.0 version. The program connects with a device (eye-tracking system) and tries to reproduce the video sent by the scene camera. The live video from the scene camera (full HD, 1920x1080, 25 fps), is encoded into the h.264 compression format with key-frames every 16 frames at ~5mbit and the audio is encoded into the mp3 compressions format. It is transmitted via UDP as mpeg-ts packets (188 bytes each).

The code for the 0.10 version, which works well is (I'm only posting the function where the gstreamer pipeline is created, please ask if more information is needed):

PIPELINE_DEF = "udpsrc do-timestamp=true name=src closefd=false !" \
"mpegtsdemux !" \
"queue !" \
"ffdec_h264 max-threads=0 !" \
"ffmpegcolorspace !" \
"xvimagesink name=video"
# Create gstreamer pipeline to stream video
pipeline = gst.parse_launch(PIPELINE_DEF)

# Source element: video socket. Sockfd file for UDP reception. socket.fileno() returns socket descriptor
src = pipeline.get_by_name("src")
src.set_property("sockfd", videoLive.fileno())

pipeline.set_state(gst.STATE_PLAYING)

For the 1.0 I'm building the pipeline using add and link instead of parse_launch. My code is:

# Setting gstreamer pipeline
self.pipeline = Gst.Pipeline()

self.udpsrc = Gst.ElementFactory.make('udpsrc', 'src')
self.pipeline.add(self.udpsrc)
self.udpsrc.set_property('socket', Gio.Socket().new_from_fd(self.videosocket.fileno()))

self.tsparse = Gst.ElementFactory.make('tsparse', None)
self.pipeline.add(self.tsparse)

self.demux = Gst.ElementFactory.make('tsdemux', None)
self.pipeline.add(self.demux)

self.queue = Gst.ElementFactory.make('queue', None)
self.pipeline.add(self.queue)

self.h264 = Gst.ElementFactory.make('avdec_h264', None)
self.pipeline.add(self.h264)

self.videoconvert = Gst.ElementFactory.make('videoconvert', None)
self.pipeline.add(self.videoconvert)

self.imagesink = Gst.ElementFactory.make('xvimagesink', None)
self.pipeline.add(self.imagesink)

self.udpsrc.link(self.tsparse)
self.tsparse.link(self.demux)
self.demux.link(self.queue)
self.queue.link(self.h264)
self.h264.link(self.videoconvert)
self.videoconvert.link(self.imagesink)

self.bus = self.pipeline.get_bus()
self.bus.add_signal_watch()
self.bus.connect('message::eos', self.on_eos)
self.bus.connect('message::error', self.on_error)

self.pipeline.set_state(Gst.State.PLAYING)

Nothing is shown when I execute it. I've set the debug to threshold 4, and the output has some warnings before error is thrown:

0:00:01.937727762 9549 0x3047ca0 INFO GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:01.937776032 9549 0x3047ca0 INFO basesrc gstbasesrc.c:2772:gst_base_src_loop:<src> marking pending DISCONT
0:00:02.097347324 9549 0x3047ca0 INFO mpegtspacketizer mpegtspacketizer.c:770:mpegts_try_discover_packet_size: have packetsize detected: 188 bytes
0:00:02.097410369 9549 0x3047ca0 INFO mpegtsbase mpegtsbase.c:726:mpegts_base_apply_pat:<mpegtsparse2-0> PAT
0:00:02.098061088 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad mpegtsparse2-0:sink
0:00:02.098093377 9549 0x3047ca0 INFO GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event video/mpegts, systemstream=(boolean)true, packetsize=(int)188
0:00:02.098133309 9549 0x3047ca0 INFO GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:02.098167255 9549 0x3047ca0 INFO mpegtspacketizer mpegtspacketizer.c:770:mpegts_try_discover_packet_size: have packetsize detected: 188 bytes
0:00:02.098192084 9549 0x3047ca0 INFO mpegtsbase mpegtsbase.c:726:mpegts_base_apply_pat:<tsdemux0> PAT
0:00:02.098325493 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:02.098340146 9549 0x3047ca0 INFO GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event audio/mpeg, mpegversion=(int)1
0:00:02.098364200 9549 0x3047ca0 WARN default descriptions.c:612:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1
0:00:02.098403181 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:02.098413243 9549 0x3047ca0 INFO GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
0:00:02.098489834 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'audio_0041'
0:00:02.098501372 9549 0x3047ca0 INFO GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:02.110068408 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'video_0040'
0:00:02.110145009 9549 0x3047ca0 INFO basesrc gstbasesrc.c:2785:gst_base_src_loop:<src> pausing after gst_pad_push() = not-linked
0:00:02.110162087 9549 0x3047ca0 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: Internal data flow error.
0:00:02.110166484 9549 0x3047ca0 WARN basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: streaming task paused, reason not-linked (-1)
0:00:02.110180920 9549 0x3047ca0 INFO GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<src> posting message: Internal data flow error.
0:00:02.110201183 9549 0x3047ca0 INFO GST_ERROR_SYSTEM gstelement.c:1858:gst_element_message_full:<src> posted error message: Internal data flow error.
0:00:02.110291520 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'audio_0041'
0:00:02.110323251 9549 0x3047ca0 INFO GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'video_0040'
0:00:02.110350647 9549 0x3047ca0 INFO task gsttask.c:300:gst_task_func:<src:src> Task going to paused
('on_error():', (GError('Internal data flow error.',), 'gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:src:\nstreaming task paused, reason not-linked (-1)'))

I guess the warning "Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1" has to do with the Internal data flow error, but I don't know how to solve it.

Any help would be appreciate. Thanks in advance.

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

RE: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

shishir

You are missing pad link  for qtdemux and queue.

 

Listen to signal “pad-added” for qtdemux and on call callback link the pad with queue sink pad.

 

 

 

From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Higinio Martí Ribés
Sent: Wednesday, June 15, 2016 4:49 AM
To: [hidden email]
Subject: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

 

Hi!

I'm having problems to port a Python gstreamer 0.10 program to the 1.0 version. The program connects with a device (eye-tracking system) and tries to reproduce the video sent by the scene camera. The live video from the scene camera (full HD, 1920x1080, 25 fps), is encoded into the h.264 compression format with key-frames every 16 frames at ~5mbit and the audio is encoded into the mp3 compressions format. It is transmitted via UDP as mpeg-ts packets (188 bytes each).

The code for the 0.10 version, which works well is (I'm only posting the function where the gstreamer pipeline is created, please ask if more information is needed):

PIPELINE_DEF = "udpsrc do-timestamp=true name=src closefd=false !" \
              
"mpegtsdemux !" \
              
"queue !" \
              
"ffdec_h264 max-threads=0 !" \
              
"ffmpegcolorspace !" \
              
"xvimagesink name=video"
# Create gstreamer pipeline to stream video
pipeline = gst.parse_launch(PIPELINE_DEF)

# Source element: video socket. Sockfd file for UDP reception. socket.fileno() returns socket descriptor
src = pipeline.get_by_name("src")
src.set_property(
"sockfd", videoLive.fileno())

pipeline.set_state(gst.STATE_PLAYING)
For the 1.0 I'm building the pipeline using add and link instead of parse_launch. My code is:

# Setting gstreamer pipeline
self.pipeline = Gst.Pipeline()

self.udpsrc = Gst.ElementFactory.make('udpsrc', 'src')
self.pipeline.add(self.udpsrc)
self.udpsrc.set_property('socket', Gio.Socket().new_from_fd(self.videosocket.fileno()))

self.tsparse = Gst.ElementFactory.make('tsparse', None)
self.pipeline.add(self.tsparse)

self.demux = Gst.ElementFactory.make('tsdemux', None)
self.pipeline.add(self.demux)

self.queue = Gst.ElementFactory.make('queue', None)
self.pipeline.add(self.queue)

self.h264 = Gst.ElementFactory.make('avdec_h264', None)
self.pipeline.add(self.h264)

self.videoconvert = Gst.ElementFactory.make('videoconvert', None)
self.pipeline.add(self.videoconvert)

self.imagesink = Gst.ElementFactory.make('xvimagesink', None)
self.pipeline.add(self.imagesink)

self.udpsrc.link(self.tsparse)
self.tsparse.link(self.demux)
self.demux.link(self.queue)
self.queue.link(self.h264)
self.h264.link(self.videoconvert)
self.videoconvert.link(self.imagesink)

self.bus = self.pipeline.get_bus()
self.bus.add_signal_watch()
self.bus.connect('message::eos', self.on_eos)
self.bus.connect('message::error', self.on_error)

self.pipeline.set_state(Gst.State.PLAYING)
Nothing is shown when I execute it. I've set the debug to threshold 4, and the output has some warnings before error is thrown:

0:00:01.937727762  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:01.937776032  9549      0x3047ca0 INFO                 basesrc gstbasesrc.c:2772:gst_base_src_loop:<src> marking pending DISCONT
0:00:02.097347324  9549      0x3047ca0 INFO        mpegtspacketizer mpegtspacketizer.c:770:mpegts_try_discover_packet_size: have packetsize detected: 188 bytes
0:00:02.097410369  9549      0x3047ca0 INFO              mpegtsbase mpegtsbase.c:726:mpegts_base_apply_pat:<mpegtsparse2-0> PAT
0:00:02.098061088  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad mpegtsparse2-0:sink
0:00:02.098093377  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event video/mpegts, systemstream=(boolean)true, packetsize=(int)188
0:00:02.098133309  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:02.098167255  9549      0x3047ca0 INFO        mpegtspacketizer mpegtspacketizer.c:770:mpegts_try_discover_packet_size: have packetsize detected: 188 bytes
0:00:02.098192084  9549      0x3047ca0 INFO              mpegtsbase mpegtsbase.c:726:mpegts_base_apply_pat:<tsdemux0> PAT
0:00:02.098325493  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:02.098340146  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event audio/mpeg, mpegversion=(int)1
0:00:02.098364200  9549      0x3047ca0 WARN                 default descriptions.c:612:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1
0:00:02.098403181  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:02.098413243  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
0:00:02.098489834  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'audio_0041'
0:00:02.098501372  9549      0x3047ca0 INFO               GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:02.110068408  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'video_0040'
0:00:02.110145009  9549      0x3047ca0 INFO                 basesrc gstbasesrc.c:2785:gst_base_src_loop:<src> pausing after gst_pad_push() = not-linked
0:00:02.110162087  9549      0x3047ca0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: Internal data flow error.
0:00:02.110166484  9549      0x3047ca0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: streaming task paused, reason not-linked (-1)
0:00:02.110180920  9549      0x3047ca0 INFO        GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<src> posting message: Internal data flow error.
0:00:02.110201183  9549      0x3047ca0 INFO        GST_ERROR_SYSTEM gstelement.c:1858:gst_element_message_full:<src> posted error message: Internal data flow error.
0:00:02.110291520  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'audio_0041'
0:00:02.110323251  9549      0x3047ca0 INFO        GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'video_0040'
0:00:02.110350647  9549      0x3047ca0 INFO                    task gsttask.c:300:gst_task_func:<src:src> Task going to paused
('on_error():', (GError('Internal data flow error.',), 'gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:src:\nstreaming task paused, reason not-linked (-1)'))
I guess the warning "Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1" has to do with the Internal data flow error, but I don't know how to solve it.
Any help would be appreciate. Thanks in advance.

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

RE: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

HM
Thanks, Shishir. I add the listener to the "pad-added" signal for qtdemux and try to link the pad with queue:

 def pad_added_handler(self, src, new_pad):
        print("Received new pad {0} from {1}".format(new_pad, src))

        if new_pad.is_linked():
            print ("We are already linked. Ignoring")
            return

        new_pad_type = new_pad.query_caps(None).to_string()
        print ("New pad added of type: {0}".format(new_pad_type))

        ret = new_pad.link(self.queue.get_static_pad("sink"))
        return

But now I'm having "Incompatible pads" with tsdemux and queue:

0:00:01.809406744  9876      0x2b378f0 WARN                 default descriptions.c:612:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1
0:00:01.809443654  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:01.809525077  9876      0x2b378f0 INFO               GST_EVENT gstevent.c:628:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
0:00:01.809591660  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'audio_0041'
Received new pad <Pad object at 0x7fc2591ebaf0 (GstPad at 0x29aba70)> from <__main__.GstTSDemux object at 0x7fc263a36370 (GstTSDemux at 0x29d0100)>
New pad added of type: audio/mpeg, mpegversion=(int)1
0:00:01.810264717  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad queue0:sink
0:00:01.810389462  9876      0x2b378f0 INFO                GST_PADS gstpad.c:2120:gst_pad_link_prepare: trying to link tsdemux0:audio_0041 and queue0:sink
0:00:01.810412086  9876      0x2b378f0 INFO                GST_PADS gstpad.c:2176:gst_pad_link_prepare: caps are incompatible
0:00:01.810429086  9876      0x2b378f0 INFO               GST_EVENT gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration 99:99:99.999999999
0:00:01.812892209  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'video_0040'
Received new pad <Pad object at 0x7fc2591ebaf0 (GstPad at 0x29abca0)> from <__main__.GstTSDemux object at 0x7fc263a36370 (GstTSDemux at 0x29d0100)>
New pad added of type: video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
0:00:01.813000182  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:897:gst_element_get_static_pad: found pad queue0:sink
0:00:01.813021020  9876      0x2b378f0 INFO                GST_PADS gstpad.c:2120:gst_pad_link_prepare: trying to link tsdemux0:video_0040 and queue0:sink
0:00:01.813047798  9876      0x2b378f0 INFO                GST_PADS gstpad.c:2176:gst_pad_link_prepare: caps are incompatible
0:00:01.813118214  9876      0x2b378f0 INFO                 basesrc gstbasesrc.c:2785:gst_base_src_loop:<src> pausing after gst_pad_push() = not-linked
0:00:01.813134546  9876      0x2b378f0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: Internal data flow error.
0:00:01.813139330  9876      0x2b378f0 WARN                 basesrc gstbasesrc.c:2865:gst_base_src_loop:<src> error: streaming task paused, reason not-linked (-1)
0:00:01.813154141  9876      0x2b378f0 INFO        GST_ERROR_SYSTEM gstelement.c:1835:gst_element_message_full:<src> posting message: Internal data flow error.
0:00:01.813175931  9876      0x2b378f0 INFO        GST_ERROR_SYSTEM gstelement.c:1858:gst_element_message_full:<src> posted error message: Internal data flow error.
0:00:01.813260218  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'audio_0041'
0:00:01.813287556  9876      0x2b378f0 INFO        GST_ELEMENT_PADS gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'video_0040'
('on_error():', (GError('Internal data flow error.',), 'gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:src:\nstreaming task paused, reason not-linked (-1)'))
0:00:01.813342610  9876      0x2b378f0 INFO                    task gsttask.c:300:gst_task_func:<src:src> Task going to paused
Reply | Threaded
Open this post in threaded view
|

RE: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

AlexZhou
I think that following lines had errors:

self.udpsrc = Gst.ElementFactory.make('udpsrc', 'src')
self.pipeline.add(self.udpsrc)
self.udpsrc.set_property("socket",Gio.Socket().new_from_fd(self.videosocket.fileno()))
They should be:

self.udpsrc = Gst.ElementFactory.make('udpsrc', 'src')
self.udpsrc.set_property("socket",Gio.Socket().new_from_fd(self.videosocket.fileno()))
self.pipeline.add(self.udpsrc)
Reply | Threaded
Open this post in threaded view
|

RE: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

shishir
In reply to this post by HM
You  might be linking wrong pads. Check for pad type (audio/video) and link accordingly

Something like this:

    def on_pad_added(self, element, pad):
        """Callback to link a/v sink to decoder source."""
        string = pad.query_caps(None).to_string()

        if string.startswith('video/'):
           print "linking videoqueue with decoder"
           pad.link(self.video_queue.get_static_pad("sink"))

        elif string.startswith('audio/'):
            print "linking audioqueue with decoder"
            pad.link(self.audio_queue.get_static_pad("sink"))


-----Original Message-----
From: gstreamer-devel [mailto:[hidden email]] On Behalf Of HM
Sent: Wednesday, June 22, 2016 3:44 AM
To: [hidden email]
Subject: RE: Python Gstreamer: Internal data flow error porting program from 0.10 to 1.0

Thanks, Shishir. I add the listener to the "pad-added" signal for qtdemux and try to link the pad with queue:

 def pad_added_handler(self, src, new_pad):
        print("Received new pad {0} from {1}".format(new_pad, src))

        if new_pad.is_linked():
            print ("We are already linked. Ignoring")
            return

        new_pad_type = new_pad.query_caps(None).to_string()
        print ("New pad added of type: {0}".format(new_pad_type))

        ret = new_pad.link(self.queue.get_static_pad("sink"))
        return

But now I'm having "Incompatible pads" with tsdemux and queue:

0:00:01.809406744  9876      0x2b378f0 WARN                 default
descriptions.c:612:format_info_get_desc: Unexpected MPEG-1 layer in audio/mpeg, mpegversion=(int)1
0:00:01.809443654  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:897:gst_element_get_static_pad: found pad tsdemux0:sink
0:00:01.809525077  9876      0x2b378f0 INFO               GST_EVENT
gstevent.c:628:gst_event_new_caps: creating caps event video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal
0:00:01.809591660  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'audio_0041'
Received new pad <Pad object at 0x7fc2591ebaf0 (GstPad at 0x29aba70)> from <__main__.GstTSDemux object at 0x7fc263a36370 (GstTSDemux at 0x29d0100)> New pad added of type: audio/mpeg, mpegversion=(int)1
0:00:01.810264717  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:897:gst_element_get_static_pad: found pad queue0:sink
0:00:01.810389462  9876      0x2b378f0 INFO                GST_PADS
gstpad.c:2120:gst_pad_link_prepare: trying to link tsdemux0:audio_0041 and queue0:sink
0:00:01.810412086  9876      0x2b378f0 INFO                GST_PADS
gstpad.c:2176:gst_pad_link_prepare: caps are incompatible
0:00:01.810429086  9876      0x2b378f0 INFO               GST_EVENT
gstevent.c:709:gst_event_new_segment: creating segment event time segment start=0:00:00.000000000, stop=99:99:99.999999999, rate=1,000000, applied_rate=1,000000, flags=0x00, time=0:00:00.000000000, base=0:00:00.000000000, position 0:00:00.000000000, duration
99:99:99.999999999
0:00:01.812892209  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:646:gst_element_add_pad:<tsdemux0> adding pad 'video_0040'
Received new pad <Pad object at 0x7fc2591ebaf0 (GstPad at 0x29abca0)> from <__main__.GstTSDemux object at 0x7fc263a36370 (GstTSDemux at 0x29d0100)> New pad added of type: video/x-h264, stream-format=(string)byte-stream,
alignment=(string)nal
0:00:01.813000182  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:897:gst_element_get_static_pad: found pad queue0:sink
0:00:01.813021020  9876      0x2b378f0 INFO                GST_PADS
gstpad.c:2120:gst_pad_link_prepare: trying to link tsdemux0:video_0040 and queue0:sink
0:00:01.813047798  9876      0x2b378f0 INFO                GST_PADS
gstpad.c:2176:gst_pad_link_prepare: caps are incompatible
0:00:01.813118214  9876      0x2b378f0 INFO                 basesrc
gstbasesrc.c:2785:gst_base_src_loop:<src> pausing after gst_pad_push() = not-linked
0:00:01.813134546  9876      0x2b378f0 WARN                 basesrc
gstbasesrc.c:2865:gst_base_src_loop:<src> error: Internal data flow error.
0:00:01.813139330  9876      0x2b378f0 WARN                 basesrc
gstbasesrc.c:2865:gst_base_src_loop:<src> error: streaming task paused, reason not-linked (-1)
0:00:01.813154141  9876      0x2b378f0 INFO        GST_ERROR_SYSTEM
gstelement.c:1835:gst_element_message_full:<src> posting message: Internal data flow error.
0:00:01.813175931  9876      0x2b378f0 INFO        GST_ERROR_SYSTEM
gstelement.c:1858:gst_element_message_full:<src> posted error message:
Internal data flow error.
0:00:01.813260218  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'audio_0041'
0:00:01.813287556  9876      0x2b378f0 INFO        GST_ELEMENT_PADS
gstelement.c:766:gst_element_remove_pad:<tsdemux0> removing pad 'video_0040'
('on_error():', (GError('Internal data flow error.',), 'gstbasesrc.c(2865):
gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:src:\nstreaming task paused, reason not-linked (-1)'))
0:00:01.813342610  9876      0x2b378f0 INFO                    task
gsttask.c:300:gst_task_func:<src:src> Task going to paused




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Python-Gstreamer-Internal-data-flow-error-porting-program-from-0-10-to-1-0-tp4678062p4678203.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel