[vlc] Programming question about VLC video rendering

Ricardo Garcia rick.g777 at gmail.com
Sun Jan 4 08:00:08 CET 2009


Hello. My name's Rick Garcia and I'm working on a cross-platform Video
Editor called Saya (http://sayavideoeditor.sourceforge.net/ ). The
reason I'm writing to you is that I'm using wxWidgets as the UI, and
VLC also uses wxWidgets, so perhaps you could help me with this.

I'm having trouble getting smooth video output for a wxPanel. I'm
trying to do the drawing from a background thread, but I'm afraid I
can't use the wxDC objects because they're not thread-safe. The best I
can do is to trigger an idle event and do the painting from the idle
event handler. But whenever I open a Menu, video freezes or stutters.

It was then that I remembered that VLC used wxwidgets, so I tried
doing the same, and to my surprise, no freezes happen in VLC. So,
what's your secret? How exactly do you paint directly to the window
without using wxWidgets objects? Will I need to deal directly with GTK
on Linux to do that?

Any help will be appreciated.

Sincerely,
Rick Garcia.



More information about the vlc mailing list