some problem compiling on Ubuntu 9.04
I found some problems building breve:
first is because of new version of libavformat - there is no img_convert()
I suggest to change simulation/movie.cc (hope it will work)
//.....
int slMovieEncodeFrame( slMovie *m ) {
AVCodecContext *c;
int size;
if ( !m ) return -1;
c = m->_context;
/*
* Colorspace conversion from RGB to codec's format (likely YUV420P).
* OpenGL's RGB pixel format is RGB24 in lavc.
*/
/*it's not working now with new libavformat versions =(
img_convert(( AVPicture * )m->_yuv_pic, c->pix_fmt,
( AVPicture * )m->_rgb_pic, PIX_FMT_RGB24, c->width, c->height );
*/
/*this should work =)
begin of img_convert() replacement*/
static int sws_flags = SWS_BICUBIC;
static struct SwsContext *img_convert_ctx;
img_convert_ctx = sws_getContext( c->width,
c->height,
PIX_FMT_RGB24,
c->width,
c->height,
c->pix_fmt,
sws_flags, NULL, NULL, NULL);
sws_scale( img_convert_ctx,
m->_rgb_pic->data,
m->_rgb_pic->linesize,
0,
c->height,
m->_yuv_pic->data,
m->_yuv_pic->linesize);
sws_freeContext(img_convert_ctx);
/*end of img_convert() replacement*/
/* Encode the frame yuv_pic storing the output in enc_buf. */
size = avcodec_encode_video( c, m->_enc_buf, m->_enc_len, m->_yuv_pic );
if ( size ) fwrite( m->_enc_buf, 1, size, m->_fp );
return 0;
}
//....
and in include/breve/movie.h changed to:
//......
extern "C" {
#include
#include
}
//......
also add -lswscale to makefile
but I can't test it beacause I still have problems with
bin/breve.o: In function `main':
/home/eugenios/breve_2.7_source/bin/breve.cc:160: undefined reference to `slFormatText(char*)'
steve/steveparse.tab.o: In function `yyparse()':
/home/eugenios/breve_2.7_source/steve/steveparse.tab.c:2718: undefined reference to `yyerror(char*)'
/home/eugenios/breve_2.7_source/steve/steveparse.tab.c:1204: undefined reference to `yylex()'
/home/eugenios/breve_2.7_source/steve/steveparse.tab.c:2684: undefined reference to `yylex()'
/home/eugenios/breve_2.7_source/steve/steveparse.tab.c:1243: undefined reference to `yyerror(char*)'
steve/steveparse.tab.o: In function `yyparse()':
/home/eugenios/breve_2.7_source/steve/steveparse.y:1194: undefined reference to `lineno'
/home/eugenios/breve_2.7_source/steve/steveparse.y:1194: undefined reference to `yyfile'
/home/eugenios/breve_2.7_source/steve/steveparse.y:1155: undefined reference to `lineno'
/home/eugenios/breve_2.7_source/steve/steveparse.y:1155: undefined reference to `yyfile'
...................
- Login to post comments
