[asterisk-commits] file: branch file/rtp_engine r129112 - in /team/file/rtp_engine: include/aste...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 8 15:10:20 CDT 2008


Author: file
Date: Tue Jul  8 15:10:20 2008
New Revision: 129112

URL: http://svn.digium.com/view/asterisk?view=rev&rev=129112
Log:
Add callback for stopping the RTP session.

Modified:
    team/file/rtp_engine/include/asterisk/rtp_engine.h
    team/file/rtp_engine/main/rtp_engine.c

Modified: team/file/rtp_engine/include/asterisk/rtp_engine.h
URL: http://svn.digium.com/view/asterisk/team/file/rtp_engine/include/asterisk/rtp_engine.h?view=diff&rev=129112&r1=129111&r2=129112
==============================================================================
--- team/file/rtp_engine/include/asterisk/rtp_engine.h (original)
+++ team/file/rtp_engine/include/asterisk/rtp_engine.h Tue Jul  8 15:10:20 2008
@@ -77,6 +77,7 @@
 	int (*new)(struct ast_rtp_instance *instance);                                                  /*!< Callback for creating an RTP instance */
 	int (*destroy)(struct ast_rtp_instance *instance);                                              /*!< Callback for destroying an RTP instance */
 	int (*write)(struct ast_rtp_instance *instance, struct ast_frame *frame);                       /*!< Callback for writing a frame out */
+	void (*stop)(struct ast_rtp_instance *instance);                                                /*!< Callback for stopping the RTP session */
 	int (*dtmf_begin)(struct ast_rtp_instance *instance, char digit);                               /*!< Callback for sending a DTMF digit */
 	int (*dtmf_end)(struct ast_rtp_instance *instance, char digit);                                 /*!< Callback for ending a DTMF digit */
 	void (*new_source)(struct ast_rtp_instance *instance);                                          /*!< Callback for when a new source of audio has come in */
@@ -250,6 +251,9 @@
 /*! \brief Set QoS parameters on an RTP session */
 int ast_rtp_instance_set_qos(struct ast_rtp_instance *instance, int tos, int cos, const char *desc);
 
+/*! \brief Stop an RTP instance */
+void ast_rtp_instance_stop(struct ast_rtp_instance *instance);
+
 #if defined(__cplusplus) || defined(c_plusplus)
 }
 #endif

Modified: team/file/rtp_engine/main/rtp_engine.c
URL: http://svn.digium.com/view/asterisk/team/file/rtp_engine/main/rtp_engine.c?view=diff&rev=129112&r1=129111&r2=129112
==============================================================================
--- team/file/rtp_engine/main/rtp_engine.c (original)
+++ team/file/rtp_engine/main/rtp_engine.c Tue Jul  8 15:10:20 2008
@@ -512,3 +512,12 @@
 {
 	return instance->engine->qos ? instance->engine->qos(instance, tos, cos, desc) : -1;
 }
+
+void ast_rtp_instance_stop(struct ast_rtp_instance *instance)
+{
+	if (instance->engine->stop) {
+		instance->engine->stop(instance);
+	}
+
+	return;
+}




More information about the asterisk-commits mailing list