[Ffmpeg-devel] Including a new codec problem
Eduardo Morras
nec556
Tue Apr 24 15:48:27 CEST 2007
Hello:
I'm making a video codec in ffmpeg. Eveything compiled fine but last weekend i delete and rebuild all ffmpeg source tree from svn and add the codec to it. I follow the instructions on http://wiki.multimedia.cx/index.php?title=FFmpeg_codec_howto but can't compile the codec.
a) add the codec id in avcodec.h ( CODEC_ID_GOG, )
b) registered the decoder and encoder in allcodecs.c (REGISTER_ENCDEC(GOG, gog)
c) add in riff.c { CODEC_ID_GOG, MKTAG('G', 'O', 'G', ' ') }, last '' is 'space'
In gog.c i have the next AVCodec definition (copied from snow and changed snow by gog):
AVCodec gog_decoder = {
"gog",
CODEC_TYPE_VIDEO,
CODEC_ID_GOG,
sizeof(GogContext),
decode_init,
NULL,
decode_end,
decode_frame,
0 /*CODEC_CAP_DR1*/ /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
NULL
};
#ifdef CONFIG_ENCODERS
AVCodec gog_encoder = {
"gog",
CODEC_TYPE_VIDEO,
CODEC_ID_GOG,
sizeof(GogContext),
encode_init,
encode_frame,
encode_end,
};
#endif //CONFIG_ENCODERS
Am i missing something? Register it somewhere else? Before the rebuild i can compile ffmpeg with it and now i get next errors:
make
"/c/cvs/ffmpeg2"/version.sh "/c/cvs/ffmpeg2"
make -C libavutil all
make[1]: Entering directory `/c/cvs/ffmpeg2/libavutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/c/cvs/ffmpeg2/libavutil'
make -C libavcodec all
make[1]: Entering directory `/c/cvs/ffmpeg2/libavcodec'
gcc -I"/c/cvs/ffmpeg2"/libswscale -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/c/cvs/ffmpeg2" -I"/c/cvs/ffmpeg2" -I"/c/cvs/ffmpeg2"/libavutil -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -O3 -c -o allcodecs.o allcodecs.c
In file included from allcodecs.c:27:
avcodec.h:2479: warning: `ImgReSampleContext' is deprecated (declared at avcodec.h:2466)
avcodec.h:2482: warning: `ImgReSampleContext' is deprecated (declared at avcodec.h:2466)
allcodecs.c: In function `avcodec_register_all':
allcodecs.c:162: error: `gog_encoder' undeclared (first use in this function)
allcodecs.c:162: error: (Each undeclared identifier is reported only once
allcodecs.c:162: error: for each function it appears in.)
allcodecs.c:162: error: `gog_decoder' undeclared (first use in this function)
make[1]: *** [allcodecs.o] Error 1
make[1]: Leaving directory `/c/cvs/ffmpeg2/libavcodec'
make: *** [lib] Error 2
O.S. WindowsXP SP2 with MinGW/MSYS
Last SVN.
memalign hacks on
lgpl only
Thanks
*************************************************************************************************************************************************
This document represent my ideas. They are original from me. It's forbidden think the same than me without previous payment.
If you agree me, PAYME. LOOKOUT: Lawyer BITES.
More information about the ffmpeg-devel
mailing list