0

I've got my own custom element, lets call it MyElement. It has request sink pads, and sometimes source pads. When a source pad is created, MyElement emits a signal which can be intercepted by user. In callback registered with this signal, user can link new source pad with other pad.

The problem is, that MyElement works fine when I try to link its source pads to filesinks directly or via identity elements. However when instead I try to link source pads to the interleave element, pipeline fails.

Similar error happens when I connect MyElement's sources to identity elements with 'dump' property set to true.

What is my element/pipeline missing, that makes pipeline with interleave fail?

Buyuk
  • 1,094
  • 1
  • 8
  • 23

1 Answers1

0

identity and filesink have caps type of "any". Do your pads have caps?

 Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      ANY

Interleave has the following caps:

Pad Templates:
  SINK template: 'sink%d'
    Availability: On request
      Has request_new_pad() function: gst_interleave_request_new_pad
    Capabilities:
      audio/x-raw-int
                   rate: [ 1, 2147483647 ]
               channels: 1
             endianness: { 1234, 4321 }
                  width: { 8, 16, 24, 32 }
                  depth: [ 1, 32 ]
                 signed: true
      audio/x-raw-float
                   rate: [ 1, 2147483647 ]
               channels: 1
             endianness: { 1234, 4321 }
                  width: { 32, 64 }

  SRC template: 'src'
    Availability: Always
    Capabilities:
      audio/x-raw-int
                   rate: [ 1, 2147483647 ]
               channels: [ 1, 2147483647 ]
             endianness: { 1234, 4321 }
                  width: { 8, 16, 24, 32 }
                  depth: [ 1, 32 ]
                 signed: true
      audio/x-raw-float
                   rate: [ 1, 2147483647 ]
               channels: [ 1, 2147483647 ]
             endianness: { 1234, 4321 }
                  width: { 32, 64 }

You may want to read up on the debugging options for GStreamer if you haven't already. A lot can go wrong.

How do I view gstreamer debug output?

Community
  • 1
  • 1
mpr
  • 3,250
  • 26
  • 44
  • I know that caps must match, the problem is, I've set caps on src pads in my element to exactly the same caps, as Interleave's src caps are. I've managed to somehow make the pipeline work by placing multiqueue element between my element and interleave, however I still don't understand why this was necessary. – Buyuk Jan 21 '15 at 18:10
  • By the way, thanks for link about debugging Gstreamer, will definitely look into it, currently I'm only familiar with the basics of GST_DEBUG usage. – Buyuk Jan 21 '15 at 18:11
  • If you get the debug detail high enough you can usually see what caps failed to join at the pipeline. To start with I'd set GST_DEBUG=2,interleave:5 and go from there. – mpr Jan 21 '15 at 18:15