aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-06-28 16:40:02 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-06-28 16:40:02 +0000
commit63170c4333b792805df5170e43d516b479a75421 (patch)
tree350126d47aecc8eeeaca9794943d8d2640d37670 /include
parentefde31a9908909b35ee154afe257030a56a6c520 (diff)
Add SIP/RTP video support, video enable app_echo, start on RTCP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1128 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/channel.h25
-rwxr-xr-xinclude/asterisk/channel_pvt.h2
-rwxr-xr-xinclude/asterisk/frame.h2
-rwxr-xr-xinclude/asterisk/rtp.h12
4 files changed, 32 insertions, 9 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 03b1fa448..c56a1fc76 100755
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -39,7 +39,7 @@ extern "C" {
#define MAX_LANGUAGE 20
-#define AST_MAX_FDS 4
+#define AST_MAX_FDS 8
struct ast_generator {
void *(*alloc)(struct ast_channel *chan, void *params);
@@ -72,7 +72,13 @@ struct ast_channel {
int writeinterrupt;
/*! Who are we bridged to, if we're bridged */
- struct ast_channel *bridge;
+ struct ast_channel *bridge;
+ /*! Who did we call? */
+ struct ast_channel *dialed;
+ /*! Who called us? */
+ struct ast_channel *dialing;
+ /*! Reverse the dialed link (0 false, 1 true) */
+ int reversedialed;
/*! Channel that will masquerade as us */
struct ast_channel *masq;
/*! Who we are masquerading as */
@@ -122,7 +128,7 @@ struct ast_channel {
/*! Number of rings so far */
int rings;
/*! Current level of application */
- int stack;
+ int stack;
/*! Kinds of data this channel can natively handle */
@@ -199,7 +205,7 @@ struct ast_channel {
unsigned int pickupgroup;
/*! For easy linking */
- struct ast_channel *next;
+ struct ast_channel *next;
};
@@ -452,7 +458,7 @@ int ast_waitfor_n_fd(int *fds, int n, int *ms, int *exception);
//! Reads a frame
-/*!
+/*!
* \param chan channel to read a frame from
* Read a frame. Returns a frame, or NULL on error. If it returns NULL, you
best just stop reading frames and assume the channel has been
@@ -468,6 +474,15 @@ struct ast_frame *ast_read(struct ast_channel *chan);
*/
int ast_write(struct ast_channel *chan, struct ast_frame *frame);
+//! Write video frame to a channel
+/*!
+ * \param chan destination channel of the frame
+ * \param frame frame that will be written
+ * This function writes the given frame to the indicated channel.
+ * It returns 1 on success, 0 if not implemented, and -1 on failure.
+ */
+int ast_write_video(struct ast_channel *chan, struct ast_frame *frame);
+
/* Send empty audio to prime a channel driver */
int ast_prod(struct ast_channel *chan);
diff --git a/include/asterisk/channel_pvt.h b/include/asterisk/channel_pvt.h
index d52a90fc6..366101eea 100755
--- a/include/asterisk/channel_pvt.h
+++ b/include/asterisk/channel_pvt.h
@@ -67,6 +67,8 @@ struct ast_channel_pvt {
int (*queryoption)(struct ast_channel *chan, int option, void *data, int *datalen);
/*! Blind transfer other side */
int (*transfer)(struct ast_channel *chan, char *newdest);
+ /*! Write a frame, in standard format */
+ int (*write_video)(struct ast_channel *chan, struct ast_frame *frame);
};
//! Create a channel structure
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index b0ea7ef0f..37e681024 100755
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -170,6 +170,8 @@ struct ast_frame_chain {
#define AST_FORMAT_H261 (1 << 18)
/*! H.263 Video */
#define AST_FORMAT_H263 (1 << 19)
+/*! Max one */
+#define AST_FORMAT_MAX_VIDEO (1 << 24)
/* Control frame types */
/*! Other end has hungup */
diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h
index c183cb1bd..cc8d24da7 100755
--- a/include/asterisk/rtp.h
+++ b/include/asterisk/rtp.h
@@ -37,8 +37,8 @@ extern "C" {
struct ast_rtp_protocol {
struct ast_rtp *(*get_rtp_info)(struct ast_channel *chan); /* Get RTP struct, or NULL if unwilling to transfer */
- int (*set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer); /* Set RTP peer */
- int (*get_rtp_willing)(struct ast_channel *chan); /* Willing to native bridge */
+ struct ast_rtp *(*get_vrtp_info)(struct ast_channel *chan); /* Get RTP struct, or NULL if unwilling to transfer */
+ int (*set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer, struct ast_rtp *vpeer); /* Set RTP peer */
char *type;
struct ast_rtp_protocol *next;
};
@@ -47,11 +47,11 @@ struct ast_rtp;
typedef int (*ast_rtp_callback)(struct ast_rtp *rtp, struct ast_frame *f, void *data);
-struct ast_rtp *ast_rtp_new(struct sched_context *sched, struct io_context *io);
+struct ast_rtp *ast_rtp_new(struct sched_context *sched, struct io_context *io, int rtcpenable, int callbackmode);
void ast_rtp_set_peer(struct ast_rtp *rtp, struct sockaddr_in *them);
-void ast_rtp_get_peer(struct ast_rtp *rpt, struct sockaddr_in *them);
+void ast_rtp_get_peer(struct ast_rtp *rtp, struct sockaddr_in *them);
void ast_rtp_get_us(struct ast_rtp *rtp, struct sockaddr_in *us);
@@ -65,8 +65,12 @@ int ast_rtp_write(struct ast_rtp *rtp, struct ast_frame *f);
struct ast_frame *ast_rtp_read(struct ast_rtp *rtp);
+struct ast_frame *ast_rtcp_read(struct ast_rtp *rtp);
+
int ast_rtp_fd(struct ast_rtp *rtp);
+int ast_rtcp_fd(struct ast_rtp *rtp);
+
int ast_rtp_senddigit(struct ast_rtp *rtp, char digit);
int ast_rtp_settos(struct ast_rtp *rtp, int tos);