[asterisk-commits] jrose: branch jrose/bridge_projects r386402 - in /team/jrose/bridge_projects:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 23 17:57:22 CDT 2013


Author: jrose
Date: Tue Apr 23 17:57:15 2013
New Revision: 386402

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386402
Log:
update from bridge_construction because I'm impatient.

Modified:
    team/jrose/bridge_projects/   (props changed)
    team/jrose/bridge_projects/include/asterisk/bridging.h
    team/jrose/bridge_projects/main/bridging.c

Propchange: team/jrose/bridge_projects/
------------------------------------------------------------------------------
--- bridge_projects-integrated (original)
+++ bridge_projects-integrated Tue Apr 23 17:57:15 2013
@@ -1,1 +1,1 @@
-/team/group/bridge_construction:1-386379
+/team/group/bridge_construction:1-386400

Modified: team/jrose/bridge_projects/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/include/asterisk/bridging.h?view=diff&rev=386402&r1=386401&r2=386402
==============================================================================
--- team/jrose/bridge_projects/include/asterisk/bridging.h (original)
+++ team/jrose/bridge_projects/include/asterisk/bridging.h Tue Apr 23 17:57:15 2013
@@ -1112,6 +1112,16 @@
 void ast_bridge_channel_queue_app(struct ast_bridge_channel *bridge_channel, const char *app_name, const char *app_args, const char *moh_class);
 
 /*!
+ * \brief Custom interpretation of the playfile name.
+ *
+ * \param bridge_channel Which channel to play the file on
+ * \param playfile Sound filename to play.
+ *
+ * \return Nothing
+ */
+typedef void (*ast_bridge_custom_play_fn)(struct ast_bridge_channel *bridge_channel, const char *playfile);
+
+/*!
  * \brief Play a file on the bridge channel.
  * \since 12.0.0
  *
@@ -1126,7 +1136,7 @@
  *
  * \return Nothing
  */
-void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class);
+void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class);
 
 /*!
  * \brief Write a bridge action play file frame into the bridge.
@@ -1143,7 +1153,7 @@
  *
  * \return Nothing
  */
-void ast_bridge_channel_write_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class);
+void ast_bridge_channel_write_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class);
 
 /*!
  * \brief Queue a bridge action play file frame onto the bridge channel.
@@ -1160,7 +1170,7 @@
  *
  * \return Nothing
  */
-void ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class);
+void ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class);
 
 /*!
  * \brief Restore the formats of a bridge channel's channel to how they were before bridge_channel_join

Modified: team/jrose/bridge_projects/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/main/bridging.c?view=diff&rev=386402&r1=386401&r2=386402
==============================================================================
--- team/jrose/bridge_projects/main/bridging.c (original)
+++ team/jrose/bridge_projects/main/bridging.c Tue Apr 23 17:57:15 2013
@@ -831,7 +831,7 @@
 		bridge_channel, app_name, app_args, moh_class);
 }
 
-void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class)
+void ast_bridge_channel_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
 {
 	if (moh_class) {
 		if (ast_strlen_zero(moh_class)) {
@@ -843,7 +843,7 @@
 		}
 	}
 	if (custom_play) {
-		custom_play(playfile);
+		custom_play(bridge_channel, playfile);
 	} else {
 		ast_stream_and_wait(bridge_channel->chan, playfile, AST_DIGIT_NONE);
 	}
@@ -866,7 +866,7 @@
 
 struct bridge_playfile {
 	/*! Call this function to play the playfile. (NULL if normal sound file to play) */
-	void (*custom_play)(const char *playfile);
+	ast_bridge_custom_play_fn custom_play;
 	/*! Offset into playfile[] where the MOH class name starts.  (zero if no MOH)*/
 	int moh_offset;
 	/*! Filename to play. */
@@ -890,7 +890,7 @@
 }
 
 static void payload_helper_playfile(ast_bridge_channel_post_action_data post_it,
-	struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class)
+	struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
 {
 	struct bridge_playfile *payload;
 	size_t len_name = strlen(playfile) + 1;
@@ -909,13 +909,13 @@
 	post_it(bridge_channel, AST_BRIDGE_ACTION_PLAY_FILE, payload, len_payload);
 }
 
-void ast_bridge_channel_write_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class)
+void ast_bridge_channel_write_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
 {
 	payload_helper_playfile(ast_bridge_channel_write_action_data,
 		bridge_channel, custom_play, playfile, moh_class);
 }
 
-void ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, void (*custom_play)(const char *playfile), const char *playfile, const char *moh_class)
+void ast_bridge_channel_queue_playfile(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_play_fn custom_play, const char *playfile, const char *moh_class)
 {
 	payload_helper_playfile(ast_bridge_channel_queue_action_data,
 		bridge_channel, custom_play, playfile, moh_class);




More information about the asterisk-commits mailing list