[FFmpeg-devel] Modifying asf-enc.c {Getting few errors}

Benjamin Larsson banan
Mon Sep 29 13:13:00 CEST 2008


Irfan Shaikh wrote:
> Hi all,
>
>       I am modifying asf-enc.c so as to support muxing of H264, MPEG4 and Mjpeg video & G726 audio. I have done following chages to code.
> My undersatnding is if i use standard MACROs from avcodec.h. I can serve my purpose to get an o/p ASF stream.
>
>      I have mentioned //Modified where i have change. I hav mentioned the errors i get at the end ....
>   

Send unified diffs if you want reviews. (diff -u or svn diff)

> static const AVCodecTag codec_asf_bmp_tags[] = {
>     { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
>     { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
>     { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
>     { CODEC_ID_MJPEG, MTAG('M', 'J', 'P', 'G') },          //Modified
>     { CODEC_ID_H264, MKTAG('H', '2', '6', '4') },          //Modified 
>     { CODEC_ID_NONE, 0 },
> };
>
>
>
> At the end of the code
>
> #ifdef CONFIG_ASF_STREAM_MUXER
> AVOutputFormat asf_stream_muxer = {
>     "asf_stream",
>     NULL_IF_CONFIG_SMALL("ASF format"),
>     "video/x-ms-asf",
>     "asf,wmv,wma",
>     sizeof(ASFContext),
> #ifdef CONFIG_LIBMP3LAME
>     CODEC_ID_MP3,
> #else
>     CODEC_ID_MP2,
>     CODEC_ID_ADPCM_G726,                  //Modified  
> #endif
>     CODEC_ID_MSMPEG4V3,
>     CODEC_ID_MPEG4,                       //Modified
>     CODEC_ID_H264,                        //Modified   
>     CODEC_ID_MJPEG,                       //Modified
>   

You can't do this, and if you don't understand why you need to take a C 
programing course.


>     asf_write_stream_header,
>     asf_write_packet,
>     asf_write_trailer,
>     .flags = AVFMT_GLOBALHEADER,
>     .codec_tag= (const AVCodecTag* const []){codec_asf_bmp_tags, codec_bmp_tags, codec_wav_tags, 0},
> };
> #endif //CONFIG_ASF_STREAM_MUXER
>
>   
MvH
Benjamin Larsson






More information about the ffmpeg-devel mailing list