[svn-commits] trunk r35365 - /trunk/channels/chan_agent.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Jun 21 13:11:10 MST 2006
Author: oej
Date: Wed Jun 21 15:11:09 2006
New Revision: 35365
URL: http://svn.digium.com/view/asterisk?rev=35365&view=rev
Log:
Add video support to chan_agent.
More ideas for developing better video support in Asterisk?
Join the asterisk-video mailing list to help out in the
Asterisk Video Task Force!
Modified:
trunk/channels/chan_agent.c
Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?rev=35365&r1=35364&r2=35365&view=diff
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Wed Jun 21 15:11:09 2006
@@ -263,6 +263,7 @@
.answer = agent_answer,
.read = agent_read,
.write = agent_write,
+ .write_video = agent_write,
.send_html = agent_sendhtml,
.send_text = agent_sendtext,
.exception = agent_read,
@@ -503,7 +504,8 @@
}
break;
case AST_FRAME_VOICE:
- /* don't pass voice until the call is acknowledged */
+ case AST_FRAME_VIDEO:
+ /* don't pass voice or video until the call is acknowledged */
if (!p->acknowledged) {
ast_frfree(f);
f = &ast_null_frame;
@@ -554,16 +556,20 @@
int res = -1;
CHECK_FORMATS(ast, p);
ast_mutex_lock(&p->lock);
- if (p->chan) {
+ if (!p->chan)
+ res = 0;
+ else {
if ((f->frametype != AST_FRAME_VOICE) ||
+ (f->frametype != AST_FRAME_VIDEO) ||
(f->subclass == p->chan->writeformat)) {
res = ast_write(p->chan, f);
} else {
- ast_log(LOG_DEBUG, "Dropping one incompatible voice frame on '%s' to '%s'\n", ast->name, p->chan->name);
+ ast_log(LOG_DEBUG, "Dropping one incompatible %s frame on '%s' to '%s'\n",
+ f->frametype == AST_FRAME_VOICE ? "audio" : "video",
+ ast->name, p->chan->name);
res = 0;
}
- } else
- res = 0;
+ }
CLEANUP(ast, p);
ast_mutex_unlock(&p->lock);
return res;
More information about the svn-commits
mailing list