aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2011-07-22 16:44:20 +0200
committerPatrick McHardy <kaber@trash.net>2011-07-22 16:44:20 +0200
commit2b9be10b177024bd663bd5fce19ea0fb76260c27 (patch)
treef6c296350683ee94c120213bef57e14fd153b23a /include/asterisk
parent916e420bf0c8db7a8cb1f60557cd2807652142cf (diff)
parent28da2a199d7e1624ac56ccb27d3671117f4e2717 (diff)
Merge branch 'master' of 192.168.0.100:/repos/git/asteriskHEADmaster
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/bridging.h13
-rw-r--r--include/asterisk/celt.h37
-rw-r--r--include/asterisk/dsp.h3
-rw-r--r--include/asterisk/extconf.h2
-rw-r--r--include/asterisk/format.h2
-rw-r--r--include/asterisk/jingle.h1
-rw-r--r--include/asterisk/linkedlists.h9
-rw-r--r--include/asterisk/netsock2.h2
-rw-r--r--include/asterisk/pbx.h2
-rw-r--r--include/asterisk/rtp_engine.h4
10 files changed, 68 insertions, 7 deletions
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h
index 849f88741..54137b028 100644
--- a/include/asterisk/bridging.h
+++ b/include/asterisk/bridging.h
@@ -190,6 +190,9 @@ struct ast_bridge_video_talker_src_data {
/*! Only accept video coming from this channel */
struct ast_channel *chan_vsrc;
int average_talking_energy;
+
+ /*! Current talker see's this person */
+ struct ast_channel *chan_old_vsrc;
};
struct ast_bridge_video_mode {
@@ -528,7 +531,17 @@ void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge);
void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame);
/*!
+ * \brief Returns the number of video sources currently active in the bridge
+ */
+int ast_bridge_number_video_src(struct ast_bridge *bridge);
+
+/*!
* \brief Determine if a channel is a video src for the bridge
+ *
+ * \retval 0 Not a current video source of the bridge.
+ * \retval None 0, is a video source of the bridge, The number
+ * returned represents the priority this video stream has
+ * on the bridge where 1 is the highest priority.
*/
int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan);
diff --git a/include/asterisk/celt.h b/include/asterisk/celt.h
new file mode 100644
index 000000000..815525a7b
--- /dev/null
+++ b/include/asterisk/celt.h
@@ -0,0 +1,37 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * David Vossel <dvossel@digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief CELT Format Attributes
+ *
+ * \author David Vossel <dvossel@digium.com>
+ */
+#ifndef _AST_FORMAT_CELT_H_
+#define _AST_FORMAT_CELT_H_
+
+#define AST_CELT_DEFAULT_FRAME_SIZE 480
+
+/*! CELT format attribute key value pairs, all are accessible through ast_format_get_value()*/
+enum celt_attr_keys {
+ CELT_ATTR_KEY_SAMP_RATE, /*!< value is an unsigned integer representing sample rate */
+ CELT_ATTR_KEY_MAX_BITRATE, /*!< value is an int */
+ CELT_ATTR_KEY_FRAME_SIZE, /*!< value is an int */
+};
+
+#endif /* _AST_FORMAT_CELT_H */
diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h
index 333415200..78c9a74ac 100644
--- a/include/asterisk/dsp.h
+++ b/include/asterisk/dsp.h
@@ -45,7 +45,8 @@
#define DSP_FAXMODE_DETECT_CNG (1 << 0)
#define DSP_FAXMODE_DETECT_CED (1 << 1)
-#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED)
+#define DSP_FAXMODE_DETECT_V21 (1 << 2)
+#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED | DSP_FAXMODE_DETECT_V21)
#define DSP_TONE_STATE_SILENCE 0
#define DSP_TONE_STATE_RINGING 1
diff --git a/include/asterisk/extconf.h b/include/asterisk/extconf.h
index a5d36ad23..1a04b01bf 100644
--- a/include/asterisk/extconf.h
+++ b/include/asterisk/extconf.h
@@ -111,7 +111,7 @@ struct ast_exten {
char stuff[0];
};
/* from pbx.h */
-typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
+typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data);
struct ast_timing {
int hastime; /*!< If time construct exists */
unsigned int monthmask; /*!< Mask for month */
diff --git a/include/asterisk/format.h b/include/asterisk/format.h
index 67e4178a2..d0f1021d5 100644
--- a/include/asterisk/format.h
+++ b/include/asterisk/format.h
@@ -28,6 +28,7 @@
#include "asterisk/astobj2.h"
#include "asterisk/silk.h"
+#include "asterisk/celt.h"
#define AST_FORMAT_ATTR_SIZE 128
#define AST_FORMAT_INC 100000
@@ -99,6 +100,7 @@ enum ast_format_id {
/*! Raw 16-bit Signed Linear (192000 Hz) PCM. maybe we're taking this too far. */
AST_FORMAT_SLINEAR192 = 27 + AST_FORMAT_TYPE_AUDIO,
AST_FORMAT_SPEEX32 = 28 + AST_FORMAT_TYPE_AUDIO,
+ AST_FORMAT_CELT = 29 + AST_FORMAT_TYPE_AUDIO,
/*! H.261 Video */
AST_FORMAT_H261 = 1 + AST_FORMAT_TYPE_VIDEO,
diff --git a/include/asterisk/jingle.h b/include/asterisk/jingle.h
index bbe86c8f2..77820654c 100644
--- a/include/asterisk/jingle.h
+++ b/include/asterisk/jingle.h
@@ -44,6 +44,7 @@
#define JINGLE_DTMF_NS "urn:xmpp:tmp:jingle:dtmf"
#define GOOGLE_NS "http://www.google.com/session"
+#define GOOGLE_JINGLE_NS "urn:xmpp:jingle:1"
#define GOOGLE_AUDIO_NS "http://www.google.com/session/phone"
#define GOOGLE_VIDEO_NS "http://www.google.com/session/video"
#define GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p"
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h
index 8e86470f5..4c9e27b28 100644
--- a/include/asterisk/linkedlists.h
+++ b/include/asterisk/linkedlists.h
@@ -838,7 +838,10 @@ struct { \
*/
#define AST_LIST_REMOVE(head, elm, field) ({ \
__typeof(elm) __res = NULL; \
- if ((head)->first == (elm)) { \
+ __typeof(elm) __tmp = elm; \
+ if (!__tmp) { \
+ __res = NULL; \
+ } else if ((head)->first == (elm)) { \
__res = (head)->first; \
(head)->first = (elm)->field.next; \
if ((head)->last == (elm)) \
@@ -854,7 +857,9 @@ struct { \
(head)->last = curelm; \
} \
} \
- (elm)->field.next = NULL; \
+ if (__res) { \
+ (__res)->field.next = NULL; \
+ } \
(__res); \
})
diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h
index afb1ea90f..83af23a97 100644
--- a/include/asterisk/netsock2.h
+++ b/include/asterisk/netsock2.h
@@ -453,7 +453,7 @@ int ast_sockaddr_is_ipv4(const struct ast_sockaddr *addr);
int ast_sockaddr_is_ipv4_mapped(const struct ast_sockaddr *addr);
/*!
- * \since 1.10
+ * \since 10.0
*
* \brief
* Determine if an IPv4 address is a multicast address
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 1489ee2d6..36bc0724c 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -76,7 +76,7 @@ struct ast_ignorepat;
struct ast_sw;
/*! \brief Typedef for devicestate and hint callbacks */
-typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
+typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data);
/*! \brief Data structure associated with a custom dialplan function */
struct ast_custom_function {
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index e04303ca6..7e27f5a82 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -349,6 +349,8 @@ struct ast_rtp_engine {
void (*alt_remote_address_set)(struct ast_rtp_instance *instance, struct ast_sockaddr *sa);
/*! Callback for changing DTMF mode */
int (*dtmf_mode_set)(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode);
+ /*! Callback for getting DTMF mode */
+ enum ast_rtp_dtmf_mode (*dtmf_mode_get)(struct ast_rtp_instance *instance);
/*! Callback for retrieving statistics */
int (*get_stat)(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat);
/*! Callback for setting QoS values */
@@ -1059,7 +1061,7 @@ struct ast_rtp_payload_type ast_rtp_codecs_payload_lookup(struct ast_rtp_codecs
* \retval pointer to format structure on success
* \retval NULL on failure
*
- * \since 1.10
+ * \since 10.0
*/
struct ast_format *ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload);