osip_negotiation.h

来自「最新osip源代码」· C头文件 代码 · 共 496 行 · 第 1/2 页

H
496
字号
 * the callback 'fcn_accept_audio_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_audio_codec (osip_negotiation_t *,                                                    char *payload,                                                    char *number_of_port,                                                    char *proto,                                                    char *c_nettype,                                                    char *c_addrtype,                                                    char *c_addr,                                                    char                                                    *c_addr_multicast_ttl,                                                    char                                                    *c_addr_multicast_int,                                                    char *a_rtpmap);/** * Add a supported video codec. * Those codecs will be accepted as long as you return 0 when * the callback 'fcn_accept_video_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_video_codec (osip_negotiation_t *,                                                    char *payload,                                                    char *number_of_port,                                                    char *proto,                                                    char *c_nettype,                                                    char *c_addrtype,                                                    char *c_addr,                                                    char                                                    *c_addr_multicast_ttl,                                                    char                                                    *c_addr_multicast_int,                                                    char *a_rtpmap);/** * Add a supported (non-audio and non-video) codec. * Those codecs will be accepted as long as you return 0 when * the callback 'fcn_accept_other_codec' is called with the specific payload. * @param payload The payload. * @param number_of_port The number of port (channel) for this codec. * @param proto The protocol. * @param c_nettype The network type in the 'c' field. * @param c_addrtype The address type in the 'c' field. * @param c_addr The address in the 'c' field. * @param c_addr_multicast_ttl The ttl for multicast address in the 'c' field. * @param c_addr_multicast_int The int for multicast address in the 'c' field. * @param a_rtpmap The rtpmap attribute in the 'a' field. */  int osip_negotiation_add_support_for_other_codec (osip_negotiation_t *,                                                    char *payload,                                                    char *number_of_port,                                                    char *proto,                                                    char *c_nettype,                                                    char *c_addrtype,                                                    char *c_addr,                                                    char                                                    *c_addr_multicast_ttl,                                                    char                                                    *c_addr_multicast_int,                                                    char *a_rtpmap);#ifndef DOXYGEN/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_audio_payloads (osip_negotiation_t * config);/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_video_payloads (osip_negotiation_t * config);/** * Free resource in the global sdp_config.. */  int osip_negotiation_remove_other_payloads (osip_negotiation_t * config);#endif/** * Set the callback for setting info ('i' field) in a local SDP packet. * This callback is called once each time we need an 'i' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_info (osip_negotiation_t *,                                         int (*fcn) (osip_negotiation_ctx_t *,                                                     sdp_message_t *));/** * Set the callback for setting a URI ('u' field) in a local SDP packet. * This callback is called once each time we need an 'u' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_uri (osip_negotiation_t *,                                        int (*fcn) (osip_negotiation_ctx_t *,                                                    sdp_message_t *));/** * Set the callback for setting an email ('e' field) in a local SDP packet. * This callback is called once each time we need an 'e' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_emails (osip_negotiation_t *,                                           int (*fcn) (osip_negotiation_ctx_t                                                       *, sdp_message_t *));/** * Set the callback for setting a phone ('p' field) in a local SDP packet. * This callback is called once each time we need an 'p' field. * @param fcn The callback. */  int osip_negotiation_set_fcn_set_phones (osip_negotiation_t *,                                           int (*fcn) (osip_negotiation_ctx_t                                                       *, sdp_message_t *));/** * Set the callback for setting an attribute ('a' field) in a local SDP packet. * This callback is called once each time we need an 'a' field. * @param fcn The callback. */  int    osip_negotiation_set_fcn_set_attributes (osip_negotiation_t *,                                             int (*fcn)                                             (osip_negotiation_ctx_t *,                                              sdp_message_t *, int));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_audio_codec (osip_negotiation_t *,                                                 int (*fcn)                                                 (osip_negotiation_ctx_t *,                                                  char *, char *, int, char *));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_video_codec (osip_negotiation_t *,                                                 int (*fcn)                                                 (osip_negotiation_ctx_t *,                                                  char *, char *, int, char *));/** * Set the callback used to accept a codec during a negotiation. * This callback is called once each time we need to accept a codec. * @param fcn The callback. */  int    osip_negotiation_set_fcn_accept_other_codec (osip_negotiation_t *,                                                 int (*fcn)                                                 (osip_negotiation_ctx_t *,                                                  char *, char *, char *, char *));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_audio_port (osip_negotiation_t *,                                               char                                               *(*fcn) (osip_negotiation_ctx_t                                                        *, int));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_video_port (osip_negotiation_t *,                                               char                                               *(*fcn) (osip_negotiation_ctx_t                                                        *, int));/** * Set the callback for setting the port number ('m' field) in a local SDP packet. * This callback is called once each time a 'm' line is accepted. * @param fcn The callback. */  int osip_negotiation_set_fcn_get_other_port (osip_negotiation_t *,                                               char                                               *(*fcn) (osip_negotiation_ctx_t                                                        *, int));/** * Start the automatic negotiation for a UA * NOTE: You can previously set context->mycontext to point to your * personal context. This way you'll get access to your personal context * in the callback and you can easily take the correct decisions. * After this method is called, the negotiation will happen and * callbacks will be called. You can modify, add, remove SDP fields, * and accept and refuse the codec from your preferred list by using * those callbacks. * Of course, after the negotiation happen, you can modify the * SDP packet if you wish to improve it or just refine some attributes. * @param ctx The context holding the remote SDP offer. */  int osip_negotiation_ctx_execute_negotiation (osip_negotiation_t *,                                                osip_negotiation_ctx_t * ctx);/** Put the SDP message on hold in outgoing invite * @param ctx The element to work on. * @param sdp The sdp message to build. * @param audio_port The port for audio stream. * @param video_port The port for video stream. */  int osip_negotiation_sdp_build_offer (osip_negotiation_t *,                                        osip_negotiation_ctx_t * ctx,                                        sdp_message_t ** sdp,                                        char *audio_port, char *video_port);/** *@internal */  int __osip_negotiation_sdp_build_offer (osip_negotiation_t *,                                          osip_negotiation_ctx_t * ctx,                                          sdp_message_t ** sdp,                                          char *audio_port, char *video_port,                                          char *audio_codec, char *video_codec);/** Put the SDP message on hold in outgoing invite * @param sdp The sdp message to modify. */  int osip_negotiation_sdp_message_put_on_hold (sdp_message_t * sdp);/** Put the SDP message off hold in outgoing invite * @param sdp The sdp message to modify. */  int osip_negotiation_sdp_message_put_off_hold (sdp_message_t * sdp);/** * @internal * @} */#ifdef __cplusplus}#endif#endif /*_SDP_NEGOC_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?