diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-19 15:41:24 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-19 15:41:24 +0000 |
commit | 6271d5fe307a080245aaf340e77cd1d5ac3e7828 (patch) | |
tree | ba2c013a77fabb40e732c6cda3198cdb67835304 /include | |
parent | b58948fa836f6124fd5c8c1ff03fdf052ffa7a5a (diff) |
Add support for allowing an RTP engine to decide on whether it is possible for specific formats to be transcoded for an RTP instance.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201902 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/rtp_engine.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 3fcc12989..2baae32cf 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -353,6 +353,8 @@ struct ast_rtp_engine { int (*activate)(struct ast_rtp_instance *instance); /*! Callback to request that the RTP engine send a STUN BIND request */ void (*stun_request)(struct ast_rtp_instance *instance, struct sockaddr_in *suggestion, const char *username); + /*! Callback to get the transcodeable formats supported */ + int (*available_formats)(struct ast_rtp_instance *instance, int to_endpoint, int to_asterisk); /*! Linked list information */ AST_RWLIST_ENTRY(ast_rtp_engine) entry; }; @@ -1497,6 +1499,26 @@ int ast_rtp_instance_set_write_format(struct ast_rtp_instance *instance, int for */ int ast_rtp_instance_make_compatible(struct ast_channel *chan, struct ast_rtp_instance *instance, struct ast_channel *peer); +/*! \brief Request the formats that can be transcoded + * + * \param instance The RTP instance + * \param to_endpoint Formats being sent/received towards the endpoint + * \param to_asterisk Formats being sent/received towards Asterisk + * + * \retval supported formats + * + * Example usage: + * + * \code + * ast_rtp_instance_available_formats(instance, AST_FORMAT_ULAW, AST_FORMAT_SLINEAR); + * \endcode + * + * This sees if it is possible to have ulaw communicated to the endpoint but signed linear received into Asterisk. + * + * \since 1.6.3 + */ +int ast_rtp_instance_available_formats(struct ast_rtp_instance *instance, int to_endpoint, int to_asterisk); + /*! * \brief Indicate to the RTP engine that packets are now expected to be sent/received on the RTP instance * |