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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 8 13:45:31 CDT 2008


Author: file
Date: Tue Jul  8 13:45:30 2008
New Revision: 129108

URL: http://svn.digium.com/view/asterisk?view=rev&rev=129108
Log:
Add a callback for setting QoS parameters.

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=129108&r1=129107&r2=129108
==============================================================================
--- team/file/rtp_engine/include/asterisk/rtp_engine.h (original)
+++ team/file/rtp_engine/include/asterisk/rtp_engine.h Tue Jul  8 13:45:30 2008
@@ -84,6 +84,7 @@
 	void (*payload_set)(struct ast_rtp_instance *instance, int payload, int AstFormat, int format); /*!< Callback for when a payload is set */
 	void (*packetization_set)(struct ast_rtp_instance *instance, struct ast_codec_pref *pref);      /*!< Callback for setting codec packetization preferences */
 	int (*get_stats)(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats);      /*!< Callback for retrieving statistics about the session */
+	int (*qos)(struct ast_rtp_instance *instance, int tos, int cos, const char *desc);              /*!< Callback for setting QoS parameters on the RTP session */
 	struct ast_frame *(*read)(struct ast_rtp_instance *instance);                                   /*!< Callback for reading a frame in */
 	enum ast_bridge_result (*bridge)(struct ast_rtp_instance *instance0, struct ast_rtp_instance *instance1); /*!< Callback for bridging two RTP instances together */
 	AST_RWLIST_ENTRY(ast_rtp_engine) entry;                                                         /*!< Linked list information */
@@ -101,6 +102,7 @@
 	int properties[AST_RTP_PROPERTY_MAX];                 /*!< Properties and their values */
 	struct sockaddr_in local_address;                     /*!< The address we are expecting RTP to be received on */
 	struct sockaddr_in remote_address;                    /*!< The address we are sending RTP to */
+	struct ast_rtp_instance *bridged;                     /*!< Who we are directly bridged to */
 	struct ast_rtp_codecs codecs;                         /*!< Codec information */
 	int timeout;                                          /*!< RTP timeout time (negative or zero means disabled, negative value means temporarily disabled) */
 	int holdtimeout;                                      /*!< RTP timeout when on hold (negative or zero means disabled, negative value means temporarily disabled). */
@@ -245,6 +247,9 @@
 /*! \brief Indicate a new source of audio has dropped in */
 void ast_rtp_instance_new_source(struct ast_rtp_instance *instance);
 
+/*! \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);
+
 #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=129108&r1=129107&r2=129108
==============================================================================
--- team/file/rtp_engine/main/rtp_engine.c (original)
+++ team/file/rtp_engine/main/rtp_engine.c Tue Jul  8 13:45:30 2008
@@ -507,3 +507,8 @@
 
 	return;
 }
+
+int ast_rtp_instance_set_qos(struct ast_rtp_instance *instance, int tos, int cos, const char *desc)
+{
+	return instance->engine->qos ? instance->engine->qos(instance, tos, cos, desc) : -1;
+}




More information about the asterisk-commits mailing list