wxWidgets and XVideo-Overlay

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
smf
Knows some wx things
Knows some wx things
Posts: 32
Joined: Wed Nov 12, 2008 7:04 pm

wxWidgets and XVideo-Overlay

Post by smf » Mon May 17, 2010 4:37 pm

Hi,

I am writing an application (wxGTK) which should display a realtime-preview of a miniDV-Cam in a wxFrame-based dialog.

While this actually works, it consumes to much CPU for my taste... So, I wonder if there is the possibility of using a video-overly such like xv for this.

What I currently do is using a wxImage for the task, so I get it's data-pointer via wxImage::GetData(), forward this to the cam-thread and let it alter the RGB-data directly. In case of a frame-change being flagged, I do a Refresh() which in fact re-blits the wxImage to the propper location...

I am pretty sure that using xv for that task would dramatically decrease CPU-Load (the X-Server consumes 70% of the CPUs for blitting the imagedata with 25Hz...).

Problem with that: While I do know how to set up a native X11-Window using xv, I really have no clue at all of how to do that from within wxWidgets for a (placeholder?) widget within a dialog...

Has anyone ever done something like that? Google-ing arround didn't reveal any usable starting-point-resources.

cu
Stefan

PS: wxMediaCtrl is not an option for what I am trying to do as I have raw imagedata to display not a media-file...

Post Reply