draw rectangle over video

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
tovee
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Nov 26, 2019 9:56 pm

draw rectangle over video

Post 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
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: draw rectangle over video

Post 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.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: draw rectangle over video

Post by ONEEYEMAN »

Hi,
Try using wxOverlay.

Thank you.
tovee
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Nov 26, 2019 9:56 pm

Re: draw rectangle over video

Post 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.
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: draw rectangle over video

Post by New Pagodi »

I agree with doublemax. I think libvlc is your best (and maybe only) possibility.
Post Reply