[vlc-devel] Help making a simple encoder/decoder

Florian pflooo at yahoo.fr
Thu Jul 26 15:55:26 CEST 2007


Hi guys !
In order to get into VLC code I tried to make a simple
encoder and decoder. The encoder would simply copy the
picture to a new block ; the decoder would copy the
block into a new picture.

I wrote the following code for the encoder :

block_t *p_block = NULL;
int picturesize = p_enc->fmt_in.video.i_width *
p_enc-fmt_in.video.i_height * 3 / 2;
p_block = block_New(p_enc, picturesize);
memcpy(p_block->p_buffer,p_pic->p_data, picturesize);
p_block->i_dts = p_block->i_pts = p_pic->date;

And the decoder as follow :

picture_t *p_pic;
p_pic = p_dec->pf_vout_buffer_new( p_dec );
memcpy( p_pic->p_data, p_block->p_buffer,
p_block->i_buffer );
p_pic->date = p_block->i_pts > 0 ? p_block->i_pts :
p_block->i_dts;
block_Release( p_block );

When I try to make a transcode using my new
encoder/decoder, I've got :
"main decoder debug: no usable vout present, spawning
one"
And the movie windows still remains black.

Thanx for your help


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list