Define RTP port

Asked by BADEUIL on 2015-03-19


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.


Question information

English Edit question
rohc Edit question
No assignee Edit question
Last query:
Last reply:


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.


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.