rohc team mailing list archive
-
rohc team
-
Mailing list archive
-
Message #01529
Re: [Question #246200]: c_get_profile_from_id
Question #246200 on rohc changed:
https://answers.launchpad.net/rohc/+question/246200
Status: Open => Answered
Didier Barvaux proposed the following answer:
Hello,
You don't need to modify the source code of the library to detect RTP
streams. You have two ways to do it:
1/ static list of UDP ports
You give the ROHC compressor a list of UDP ports that are dedicated to
RTP streams. See the API documentation:
http://rohc-lib.org/support/documentation/API/rohc-
doc-1.6.1/group__rohc__comp.html#ga60547b56cea992e4967a99391fcd6489
http://rohc-lib.org/support/documentation/API/rohc-
doc-1.6.1/group__rohc__comp.html#gae4007c48b1aaed847df86bf42f0b0e96
http://rohc-lib.org/support/documentation/API/rohc-
doc-1.6.1/group__rohc__comp.html#ga4c2adababf10a9c65c9f8ec892217971
And an example:
http://bazaar.launchpad.net/~didier-
barvaux/rohc/1.6.x/view/head:/test/functional/rtp_detection/test_rtp_ports.c
2/ callback function
Use the rohc_comp_set_rtp_detection_cb() function to give the ROHC
compressor a function that it will call for every UDP packet. You have
to write your own function. The function receives the IP headers, UDP
header, and UDP payload as argument. The function returns true if packet
is part if a RTP stream, false if it doesn't.
See http://rohc-lib.org/support/documentation/API/rohc-
doc-1.6.1/group__rohc__comp.html#gae46d8370a4dbdb9153da8e89899b5596 for
the API documentation.
See the example here http://bazaar.launchpad.net/~didier-
barvaux/rohc/1.6.x/view/head:/test/functional/rtp_detection/test_rtp_callback.c
Regards,
Didier
--
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.