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.
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 ?

Postby Alexandre GESP » Sat Feb 27, 2016 5:55 am

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: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Re: wxMediaCtrl backend for omxplayer ?

Postby evstevemd » Sat Feb 27, 2016 9:05 am

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

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 ?

Postby Alexandre GESP » Sat Feb 27, 2016 5:31 pm

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: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Re: wxMediaCtrl backend for omxplayer ?

Postby evstevemd » Sun Feb 28, 2016 7:19 pm

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?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

User avatar
T-Rex
Moderator
Moderator
Posts: 1164
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: wxMediaCtrl backend for omxplayer ?

Postby T-Rex » Mon Feb 29, 2016 7:03 pm

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.


Return to “Component Writing”

Who is online

Users browsing this forum: No registered users and 1 guest