oRTP: include/ortp/payloadtype.h File Reference

# include/ortp/payloadtype.h File Reference

Using and creating standart and custom RTP profiles. More...

`#include <ortp/port.h>`

Go to the source code of this file.

## Data Structures
struct | _PayloadType
struct | _RtpProfile
## Defines
#define | PAYLOAD_TYPE_ALLOCATED (1)
#define | PAYLOAD_TYPE_PRIV1 (1<<1)
#define | PAYLOAD_TYPE_PRIV2 (1<<2)
#define | PAYLOAD_TYPE_PRIV3 (1<<3)
#define | PAYLOAD_TYPE_USER_FLAG_0 (1<<4)
#define | PAYLOAD_TYPE_USER_FLAG_1 (1<<5)
#define | PAYLOAD_TYPE_USER_FLAG_2 (1<<6)
#define | PAYLOAD_AUDIO_CONTINUOUS 0
#define | PAYLOAD_AUDIO_PACKETIZED 1
#define | PAYLOAD_VIDEO 2
#define | PAYLOAD_OTHER 3
#define | payload_type_set_flag(pt, flag) (pt)->flags|=((int)flag)
#define | payload_type_unset_flag(pt, flag) (pt)->flags&=(~(int)flag)
#define | payload_type_get_flags(pt) (pt)->flags
#define | RTP_PROFILE_MAX_PAYLOADS 128
#define | payload_type_set_user_data(pt, p) (pt)->user_data=(p)
#define | payload_type_get_user_data(pt) ((pt)->user_data)
#define | rtp_profile_get_name(profile) (const char*)((profile)->name)
#define | rtp_profile_clear_payload(profile, index) rtp_profile_set_payload(profile,index,NULL)
## Typedefs
typedef struct _PayloadType | PayloadType
typedef struct _RtpProfile | RtpProfile
## Functions
PayloadType * | payload_type_new (void)
PayloadType * | payload_type_clone (PayloadType *payload)
char * | payload_type_get_rtpmap (PayloadType *pt)
void | payload_type_destroy (PayloadType *pt)
void | payload_type_set_recv_fmtp (PayloadType *pt, const char *fmtp)
void | payload_type_set_send_fmtp (PayloadType *pt, const char *fmtp)
void | payload_type_append_recv_fmtp (PayloadType *pt, const char *fmtp)
void | payload_type_append_send_fmtp (PayloadType *pt, const char *fmtp)
bool_t | fmtp_get_value (const char *fmtp, const char *param_name, char *result, size_t result_len)
void | rtp_profile_set_payload (RtpProfile *prof, int idx, PayloadType *pt)
void | rtp_profile_clear_all (RtpProfile *prof)
void | rtp_profile_set_name (RtpProfile *prof, const char *name)
PayloadType * | rtp_profile_get_payload_from_mime (RtpProfile *profile, const char *mime)
PayloadType * | rtp_profile_get_payload_from_rtpmap (RtpProfile *profile, const char *rtpmap)
int | rtp_profile_get_payload_number_from_mime (RtpProfile *profile, const char *mime)
int | rtp_profile_get_payload_number_from_rtpmap (RtpProfile *profile, const char *rtpmap)
int | rtp_profile_find_payload_number (RtpProfile *prof, const char *mime, int rate, int channels)
PayloadType * | rtp_profile_find_payload (RtpProfile *prof, const char *mime, int rate, int channels)
int | rtp_profile_move_payload (RtpProfile *prof, int oldpos, int newpos)
RtpProfile * | rtp_profile_new (const char *name)
RtpProfile * | rtp_profile_clone (RtpProfile *prof)
RtpProfile * | rtp_profile_clone_full (RtpProfile *prof)
void | rtp_profile_destroy (RtpProfile *prof)
## Variables
VAR_DECLSPEC RtpProfile | av_profile
VAR_DECLSPEC PayloadType | payload_type_pcmu8000
VAR_DECLSPEC PayloadType | payload_type_pcma8000
VAR_DECLSPEC PayloadType | payload_type_pcm8000
VAR_DECLSPEC PayloadType | payload_type_l16_mono
VAR_DECLSPEC PayloadType | payload_type_l16_stereo
VAR_DECLSPEC PayloadType | payload_type_lpc1016
VAR_DECLSPEC PayloadType | payload_type_g729
VAR_DECLSPEC PayloadType | payload_type_g7231
VAR_DECLSPEC PayloadType | payload_type_g7221
VAR_DECLSPEC PayloadType | payload_type_g726_40
VAR_DECLSPEC PayloadType | payload_type_g726_32
VAR_DECLSPEC PayloadType | payload_type_g726_24
VAR_DECLSPEC PayloadType | payload_type_g726_16
VAR_DECLSPEC PayloadType | payload_type_gsm
VAR_DECLSPEC PayloadType | payload_type_lpc
VAR_DECLSPEC PayloadType | payload_type_lpc1015
VAR_DECLSPEC PayloadType | payload_type_speex_nb
VAR_DECLSPEC PayloadType | payload_type_speex_wb
VAR_DECLSPEC PayloadType | payload_type_speex_uwb
VAR_DECLSPEC PayloadType | payload_type_ilbc
VAR_DECLSPEC PayloadType | payload_type_amr
VAR_DECLSPEC PayloadType | payload_type_amrwb
VAR_DECLSPEC PayloadType | payload_type_truespeech
VAR_DECLSPEC PayloadType | payload_type_evrc0
VAR_DECLSPEC PayloadType | payload_type_mpv
VAR_DECLSPEC PayloadType | payload_type_h261
VAR_DECLSPEC PayloadType | payload_type_h263
VAR_DECLSPEC PayloadType | payload_type_h263_1998
VAR_DECLSPEC PayloadType | payload_type_h263_2000
VAR_DECLSPEC PayloadType | payload_type_mp4v
VAR_DECLSPEC PayloadType | payload_type_theora
VAR_DECLSPEC PayloadType | payload_type_h264
VAR_DECLSPEC PayloadType | payload_type_x_snow
VAR_DECLSPEC PayloadType | payload_type_t140
VAR_DECLSPEC PayloadType | payload_type_x_udpftp
VAR_DECLSPEC PayloadType | payload_type_telephone_event

## Detailed Description

Using and creating standart and custom RTP profiles.

## Define Documentation

#define rtp_profile_clear_payload | ( | profile,
|  | index |  | ) | rtp_profile_set_payload(profile,index,NULL)

Set payload type number unassigned in the profile.

Parameters:

  | profile | an RTP profile
  | index | the payload type number

## Function Documentation

bool_t fmtp_get_value | ( | const char * | fmtp,
|  | const char * | param_name,
|  | char * | result,
|  | size_t | result_len |
| ) |  |  |

Parses a fmtp string such as "profile=0;level=10", finds the value matching parameter param_name, and writes it into result. Despite fmtp strings are not used anywhere within oRTP, this function can be useful for people using RTP streams described from SDP.

Parameters:

  | fmtp | the fmtp line (format parameters)
  | param_name | the parameter to search for
  | result | the value given for the parameter (if found)
  | result_len | the size allocated to hold the result string

Returns:
  TRUE if the parameter was found, else FALSE.

void payload_type_destroy | ( | PayloadType * | pt | ) |

Frees a PayloadType.

void payload_type_set_recv_fmtp | ( | PayloadType * | pt,
|  | const char * | fmtp |
| ) |  |  |

Sets a recv parameters (fmtp) for the PayloadType. This method is provided for applications using RTP with SDP, but actually the ftmp information is not used for RTP processing.

void payload_type_set_send_fmtp | ( | PayloadType * | pt,
|  | const char * | fmtp |
| ) |  |  |

Sets a send parameters (fmtp) for the PayloadType. This method is provided for applications using RTP with SDP, but actually the ftmp information is not used for RTP processing.

void rtp_profile_clear_all | ( | RtpProfile * | obj | ) |

Initialize the profile to the empty profile (all payload type are unassigned).

Parameters:

  | profile | a RTP profile

References _RtpProfile::payload.

void rtp_profile_set_name | ( | RtpProfile * | obj,
|  | const char * | name |
| ) |  |  |

Set a name to the rtp profile. (This is not required)

Parameters:

  | profile | a rtp profile object
  | nm | a string

References _RtpProfile::name.

void rtp_profile_set_payload | ( | RtpProfile * | prof,
|  | int | idx,
|  | PayloadType * | pt |
| ) |  |  |

Assign payload type number index to payload type desribed in pt for the RTP profile profile.

Parameters:

  | profile | a RTP profile
  | idx | the payload type number
  | pt | the payload type description

References _RtpProfile::payload.