00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SDP_RFC3264_H__
00021 #define __SDP_RFC3264_H__
00022
00023 #include <osipparser2/osip_list.h>
00024 #include <osipparser2/sdp_message.h>
00025
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041
00046 struct osip_rfc3264;
00047
00052 #define MAX_AUDIO_CODECS 100
00053
00057 #define MAX_VIDEO_CODECS 100
00058
00062 #define MAX_T38_CODECS 2
00063
00067 #define MAX_APP_CODECS 100
00068
00073 int osip_rfc3264_init (struct osip_rfc3264 **config);
00074
00079 void osip_rfc3264_free (struct osip_rfc3264 *config);
00080
00086 int osip_rfc3264_endof_media (struct osip_rfc3264 *config, int pos);
00087
00093 sdp_media_t *osip_rfc3264_get (struct osip_rfc3264 *config, int pos);
00094
00100 int osip_rfc3264_remove (struct osip_rfc3264 *config, int pos);
00101
00106 int osip_rfc3264_reset_media (struct osip_rfc3264 *config);
00107
00114 int osip_rfc3264_add_audio_media (struct osip_rfc3264 *config, sdp_media_t *med, int pos);
00115
00121 int osip_rfc3264_del_audio_media (struct osip_rfc3264 *config, int pos);
00122
00129 int osip_rfc3264_add_t38_media (struct osip_rfc3264 *config, sdp_media_t *med, int pos);
00130
00136 int osip_rfc3264_del_t38_media (struct osip_rfc3264 *config, int pos);
00137
00144 int osip_rfc3264_add_video_media (struct osip_rfc3264 *config, sdp_media_t *med, int pos);
00145
00151 int osip_rfc3264_del_video_media (struct osip_rfc3264 *config, int pos);
00152
00153
00158 sdp_media_t *osip_rfc3264_find_audio (struct osip_rfc3264 *config, char *payload,
00159 char *rtpmap);
00160
00167 sdp_media_t *osip_rfc3264_find_video (struct osip_rfc3264 *config, char *payload,
00168 char *rtpmap);
00169
00175 sdp_media_t *osip_rfc3264_find_t38 (struct osip_rfc3264 *config, char *payload);
00176
00182 sdp_media_t *osip_rfc3264_find_app (struct osip_rfc3264 *config, char *payload);
00183
00196 int osip_rfc3264_match(struct osip_rfc3264 *config,
00197 sdp_message_t *remote_sdp,
00198 sdp_media_t *audio_tab[],
00199 sdp_media_t *video_tab[],
00200 sdp_media_t *t38_tab[],
00201 sdp_media_t *app_tab[],
00202 int pos_media);
00203
00211 int osip_rfc3264_match_audio(struct osip_rfc3264 *config,
00212 sdp_message_t *remote_sdp,
00213 sdp_media_t *remote_med,
00214 sdp_media_t *audio_tab[]);
00215
00223 int osip_rfc3264_match_video(struct osip_rfc3264 *config,
00224 sdp_message_t *remote_sdp,
00225 sdp_media_t *remote_med,
00226 sdp_media_t *video_tab[]);
00227
00235 int osip_rfc3264_match_t38(struct osip_rfc3264 *config,
00236 sdp_message_t *remote_sdp,
00237 sdp_media_t *remote_med,
00238 sdp_media_t *t38_tab[]);
00239
00247 int osip_rfc3264_match_app(struct osip_rfc3264 *config,
00248 sdp_message_t *remote_sdp,
00249 sdp_media_t *remote_med,
00250 sdp_media_t *app_tab[]);
00251
00252
00260 int osip_rfc3264_prepare_answer(struct osip_rfc3264 *config,
00261 sdp_message_t *remote_sdp,
00262 char *local_sdp, int length);
00263
00275 int
00276 osip_rfc3264_complete_answer(struct osip_rfc3264 *config,
00277 sdp_message_t *remote_sdp,
00278 sdp_message_t *local_sdp,
00279 sdp_media_t *med,
00280 int mline);
00281
00292 int osip_rfc3264_accept_codec(struct osip_rfc3264 *config,
00293 sdp_media_t *med,
00294 sdp_message_t *remote_sdp,
00295 sdp_message_t *local_sdp);
00296
00297
00303 int __osip_rfc3264_print_codecs(struct osip_rfc3264 *config);
00304
00305
00306 #ifdef __cplusplus
00307 }
00308 #endif
00309
00310 #endif