[gst-devel] RTP issues

Andre Magalhaes andrunko at gmail.com
Sat Feb 11 19:33:04 CET 2006


Hi all,

I wrote a code that automatically finds the rtp pipelines based on the
payloaders/depayloaders. I used the definitions found in
gst-plugins-good/gst/rtp/README in order to find the
payloaders/depayloaders.

Eg.:
      alawenc -> rtpg711pay -> rtpg711depay -> alawdec
      mulawenc -> rtpg711pay -> rtpg711depay -> mulawdec
      gsmenc -> rtpgsmpay -> rtpgsmdepay -> gsmdec

Now the problem. Some payloaders/depayloaders may have more than one
input/output caps. For eg. rtpg711pay/depay can encode/decode
PCMU/PCMA. I have no problem finding the correct pipelines for the 2
cases, (mulaw/alaw) but my problem is that i don't know what caps will
be used by each pipeline and this way i can't build a sdp description
of the pipeline.
After finding the pipelines i need to generate the local_capabilities
(sdp) indicating what media are supported by my app. To do this i use
the src caps of the payloader . But what if the payloader has more
than one src caps, that is the case of g711pay/depay.
How can i know that a sink caps is related to a src caps?

Here is the caps of rtpg711pay so you can see more easily what i mean:
Pad Templates:
  SINK template: 'sink'
    Availability: Always
    Capabilities:
      audio/x-mulaw
               channels: 1
                   rate: 8000
      audio/x-alaw
               channels: 1
                   rate: 8000

  SRC template: 'src'
    Availability: Always
    Capabilities:
      application/x-rtp
                  media: audio
                payload: 0
             clock-rate: 8000
          encoding-name: PCMU
      application/x-rtp
                  media: audio
                payload: 8
             clock-rate: 8000
          encoding-name: PCMA

I can' t see a way to know that a input of audio/x-mulaw is related to
PCMU and a input of audio/x-alaw is related to PCMA. Maybe in the case
of multiples caps on the payloader, the same would defines a new field
on the src or sink pad to indicate which one is related to the other.
This is not the best solution for sure, but it should work.

The desired sdp would be:
        o=- 123456 654321 IN IP4 127.0.0.1
        c=IN IP4 127.0.0.1
        m=audio 7078 RTP/AVP 0 8
        a=rtpmap:0 PCMU/8000
        a=rtpmap:8 PCMA/8000

Any idea is appreciate.
BR
Andrunko




More information about the gstreamer-devel mailing list