| ROHC compression/decompression library
   
    | 
ROHC compression context for the RTP profile. More...
#include "c_generic.h"#include "ts_sc_comp.h"#include "protocols/udp.h"#include "protocols/rtp.h"

Go to the source code of this file.
| Data Structures | |
| struct | rtp_tmp_vars | 
| Define the RTP and UDP specific temporary variables in the profile compression context.  More... | |
| struct | sc_rtp_context | 
| Define the RTP part of the profile decompression context.  More... | |
| Functions | |
| int | c_rtp_create (struct c_context *const context, const struct ip_packet *ip) | 
| Create a new RTP context and initialize it thanks to the given IP/UDP/RTP packet. | |
| void | c_rtp_destroy (struct c_context *const context) | 
| Destroy the RTP context. | |
| int | c_rtp_check_context (const struct c_context *context, const struct ip_packet *ip) | 
| Check if the IP/UDP/RTP packet belongs to the context. | |
| int | c_rtp_encode (struct c_context *const context, const struct ip_packet *ip, const int packet_size, unsigned char *const dest, const int dest_size, rohc_packet_t *const packet_type, int *const payload_offset) | 
| Encode an IP/UDP/RTP packet according to a pattern decided by several different factors. | |
| void | rtp_decide_state (struct c_context *const context) | 
| Decide the state that should be used for the next packet compressed with the ROHC RTP profile. | |
| int | rtp_code_uo_remainder (struct c_context *context, const unsigned char *next_header, unsigned char *dest, int counter) | 
ROHC compression context for the RTP profile.
| int c_rtp_check_context | ( | const struct c_context * | context, | 
| const struct ip_packet * | ip | ||
| ) | 
Check if the IP/UDP/RTP packet belongs to the context.
Conditions are:
All the context but the last one are done by the c_udp_check_context() function.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The compression context | 
| ip | The IP/UDP/RTP packet to check | 
References c_udp_check_context(), ip_get_inner_packet(), ip_get_next_layer(), ip_get_protocol(), sc_rtp_context::old_rtp, rohc_debugf, ROHC_IPPROTO_IPIP, ROHC_IPPROTO_IPV6, c_context::specific, c_generic_context::specific, and rtphdr::ssrc.
| int c_rtp_create | ( | struct c_context *const | context, | 
| const struct ip_packet * | ip | ||
| ) | 
Create a new RTP context and initialize it thanks to the given IP/UDP/RTP packet.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The compression context | 
| ip | The IP/UDP/RTP packet given to initialize the new context | 
References c_create_sc(), c_generic_create(), c_generic_destroy(), c_generic_context::code_dynamic_part, c_generic_context::code_ir_remainder, c_generic_context::code_static_part, c_generic_context::code_UO_packet_head, c_generic_context::code_uo_remainder, c_context::compressor, c_generic_context::compute_crc_dynamic, c_generic_context::compute_crc_static, c_generic_context::decide_extension, c_generic_context::decide_FO_packet, c_generic_context::decide_SO_packet, c_generic_context::decide_state, c_generic_context::encode_uncomp_fields, c_generic_context::get_next_sn, c_generic_context::init_at_IR, ip_get_inner_packet(), ip_get_next_layer(), ip_get_protocol(), rtp_tmp_vars::m_set, c_generic_context::next_header_len, c_generic_context::next_header_proto, rtp_tmp_vars::nr_ts_bits, sc_rtp_context::old_rtp, sc_rtp_context::old_udp, rohc_debugf, ROHC_IPPROTO_IPIP, ROHC_IPPROTO_IPV6, ROHC_IPPROTO_UDP, ROHC_LSB_SHIFT_RTP_SN, rtp_code_dynamic_rtp_part(), rtp_code_static_rtp_part(), rtp_compute_crc_dynamic(), rtp_compute_crc_static(), rtp_decide_state(), sc_rtp_context::rtp_pt_change_count, rtp_tmp_vars::rtp_pt_changed, rtp_tmp_vars::send_rtp_dynamic, rtphdr::sn, c_generic_context::sn, c_context::specific, c_generic_context::specific, rtp_tmp_vars::timestamp, sc_rtp_context::tmp, sc_rtp_context::ts_sc, rtp_tmp_vars::ts_send, sc_rtp_context::udp_checksum_change_count, udp_code_uo_remainder(), and rohc_comp::wlsb_window_width.
| void c_rtp_destroy | ( | struct c_context *const | context | ) | 
Destroy the RTP context.
This function is one of the functions that must exist in one profile for the framework to work.
| context | The RTP compression context to destroy | 
References c_destroy_sc(), c_generic_destroy(), c_context::specific, c_generic_context::specific, and sc_rtp_context::ts_sc.
| int c_rtp_encode | ( | struct c_context *const | context, | 
| const struct ip_packet * | ip, | ||
| const int | packet_size, | ||
| unsigned char *const | dest, | ||
| const int | dest_size, | ||
| rohc_packet_t *const | packet_type, | ||
| int *const | payload_offset | ||
| ) | 
Encode an IP/UDP/RTP packet according to a pattern decided by several different factors.
| context | The compression context | 
| ip | The IP packet to encode | 
| packet_size | The length of the IP packet to encode | 
| dest | The rohc-packet-under-build buffer | 
| dest_size | The length of the rohc-packet-under-build buffer | 
| packet_type | OUT: The type of ROHC packet that is created | 
| payload_offset | The offset for the payload in the IP packet | 
References c_generic_encode(), ip_get_inner_packet(), ip_get_next_layer(), ip_get_protocol(), sc_rtp_context::old_rtp, sc_rtp_context::old_udp, PACKET_IR, PACKET_IR_DYN, generic_tmp_vars::packet_type, rohc_debugf, ROHC_IPPROTO_IPIP, ROHC_IPPROTO_IPV6, ROHC_IPPROTO_UDP, rtp_changed_rtp_dynamic(), rtp_tmp_vars::send_rtp_dynamic, c_context::specific, c_generic_context::specific, sc_rtp_context::tmp, and c_generic_context::tmp.
| int rtp_code_uo_remainder | ( | struct c_context * | context, | 
| const unsigned char * | next_header, | ||
| unsigned char * | dest, | ||
| int | counter | ||
| ) | 
| void rtp_decide_state | ( | struct c_context *const | context | ) | 
Decide the state that should be used for the next packet compressed with the ROHC RTP profile.
The three states are:
| context | The compression context | 
References change_state(), decide_state(), FO, INIT_TS, IR, MAX_IR_COUNT, rohc_debugf, rtp_tmp_vars::send_rtp_dynamic, c_context::specific, c_generic_context::specific, ts_sc_comp::state, c_context::state, sc_rtp_context::tmp, sc_rtp_context::ts_sc, and sc_rtp_context::udp_checksum_change_count.
Referenced by c_rtp_create().
 1.7.6.1
 1.7.6.1