Codec for drawing shapes on a VLC video

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
SunnySingh
New Cone
New Cone
Posts: 5
Joined: 03 Oct 2008 02:46

Codec for drawing shapes on a VLC video

Postby SunnySingh » 15 Oct 2008 00:37

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Codec for drawing shapes on a VLC video

Postby Jean-Baptiste Kempf » 15 Oct 2008 00:57

Look at the OSD code.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

SunnySingh
New Cone
New Cone
Posts: 5
Joined: 03 Oct 2008 02:46

Re: Codec for drawing shapes on a VLC video

Postby SunnySingh » 16 Oct 2008 01:57

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.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Codec for drawing shapes on a VLC video

Postby Jean-Baptiste Kempf » 16 Oct 2008 02:18

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.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 134 guests