[vlc-devel] How to draw a line in subpicture_t region

Peter Tap ptrtap at yahoo.com
Mon Aug 27 09:27:35 CEST 2012


In the past, I have developed a video filter to write specific text on the screen at various locations while the movie is being played.

I now need to develop a new video filter that will cross out certain regions of a screen. All that is required is to draw two lines of specific sizes. The RGB color to be used for the line is obtained at runtime and varies over time as the movie progresses..

I am trying to understand how I can draw lines in subpicture_t structure.

After looking at various files under modules/video_filter, it appears:

subpicture_t has a field p_picture of type picture_t
picture_t has a field called p of type plane_t
plane_t has a field called p_pixels of type uint8_t*.

Do I have to write RGB values directly into p_pixels? 

Or, is there a drawLine API somewhere that I could use?

I would appreciate your help if you could point me in the right direction.

Best regards,

More information about the vlc-devel mailing list