rtp_payload_type.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils.h"
#include "comm.h"
#include "rtp.h"
#include "parsers/rtpparsers.h"
#include "rtpptdefs.h"

Include dependency graph for rtp_payload_type.c:

Go to the source code of this file.

Functions

void rtpptdefs_new (rtp_pt *new_defs[])
rtp_pt * rtp_pt_new (rtp_media_type mtype)
int rtp_dynpt_set (rtp_pt *defs[], rtp_pt *pt, uint8_t value)
int rtp_dynpt_encname (rtp_pt *defs[], uint8_t value, char *enc_name)
int rtp_pt_attr_add (rtp_pt *defs[], uint8_t value, char *attr)
 rtp_pt_attrs specific functions
rtp_pt * rtp_get_pt_info (rtp_session *rtp_sess, unsigned pt)
int rtp_dynpt_reg (rtp_session *rtp_sess, unsigned pt, char *mime)
int rtp_announce_pt (rtp_session *rtp_sess, unsigned pt, rtp_media_type media_type)

Variables

static rtp_audio pcmu
static rtp_audio gsm
static rtp_audio g723
static rtp_audio dvi4_8000
static rtp_audio dvi4_16000
static rtp_audio lpc
static rtp_audio pcma
static rtp_audio g722
static rtp_audio l16_2
static rtp_audio l16_1
static rtp_audio qcelp
static rtp_audio cn
static rtp_audio mpa
static rtp_audio g728
static rtp_audio dvi4_11025
static rtp_audio dvi4_22050
static rtp_audio g729
static rtp_video celb
static rtp_video jpeg
static rtp_video nv
static rtp_video h261
static rtp_video mpv
static rtp_audio_video mp2t
static rtp_video h263
static rtp_pt * rtp_pt_defs [128]


Detailed Description

This file contains the functions to manage payload types informations

Definition in file rtp_payload_type.c.


Function Documentation

int rtp_dynpt_encname ( rtp_pt *  defs[],
uint8_t  value,
char *  enc_name 
)

Sets an encoding name for the payload type registered on the given ID

Parameters:
defs The payload types array where to look up the payload type.
value The ID for which to change the encoding name (A payload type must be already registered at the given ID)
enc_name The encoding name to set
Returns:
RTP_OK on succes, RTP_ERROR otherwise

Definition at line 286 of file rtp_payload_type.c.

int rtp_dynpt_set ( rtp_pt *  defs[],
rtp_pt *  pt,
uint8_t  value 
)

Registers a payload type structure ad the given ID

Parameters:
defs The payload type array where to map the payload type to the given id
pt The payload type
value The ID mapped to the payload type (only ids > 96 are valid for dynamic payload types)
Returns:
RTP_OK on success, RTP_ERROR otherwise.

Definition at line 261 of file rtp_payload_type.c.

int rtp_pt_attr_add ( rtp_pt *  defs[],
uint8_t  value,
char *  attr 
)

rtp_pt_attrs specific functions

Adds a new attribute to the given payload type ID

Parameters:
defs The payload types array where to look up the payload type.
value The ID for which to add the attribute (A payload type must be already registered at the given ID)
attr the name of the attribute to add
Returns:
RTP_OK on succes, RTP_ERROR if the id is out of range, -1 if failed to allocate the attribute.

Definition at line 328 of file rtp_payload_type.c.

rtp_pt* rtp_pt_new ( rtp_media_type  mtype  ) 

Creates a new payload type for the given media type

Parameters:
mtype Specifies the media type of the payload
See also:
rtp_media_type
Returns:
A new rtp payload type or NULL

Definition at line 222 of file rtp_payload_type.c.

void rtpptdefs_new ( rtp_pt *  new_defs[]  ) 

Initializes a new rtp payload types array with the standard one

Definition at line 212 of file rtp_payload_type.c.

Referenced by rtp_session_init().


Variable Documentation

rtp_video celb [static]

Initial value:

{ "CelB", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 97 of file rtp_payload_type.c.

rtp_audio cn [static]

Initial value:

{ "CN", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 71 of file rtp_payload_type.c.

rtp_audio dvi4_11025 [static]

Initial value:

{ "DVI4", AU, 11025, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 77 of file rtp_payload_type.c.

rtp_audio dvi4_16000 [static]

Initial value:

{ "DVI4", AU, 16000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 57 of file rtp_payload_type.c.

rtp_audio dvi4_22050 [static]

Initial value:

{ "DVI4", AU, 22050, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 79 of file rtp_payload_type.c.

rtp_audio dvi4_8000 [static]

Initial value:

{ "DVI4", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 55 of file rtp_payload_type.c.

rtp_audio g722 [static]

Initial value:

{ "G722", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 63 of file rtp_payload_type.c.

rtp_audio g723 [static]

Initial value:

{ "G723", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 53 of file rtp_payload_type.c.

rtp_audio g728 [static]

Initial value:

{ "G728", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 75 of file rtp_payload_type.c.

rtp_audio g729 [static]

Initial value:

{ "G729", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 81 of file rtp_payload_type.c.

rtp_audio gsm [static]

Initial value:

{ "GSM", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 51 of file rtp_payload_type.c.

rtp_video h261 [static]

Initial value:

{ "H261", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 108 of file rtp_payload_type.c.

rtp_video h263 [static]

Initial value:

{ "H263", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 114 of file rtp_payload_type.c.

rtp_video jpeg [static]

Initial value:

{ "JPEG", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 99 of file rtp_payload_type.c.

rtp_audio l16_1 [static]

Initial value:

{ "L16", AU, 44100, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 67 of file rtp_payload_type.c.

rtp_audio l16_2 [static]

Initial value:

{ "L16", AU, 44100, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 2 }

Definition at line 65 of file rtp_payload_type.c.

rtp_audio lpc [static]

Initial value:

{ "LPC", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 59 of file rtp_payload_type.c.

rtp_audio_video mp2t [static]

Initial value:

{ "MP2T", AV, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 0 }

Definition at line 112 of file rtp_payload_type.c.

rtp_audio mpa [static]

Initial value:

{ "MPA", AU, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 0 }

Definition at line 73 of file rtp_payload_type.c.

rtp_video mpv [static]

Initial value:

{ "MPV", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 110 of file rtp_payload_type.c.

rtp_video nv [static]

Initial value:

{ "nv", VI, 90000, 0, RTP_PT_ATTRS_INITIALIZER, NULL }

Definition at line 103 of file rtp_payload_type.c.

rtp_audio pcma [static]

Initial value:

{ "PCMA", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 61 of file rtp_payload_type.c.

rtp_audio pcmu [static]

Initial value:

{ "PCMU", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 39 of file rtp_payload_type.c.

rtp_audio qcelp [static]

Initial value:

{ "QCELP", AU, 8000, 0, RTP_PT_ATTRS_INITIALIZER, NULL, 1 }

Definition at line 69 of file rtp_payload_type.c.


Generated on Tue Feb 3 03:10:02 2009 for libnemesi by  doxygen 1.5.4