Define RTP port

Asked by BADEUIL on 2015-03-19

Hello,

I would like to define RTP ports. The function rohc_comp_add_rtp_port is exactly what I need but is obsolete.

The Doxygen Help file is suggesting me to use rohc_comp_set_rtp_detection_cb() function but I understand nothing about how to configure and use it.

Can you help me ?

I have a list of RTP port defined in a file and I would like to add these to the compressor.

Regards.

Question information

Language:
English Edit question
Status:
Answered
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
2015-03-19
Last reply:
2015-03-22

Hello,

Indeed, the rohc_comp_add_rtp_port() function is deprecated because the RTP detection callback can provide the same feature in a more generic way.

For the RTP detection callback, look at the examples/rtp_detection.c example. That program compresses one IPv4/UDP/RTP packet and detects RTP streams with one RTP callback function set with the rohc_comp_set_rtp_detection_cb() function.

The call to rohc_comp_set_rtp_detection_cb() is performed at line 277. The rtp_detect() function is defined at line 364. The rtp_detect() function extracts the UDP destination port and decides that the packet belongs to a RTP stream only if its destination port equals 10042.

This an example. It should help you using the RTP detection callback instead of the deprecated rohc_comp_add_rtp_port() function. Let me know if it helped you.

Regards,
Didier

Can you help with this problem?

Provide an answer of your own, or ask BADEUIL for more information if necessary.

To post a message you must log in.