Page 1 of 1

draw rectangle over video

Posted: Tue Nov 26, 2019 10:08 pm
by tovee
Hello

I'm trying to figure out if wxwidgets can do what i want.
I want to make something like this but over a video
https://fengyuanchen.github.io/cropperjs/
Image

Can this be possible using wxwidgets?
If its possible can you point me some directions?

Thanks

Re: draw rectangle over video

Posted: Tue Nov 26, 2019 10:46 pm
by doublemax
There is no straight-forward way to do this with wxWidgets methods alone. Try libvlc. AFAIK you can register a callback that gives you each video frame as RGB (or in another format) data. Then you could draw this onto a window and draw custom content on top. You can try this in a small sample in plain C++ on the platform you work on. If this works, you can embed this solution into wxWidgets and use wxWidgets to build the GUI around it.

Re: draw rectangle over video

Posted: Tue Nov 26, 2019 10:58 pm
by ONEEYEMAN
Hi,
Try using wxOverlay.

Thank you.

Re: draw rectangle over video

Posted: Tue Nov 26, 2019 11:26 pm
by tovee
doublemax wrote: Tue Nov 26, 2019 10:46 pm There is no straight-forward way to do this with wxWidgets methods alone. Try libvlc. AFAIK you can register a callback that gives you each video frame as RGB (or in another format) data. Then you could draw this onto a window and draw custom content on top. You can try this in a small sample in plain C++ on the platform you work on. If this works, you can embed this solution into wxWidgets and use wxWidgets to build the GUI around it.
Thanks for the tip, will look into libvlc
ONEEYEMAN wrote: Tue Nov 26, 2019 10:58 pm Hi,
Try using wxOverlay.

Thank you.
Thanks for tip, will look into it too.

Re: draw rectangle over video

Posted: Wed Nov 27, 2019 12:47 am
by New Pagodi
I agree with doublemax. I think libvlc is your best (and maybe only) possibility.