Merge "SDP API: Add SSRC-level attributes"

This commit is contained in:
Jenkins2
2017-05-01 14:16:55 -05:00
committed by Gerrit Code Review
8 changed files with 279 additions and 14 deletions

View File

@@ -599,6 +599,10 @@ struct ast_rtp_engine {
void (*available_formats)(struct ast_rtp_instance *instance, struct ast_format_cap *to_endpoint, struct ast_format_cap *to_asterisk, struct ast_format_cap *result);
/*! Callback to send CNG */
int (*sendcng)(struct ast_rtp_instance *instance, int level);
/*! Callback to retrieve local SSRC */
unsigned int (*ssrc_get)(struct ast_rtp_instance *instance);
/*! Callback to retrieve RTCP SDES CNAME */
const char *(*cname_get)(struct ast_rtp_instance *instance);
/*! Callback to pointer for optional ICE support */
struct ast_rtp_engine_ice *ice;
/*! Callback to pointer for optional DTLS SRTP support */
@@ -2389,6 +2393,24 @@ time_t ast_rtp_instance_get_last_rx(const struct ast_rtp_instance *rtp);
*/
void ast_rtp_instance_set_last_rx(struct ast_rtp_instance *rtp, time_t time);
/*!
* \brief Retrieve the local SSRC value that we will be using
*
* \param rtp The RTP instance
* \return The SSRC value
*/
unsigned int ast_rtp_instance_get_ssrc(struct ast_rtp_instance *rtp);
/*!
* \brief Retrieve the CNAME used in RTCP SDES items
*
* This is a pointer directly into the RTP struct, not a copy.
*
* \param rtp The RTP instance
* \return the CNAME
*/
const char *ast_rtp_instance_get_cname(struct ast_rtp_instance *rtp);
/*! \addtogroup StasisTopicsAndMessages
* @{
*/

View File

@@ -509,4 +509,23 @@ void ast_sdp_options_set_bind_udptl_to_media_address(struct ast_sdp_options *opt
*/
unsigned int ast_sdp_options_get_bind_udptl_to_media_address(const struct ast_sdp_options *options);
/*!
* \since 15.0.0
* \brief Enable setting SSRC level attributes on SDPs
*
* \param options SDP Options
* \param ssrc Boolean indicating if SSRC attributes should be included in generated SDPs
*/
void ast_sdp_options_set_ssrc(struct ast_sdp_options *options, unsigned int ssrc);
/*!
* \since 15.0.0
* \brief Get SDP Options ssrc
*
* \param options SDP Options
*
* \returns Whether SSRC-level attributes will be added to our SDP.
*/
unsigned int ast_sdp_options_get_ssrc(const struct ast_sdp_options *options);
#endif /* _ASTERISK_SDP_OPTIONS_H */