mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-03 20:06:24 +00:00
Add SIP/RTP video support, video enable app_echo, start on RTCP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
20
channel.c
20
channel.c
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Asterisk -- A telephony toolkit for Linux.
|
||||
*
|
||||
* Channel Management
|
||||
@@ -1269,6 +1269,17 @@ int ast_prod(struct ast_channel *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_write_video(struct ast_channel *chan, struct ast_frame *fr)
|
||||
{
|
||||
int res;
|
||||
if (!chan->pvt->write_video)
|
||||
return 0;
|
||||
res = ast_write(chan, fr);
|
||||
if (!res)
|
||||
res = 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_write(struct ast_channel *chan, struct ast_frame *fr)
|
||||
{
|
||||
int res = -1;
|
||||
@@ -1306,6 +1317,13 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
|
||||
if (chan->pvt->send_text)
|
||||
res = chan->pvt->send_text(chan, (char *) fr->data);
|
||||
break;
|
||||
case AST_FRAME_VIDEO:
|
||||
/* XXX Handle translation of video codecs one day XXX */
|
||||
if (chan->pvt->write_video)
|
||||
res = chan->pvt->write_video(chan, fr);
|
||||
else
|
||||
res = 0;
|
||||
break;
|
||||
default:
|
||||
if (chan->pvt->write) {
|
||||
if (chan->pvt->writetrans) {
|
||||
|
||||
Reference in New Issue
Block a user