summaryrefslogtreecommitdiff
path: root/include/asterisk/rtp_engine.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-07-27 19:19:25 -0500
committerRichard Mudgett <rmudgett@digium.com>2015-08-20 11:56:13 -0500
commitf7df3e1a0119c26595adb1cb48bf2beee8b9cf89 (patch)
tree4a602fcd15c34d81129e8a614e8f1393b21ad26e /include/asterisk/rtp_engine.h
parent38854a9f7bb9d741c89629008133172dd1beb8df (diff)
rtp_engine.c: Get current or create a needed rx payload type mapping.
* Make ast_rtp_codecs_payload_code() get the current mapping or create a rx payload type mapping. ASTERISK-25166 Reported by: Kevin Harwell ASTERISK-17410 Reported by: Boris Fox Change-Id: Ia4b2d45877a8f004f6ce3840e3d8afe533384e56
Diffstat (limited to 'include/asterisk/rtp_engine.h')
-rw-r--r--include/asterisk/rtp_engine.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index a52567a13..0f6ec7af6 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -242,17 +242,19 @@ enum ast_rtp_instance_stat {
/*! Structure that represents a payload */
struct ast_rtp_payload_type {
- /*! Is this an Asterisk value */
- int asterisk_format;
/*! If asterisk_format is set, this is the internal
* asterisk format represented by the payload */
struct ast_format *format;
+ /*! Is this an Asterisk value */
+ int asterisk_format;
/*! Actual internal RTP specific value of the payload */
int rtp_code;
/*! Actual payload number */
int payload;
/*! TRUE if this is the primary mapping to the format. */
unsigned int primary_mapping:1;
+ /*! When the payload type became non-primary. */
+ struct timeval when_retired;
};
/* Common RTCP report types */
@@ -1451,8 +1453,13 @@ void ast_rtp_codecs_payload_formats(struct ast_rtp_codecs *codecs, struct ast_fo
* \param format Asterisk format to look for
* \param code The format to look for
*
+ * \details
+ * Find the currently assigned rx mapped payload type based on whether it
+ * is an Asterisk format or non-format code. If one is currently not
+ * assigned then create a rx payload type mapping.
+ *
* \retval Numerical payload type
- * \retval -1 if not found.
+ * \retval -1 if could not assign.
*
* Example usage:
*
@@ -1464,7 +1471,7 @@ void ast_rtp_codecs_payload_formats(struct ast_rtp_codecs *codecs, struct ast_fo
*
* \since 1.8
*/
-int ast_rtp_codecs_payload_code(struct ast_rtp_codecs *codecs, int asterisk_format, const struct ast_format *format, int code);
+int ast_rtp_codecs_payload_code(struct ast_rtp_codecs *codecs, int asterisk_format, struct ast_format *format, int code);
/*!
* \brief Retrieve a tx mapped payload type based on whether it is an Asterisk format and the code