Page 1 of 1

Codec for drawing shapes on a VLC video

Posted: 15 Oct 2008 00:37
by SunnySingh
Hi,

I am getting 2 tracks from a stream one of which is video and the other some properitory data.
The propertitory data contains coordinates to fray some shapes like lines and rectangles.
I am able to set the FOURCC code for the tracks being received (say i set it to 'S','U','N','4') and I modified the codec modules\codec\svcdsub.c to identify itself as the decoder for my properitory track.

Now I want to draw the shapes .... from the code in svcdsub.c, I gather that i need to create a "subpicture_t" unit fron the data that I receive in the decoder. If I have the coordinates corresponding to the ends of a line say, x1, y1, x2, y2, would there be an example I can refer to for create a "subpicture_t" unit that represents a line?

Regards,
Sunny

Re: Codec for drawing shapes on a VLC video

Posted: 15 Oct 2008 00:57
by Jean-Baptiste Kempf
Look at the OSD code.

Re: Codec for drawing shapes on a VLC video

Posted: 16 Oct 2008 01:57
by SunnySingh
Thanks j-b, that did help.

I am trying to write a decoder for the data I am receiving. However, I see a crash in the "static int DecoderDecode( decoder_t *p_dec, block_t *p_block )"function of src/input/decoder.c during the check "if( p_dec->p_owner->p_packetizer )" Not sure what I am doing wrong. Any thoughts?

Would there be a guide that I can refer to write decoders?

Would appreciate your help.

Re: Codec for drawing shapes on a VLC video

Posted: 16 Oct 2008 02:18
by Jean-Baptiste Kempf
Thanks j-b, that did help.

I am trying to write a decoder for the data I am receiving. However, I see a crash in the "static int DecoderDecode( decoder_t *p_dec, block_t *p_block )"function of src/input/decoder.c during the check "if( p_dec->p_owner->p_packetizer )" Not sure what I am doing wrong. Any thoughts?

Would there be a guide that I can refer to write decoders?

Would appreciate your help.
Use gdb to backtrace the crash... :D

There is no much doc on decoders since it changes very often, but take an easy one and leanr from it.