[asterisk-commits] rizzo: branch rizzo/video_v2 r85514 - /team/rizzo/video_v2/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 12 05:39:23 CDT 2007
Author: rizzo
Date: Fri Oct 12 05:39:22 2007
New Revision: 85514
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85514
Log:
decoding mpeg4 does not require the parser
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=85514&r1=85513&r2=85514
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Fri Oct 12 05:39:22 2007
@@ -1107,6 +1107,18 @@
return fbuf_append(b, data, len, 0, 0);
}
+static int mpeg4_decode(struct video_in_desc *v, struct fbuf_t *b)
+{
+ int dummy;
+ int ret = avcodec_decode_video(v->dec_ctx, v->frame, &dummy,
+ b->data, b->used);
+ if (ret < 0) {
+ ast_log(LOG_NOTICE, "Error decoding\n");
+ return 0;
+ }
+ return 1;
+}
+
static struct video_codec_desc mpeg4_codec = {
.name = "mpeg4",
.format = AST_FORMAT_MP4_VIDEO,
@@ -1115,7 +1127,7 @@
.enc_run = ffmpeg_encode,
.dec_init = NULL,
.dec_decap = mpeg4_decap,
- .dec_run = ffmpeg_decode
+ .dec_run = mpeg4_decode
};
/*------ end codec specific code -----*/
More information about the asterisk-commits
mailing list