wxMediaCtrl backend for omxplayer ?

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
Alexandre GESP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Sat Jan 30, 2010 7:46 pm
Location: France

wxMediaCtrl backend for omxplayer ?

Post by Alexandre GESP »

Hello.
Do you know if there is a backend for omxplayer (the linux media player witch come with raspberry PI platform).
I can order to omxplayer to play the file OVER my application, but I would prefer to have it embedded in a wxMediaCtrl.
GStreamer dont work fine the GPU of raspberry.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: wxMediaCtrl backend for omxplayer ?

Post by evstevemd »

You have to write that backend yourself. Docsstates:
Creating a backend for wxMediaCtrl is a rather simple process. Simply derive from wxMediaBackendCommonBase and implement the methods you want. The methods in wxMediaBackend correspond to those in wxMediaCtrl except for wxMediaCtrl::CreateControl which does the actual creation of the control, in cases where a custom control is not needed you may simply call wxControl::Create().

You need to make sure to use the wxDECLARE_CLASS and wxIMPLEMENT_CLASS macros.

The only real tricky part is that you need to make sure the file in compiled in, which if there are just backends in there will not happen and you may need to use a force link hack (see https://wiki.wxwidgets.org/RTTI).
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Alexandre GESP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Sat Jan 30, 2010 7:46 pm
Location: France

Re: wxMediaCtrl backend for omxplayer ?

Post by Alexandre GESP »

Yes, I have readed that F.... manual about creating a backend, but as I am a lazy boy, I'd expected the work has already been done !!!
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2408
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Re: wxMediaCtrl backend for omxplayer ?

Post by evstevemd »

Alexandre GESP wrote:Yes, I have readed that F.... manual about creating a backend, but as I am a lazy boy, I'd expected the work has already been done !!!
Its not. So you can save other lazy boys by doing it now ;)
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
User avatar
T-Rex
Moderator
Moderator
Posts: 1248
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: wxMediaCtrl backend for omxplayer ?

Post by T-Rex »

Just have checked the omxplayer's source code and it seems that it does not support embedding to the existing UI window. All existing wxWidgets media backends just embed the player's UI control inside the host wxMediaCtrl. So if you want to use the omxplayer, then you need either to reuse its source code or just automate the console utility but in this case you either stick with the Audio features or the video will be played outside the wxMediaCtrl. So probably this is not a trivial task. You can try to setup a bounty here or at StackOverflow if you want, maybe someone will implement this for some money.
Post Reply