[svn-commits] file: branch file/rtp_engine r138077 - in /team/file/rtp_engine: include/aste...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 15 11:14:15 CDT 2008


Author: file
Date: Fri Aug 15 11:14:15 2008
New Revision: 138077

URL: http://svn.digium.com/view/asterisk?view=rev&rev=138077
Log:
Add the concept of extended properties. These are engine level specific.

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=138077&r1=138076&r2=138077
==============================================================================
--- team/file/rtp_engine/include/asterisk/rtp_engine.h (original)
+++ team/file/rtp_engine/include/asterisk/rtp_engine.h Fri Aug 15 11:14:15 2008
@@ -298,6 +298,10 @@
 	int (*dtmf_end)(struct ast_rtp_instance *instance, char digit);
 	/*! Callback to indicate that a new source of media has come in */
 	void (*new_source)(struct ast_rtp_instance *instance);
+	/*! Callback for setting an extended RTP property */
+	int (*extended_prop_set)(struct ast_rtp_instance *instance, int property, void *value);
+	/*! Callback for getting an extended RTP property */
+	void *(*extended_prop_get)(struct ast_rtp_instance *instance, int property);
 	/*! Callback for setting an RTP property */
 	void (*prop_set)(struct ast_rtp_instance *instance, enum ast_rtp_property property, int value);
 	/*! Callback for setting a payload */
@@ -578,6 +582,23 @@
  */
 int ast_rtp_instance_get_remote_address(struct ast_rtp_instance *instance, struct sockaddr_in *address);
 
+/*! \brief Set the value of an RTP instance extended property
+ *
+ * \param instance The RTP instance to set the extended property on
+ * \param property The extended property to set
+ * \param value The value to set the extended property to
+ *
+ */
+void ast_rtp_instance_set_extended_prop(struct ast_rtp_instance *instance, int property, void *value);
+
+/*! \brief Get the value of an RTP instance extended property
+ *
+ * \param instance The RTP instance to get the extended property on
+ * \param property The extended property to get
+ *
+ */
+void *ast_rtp_instance_get_extended_prop(struct ast_rtp_instance *instance, int property);
+
 /*! \brief Set the value of an RTP instance property
  *
  * \param instance The RTP instance to set the property on

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=138077&r1=138076&r2=138077
==============================================================================
--- team/file/rtp_engine/main/rtp_engine.c (original)
+++ team/file/rtp_engine/main/rtp_engine.c Fri Aug 15 11:14:15 2008
@@ -368,6 +368,22 @@
 	}
 
 	return 0;
+}
+
+void ast_rtp_instance_set_extended_prop(struct ast_rtp_instance *instance, int property, void *value)
+{
+	if (instance->engine->extended_prop_set) {
+		instance->engine->extended_prop_set(instance, property, value);
+	}
+}
+
+void *ast_rtp_instance_get_extended_prop(struct ast_rtp_instance *instance, int property)
+{
+	if (instance->engine->extended_prop_get) {
+		return instance->engine->extended_prop_get(instance, property);
+	}
+
+	return NULL;
 }
 
 void ast_rtp_instance_set_prop(struct ast_rtp_instance *instance, enum ast_rtp_property property, int value)




More information about the svn-commits mailing list