Hello,
I searched for mediactrl as well as for overlaying panels, but did not find the right starting point yet.
My environment is a closed source (windows-)app, that allows customization by lua scripting. wx is accessible through wxlua and the toplevel screen element, I can use is a panel. That panel has no size on creation, so I have to use resize handlers.
I was successful implementing some trivial samples ...
That app is planned to be ported to linux too. Linux is my development environment.
So I'd like to be as portable as possible.
Next challenge is displaying a video(-stream?) from a webcam as panel background. But I don't want to scale the video to my controls size. Instead I'd like to use my control as a viewport to the unscaled video.
Additionally I'd like to use the "videopane" as ordinary panel, where I can place UI-Controls.
Is that possible with all that clipping and the like?
I'd like to add a control to move the viewport in the video-image-area.
And if possible, I'd like to do custom painting in the panels area.
What's the best way to go for this challenge?
Can I use mediactrl or do I have to create a custom widget?
I didn't have any contact to wxwidgets or lua before, so please forgive me, if I missed some readings ...
display video as background
Re: display video as background
Is there any other application that does what you're describing? I'm having difficulties to imagine what you're trying to do
But i think the "custom painting" on the video is the deal-breaker here. I'm almost certain this won't work with wxMediaCtrl or a VLC based solution. You might need a library like ffmpeg, retrieve every single frame as a bitmap yourself and draw the content yourself.
But i think the "custom painting" on the video is the deal-breaker here. I'm almost certain this won't work with wxMediaCtrl or a VLC based solution. You might need a library like ffmpeg, retrieve every single frame as a bitmap yourself and draw the content yourself.
Use the source, Luke!
Re: display video as background
Hm, I don't want to paint over every frame. My "drawings" don't change that often.
What I'd like to paint is a cross with circles like is done on shooters
What I'd like to paint is a cross with circles like is done on shooters
Re: display video as background
It doesn't really matter how often the content changes. You'd need to draw "something" on top whenever the content of the video changes, which is usually pretty oftenI don't want to paint over every frame. My "drawings" don't change that often.
Use the source, Luke!
Re: display video as background
You're right. On java systems I'd try to paint the video as background images and use the foreground with transparency ...
But with wxwidgets I have no idea, what would be possible.
I read, that at least wxlua does not support overlaying widgets at the same location.
Don't know - is it possible to bring a user control into play without recompiling wxwidgets?
Could you please tell me, what is possible with the app-environment, I'm bound to?
What about the viewport aspect? Would that be possible to achieve?
But with wxwidgets I have no idea, what would be possible.
I read, that at least wxlua does not support overlaying widgets at the same location.
Don't know - is it possible to bring a user control into play without recompiling wxwidgets?
Could you please tell me, what is possible with the app-environment, I'm bound to?
What about the viewport aspect? Would that be possible to achieve?
Re: display video as background
I guess you'll have to build some small experimental samples in C++ to check what's possible and what not. Especially if it's possible to draw on top of a video overlay. My guess would be no, but i've never tried it.
However, i think using ffmpeg to decode the video is a realistic option, of course you'll lose performance, displaying full hd video may become a problem (but once again, I've never tried this, this is something you have to find out yourself).
The Lua component is another challenge on top of that. Will the whole application be based on wxLua or will it be a C++ application that just uses Lua for additional scripting support? (I would highly recommend the latter)
However, i think using ffmpeg to decode the video is a realistic option, of course you'll lose performance, displaying full hd video may become a problem (but once again, I've never tried this, this is something you have to find out yourself).
The Lua component is another challenge on top of that. Will the whole application be based on wxLua or will it be a C++ application that just uses Lua for additional scripting support? (I would highly recommend the latter)
Use the source, Luke!
Re: display video as background
Oh - the application is not mine! I don't have access to the sources.Will the whole application be based on wxLua or will it be a C++ application that just uses Lua for additional scripting support? (I would highly recommend the latter)
The application creators build several interfaces for lua-scripting and inside lua wxwidgets is accessible.
Each interface is like a sandbox - no common global namespace.
But hey - you're right! I have to try, whether I could access ffmpeg ...