[Ffmpeg-devel] [PATCH] Video generator format

Ramiro Ribeiro Polla ramiro
Thu Apr 26 03:06:27 CEST 2007


Ramiro Ribeiro Polla wrote:
> Hello,
>
> Attached demuxer generates sample videos (just like what 
> output_example does) with user supplied size, rate, and pix_fmt.
>
> It helps a bunch for testing, specially when different pix_fmts are 
> needed.
>
> Test with command line:
> ./ffmpeg_g -s 640x480 -pix_fmt yuyv422 -r 30 -f video_gen -i xxx 
> output.mpg
> (filename doesn't matter)
>
> Currently all planar and 2 packed yuv formats are supported.
>
Updated videogen.c with a few modifications:
>     if( ap->pix_fmt == -1 )
>     {
>         av_log( s, AV_LOG_ERROR, "pix_fmt must be supplied\n" );
>         return -1;
>     }
>
>
>   
used PIX_FMT_NONE instead of -1
[...]
> static int video_gen_read_close( AVFormatContext *s )
> {
>     return 0;
> }
>
> AVInputFormat video_gen_demuxer = {
>     "video_gen",
>     "video generator",
>     sizeof(video_gen_ctx),
>     NULL,
>     video_gen_read_header,
>     video_gen_read_packet,
>     video_gen_read_close,
>     .flags = AVFMT_NOFILE,
> };
>   

removed unnecessary video_gen_read_close

Ramiro Polla
-------------- next part --------------
A non-text attachment was scrubbed...
Name: videogen.c
Type: text/x-csrc
Size: 4874 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070425/e06e9adb/attachment.c>



More information about the ffmpeg-devel mailing list