ROHC compression/decompression library
Data Structures | Functions
d_rtp.h File Reference

ROHC decompression context for the RTP profile. More...

#include "rtp.h"
#include "d_generic.h"
#include "d_udp.h"
#include "ts_sc_decomp.h"
#include <netinet/ip.h>
#include <netinet/udp.h>
#include <string.h>
Include dependency graph for d_rtp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  d_rtp_context
 Define the RTP part of the decompression profile context. More...

Functions

int rtp_decode_static_rtp (struct d_generic_context *context, const unsigned char *packet, unsigned int length, unsigned char *dest)
 Decode the UDP/RTP static part of the ROHC packet.
int rtp_decode_dynamic_rtp (struct d_generic_context *context, const unsigned char *packet, unsigned int length, unsigned char *dest)
 Decode the UDP/RTP dynamic part of the ROHC packet.
int rtp_build_uncompressed_rtp (struct d_generic_context *context, struct d_generic_changes *active, unsigned char *dest, int payload_size)
 Build an uncompressed UDP/RTP header.
int rtp_get_static_part (void)
 Get the size of the static part of an IR packet.

Detailed Description

ROHC decompression context for the RTP profile.

Author:
David Moreau from TAS
Didier Barvaux <didier.barvaux@toulouse.viveris.com>

Function Documentation

int rtp_build_uncompressed_rtp ( struct d_generic_context context,
struct d_generic_changes active,
unsigned char *  dest,
int  payload_size 
)

Build an uncompressed UDP/RTP header.

Parameters:
contextThe generic decompression context
activeThe UDP/RTP header changes
destThe buffer to store the UDP/RTP header (MUST be at least of sizeof(struct udphdr) + sizeof(struct rtphdr) length)
payload_sizeThe length of the UDP/RTP payload
Returns:
The length of the next header (ie. the UDP/RTP header), -1 in case of error

References d_generic_changes::next_header, rohc_debugf, d_generic_context::specific, and d_rtp_context::udp_checksum_present.

Referenced by d_rtp_create().

int rtp_decode_dynamic_rtp ( struct d_generic_context context,
const unsigned char *  packet,
unsigned int  length,
unsigned char *  dest 
)
int rtp_decode_static_rtp ( struct d_generic_context context,
const unsigned char *  packet,
unsigned int  length,
unsigned char *  dest 
)

Decode the UDP/RTP static part of the ROHC packet.

Parameters:
contextThe generic decompression context
packetThe ROHC packet to decode
lengthThe length of the ROHC packet
destThe decoded UDP/RTP header
Returns:
The number of bytes read in the ROHC packet, -1 in case of failure

References rohc_debugf, rtphdr::ssrc, and udp_decode_static_udp().

Referenced by d_rtp_create().

int rtp_get_static_part ( void  )

Get the size of the static part of an IR packet.

Returns:
The size of the static part of an IR packet

Referenced by rtp_detect_ir_size().