[asterisk-commits] rizzo: branch rizzo/video_v2 r85351 - /team/rizzo/video_v2/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 10 11:49:53 CDT 2007
Author: rizzo
Date: Wed Oct 10 11:49:52 2007
New Revision: 85351
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85351
Log:
start adding placeholders for h264
Modified:
team/rizzo/video_v2/channels/console_video.c
Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=85351&r1=85350&r2=85351
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Wed Oct 10 11:49:52 2007
@@ -293,7 +293,8 @@
* The list of video formats we support. You can OR the formats, and
* provide corresponding ffmpeg mappings in the table below.
*/
-#define CONSOLE_FORMAT_VIDEO (AST_FORMAT_H263_PLUS | AST_FORMAT_H263 | AST_FORMAT_H261)
+#define CONSOLE_FORMAT_VIDEO (AST_FORMAT_H263_PLUS | AST_FORMAT_H263 | \
+ AST_FORMAT_H264 | AST_FORMAT_H261)
static AVPicture *fill_pict(struct fbuf_t *b, AVPicture *p);
@@ -1157,7 +1158,7 @@
struct _cm { /* map ffmpeg codec types to asterisk formats */
uint32_t ast_format; /* 0 is a terminator */
enum CodecID codec;
- enum { CM_RD = 1, CM_WR = 2, CM_RDWD = 3 } rw; /* read or write or both ? */
+ enum { CM_RD = 1, CM_WR = 2, CM_RDWR = 3 } rw; /* read or write or both ? */
struct video_codec_desc *codec_desc;
};
@@ -1166,7 +1167,8 @@
{ AST_FORMAT_H263_PLUS, CODEC_ID_H263P, CM_WR },
{ AST_FORMAT_H263, CODEC_ID_H263, CM_RD },
{ AST_FORMAT_H263, CODEC_ID_H263, CM_WR },
- { AST_FORMAT_H261, CODEC_ID_H261, CM_RDWD },
+ { AST_FORMAT_H261, CODEC_ID_H261, CM_RDWR },
+ { AST_FORMAT_H264, CODEC_ID_H264, CM_RDWR },
{ 0, 0, 0 },
};
@@ -1182,9 +1184,22 @@
return CODEC_ID_NONE;
}
+/* XXX placeholder for h264, does not work yet. */
+static struct video_codec_desc h264_codec = {
+ .name = "h264",
+ .format = AST_FORMAT_H264,
+ .enc_init = h263p_enc_init,
+ .enc_encap = h263p_encap,
+ .enc_run = ffmpeg_encode,
+ .dec_init = NULL,
+ .dec_decap = h263p_decap,
+ .dec_run = ffmpeg_decode
+};
+
/* pointers to supported codecs. We assume the first one to be non null. */
static struct video_codec_desc *supported_codecs[] = {
&h263p_codec,
+ &h264_codec,
&h263_codec,
&h261_codec,
NULL
@@ -1908,6 +1923,8 @@
if (!strcasecmp(var, "videodevice")) {
ast_cli(fd, "videodevice is [%s]\n", env->out.videodevice);
+ } else if (!strcasecmp(var, "videoformat")) {
+ ast_cli(fd, "videoformat is [%s]\n", env->codec_name);
} else if (!strcasecmp(var, "video_size")) {
ast_cli(fd, "sizes: video %dx%d camera %dx%d local %dx%d remote %dx%d in %dx%d\n",
env->out.enc_in.w, env->out.enc_in.h,
More information about the asterisk-commits
mailing list