28 #include <ortp/port.h> 36 #define PAYLOAD_TYPE_ALLOCATED (1) 38 #define PAYLOAD_TYPE_PRIV1 (1<<1) 39 #define PAYLOAD_TYPE_PRIV2 (1<<2) 40 #define PAYLOAD_TYPE_PRIV3 (1<<3) 42 #define PAYLOAD_TYPE_USER_FLAG_0 (1<<4) 43 #define PAYLOAD_TYPE_USER_FLAG_1 (1<<5) 44 #define PAYLOAD_TYPE_USER_FLAG_2 (1<<6) 47 #define PAYLOAD_AUDIO_CONTINUOUS 0 48 #define PAYLOAD_AUDIO_PACKETIZED 1 49 #define PAYLOAD_VIDEO 2 50 #define PAYLOAD_OTHER 3 69 #ifndef PayloadType_defined 70 #define PayloadType_defined 74 #define payload_type_set_flag(pt,flag) (pt)->flags|=((int)flag) 75 #define payload_type_unset_flag(pt,flag) (pt)->flags&=(~(int)flag) 76 #define payload_type_get_flags(pt) (pt)->flags 78 #define RTP_PROFILE_MAX_PAYLOADS 128 100 void payload_type_append_recv_fmtp(
PayloadType *pt,
const char *fmtp);
101 void payload_type_append_send_fmtp(
PayloadType *pt,
const char *fmtp);
103 #define payload_type_get_bitrate(pt) ((pt)->normal_bitrate) 104 #define payload_type_get_rate(pt) ((pt)->clock_rate) 105 #define payload_type_get_mime(pt) ((pt)->mime_type) 107 bool_t
fmtp_get_value(
const char *fmtp,
const char *param_name,
char *result,
size_t result_len);
109 VAR_DECLSPEC RtpProfile av_profile;
111 #define payload_type_set_user_data(pt,p) (pt)->user_data=(p) 112 #define payload_type_get_user_data(pt) ((pt)->user_data) 114 #define rtp_profile_get_name(profile) (const char*)((profile)->name) 124 #define rtp_profile_clear_payload(profile,index) \ 125 rtp_profile_set_payload(profile,index,NULL) 136 static inline PayloadType * rtp_profile_get_payload(RtpProfile *prof,
int idx){
137 if (idx<0 || idx>=RTP_PROFILE_MAX_PAYLOADS) {
140 return prof->payload[idx];
144 PayloadType * rtp_profile_get_payload_from_mime(RtpProfile *profile,
const char *mime);
145 PayloadType * rtp_profile_get_payload_from_rtpmap(RtpProfile *profile,
const char *rtpmap);
146 int rtp_profile_get_payload_number_from_mime(RtpProfile *profile,
const char *mime);
147 int rtp_profile_get_payload_number_from_rtpmap(RtpProfile *profile,
const char *rtpmap);
148 int rtp_profile_find_payload_number(RtpProfile *prof,
const char *mime,
int rate,
int channels);
149 PayloadType * rtp_profile_find_payload(RtpProfile *prof,
const char *mime,
int rate,
int channels);
150 int rtp_profile_move_payload(RtpProfile *prof,
int oldpos,
int newpos);
152 RtpProfile * rtp_profile_new(
const char *name);
154 RtpProfile * rtp_profile_clone(RtpProfile *prof);
158 RtpProfile * rtp_profile_clone_full(RtpProfile *prof);
160 void rtp_profile_destroy(RtpProfile *prof);
209 VAR_DECLSPEC
PayloadType payload_type_telephone_event;
void payload_type_set_send_fmtp(PayloadType *pt, const char *fmtp)
Definition: payloadtype.c:85
Definition: payloadtype.h:52
bool_t fmtp_get_value(const char *fmtp, const char *param_name, char *result, size_t result_len)
Definition: payloadtype.c:142
void rtp_profile_set_payload(RtpProfile *prof, int idx, PayloadType *pt)
Definition: payloadtype.c:285
void rtp_profile_set_name(RtpProfile *prof, const char *name)
Definition: payloadtype.c:312
int clock_rate
Definition: payloadtype.h:55
void rtp_profile_clear_all(RtpProfile *prof)
Definition: payloadtype.c:298
char * mime_type
Definition: payloadtype.h:61
int channels
Definition: payloadtype.h:62
void payload_type_set_recv_fmtp(PayloadType *pt, const char *fmtp)
Definition: payloadtype.c:72
int type
Definition: payloadtype.h:54
Definition: payloadtype.h:85
void payload_type_destroy(PayloadType *pt)
Definition: payloadtype.c:123