[asterisk-commits] file: trunk r212161 - in /trunk: include/asterisk/rtp_engine.h main/rtp_engine.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 13 11:44:57 CDT 2009


Author: file
Date: Thu Aug 13 11:44:54 2009
New Revision: 212161

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=212161
Log:
Add an API call for retrieving the engine in use by an RTP instance.

Modified:
    trunk/include/asterisk/rtp_engine.h
    trunk/main/rtp_engine.c

Modified: trunk/include/asterisk/rtp_engine.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/rtp_engine.h?view=diff&rev=212161&r1=212160&r2=212161
==============================================================================
--- trunk/include/asterisk/rtp_engine.h (original)
+++ trunk/include/asterisk/rtp_engine.h Thu Aug 13 11:44:54 2009
@@ -1639,6 +1639,25 @@
  */
 int ast_rtp_instance_get_hold_timeout(struct ast_rtp_instance *instance);
 
+/*!
+ * \brief Get the RTP engine in use on an RTP instance
+ *
+ * \param instance The RTP instance
+ *
+ * \retval pointer to the engine
+ *
+ * Example usage:
+ *
+ * \code
+ * struct ast_rtp_engine *engine = ast_rtp_instance_get_engine(instance);
+ * \endcode
+ *
+ * This gets the RTP engine currently in use on the RTP instance pointed to by 'instance'.
+ *
+ * \since 1.6.3
+ */
+struct ast_rtp_engine *ast_rtp_instance_get_engine(struct ast_rtp_instance *instance);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: trunk/main/rtp_engine.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/rtp_engine.c?view=diff&rev=212161&r1=212160&r2=212161
==============================================================================
--- trunk/main/rtp_engine.c (original)
+++ trunk/main/rtp_engine.c Thu Aug 13 11:44:54 2009
@@ -1615,3 +1615,8 @@
 {
 	return instance->holdtimeout;
 }
+
+struct ast_rtp_engine *ast_rtp_instance_get_engine(struct ast_rtp_instance *instance)
+{
+	return instance->engine;
+}




More information about the asterisk-commits mailing list