I’m a brand-new Xojo user! Just got Xojo about 2 weeks ago. I was a VB programmer for many years and Xojo seems very similar to VB (but a lot more capable). I’m excited to be able to develop applications for the Raspberry Pi.
I’m working on a project that will end up being installed in my classic 1988 Corvette. If you’re interested, here’s a link to the discussion thread on the Corvette enthusiast board I frequent:
Integrating OMXPlayer into a Xojo application is really just creating the illusion of integration. In general terms this how I do it:
I use an “asynchronous” shell to launch the OMXPlayer and wait for the ‘Completed’ event to let me know when the player is finished playing music or video.
I use a “synchronous” shell to issue D-BUS commands to the OMXPlayer. Once the OMXPlayer is launched, I immediately start polling the OMXPlayer in a loop until I get a valid response. This tells me that the OMXPlayer is up and running and is ready to accept commands.
I continue to use a “synchronous” shell whenever needed to issue D-BUS commands to the OMXPlayer such as: pause, resume, stop, seek, change video size and position etc.
I created a Xojo class that encapsulates the nitty-gritty details of controlling the the OMXPlayer and maintaining state information.
As for the visual integration of OMXPlayer into a Xojo application, that really is just an illusion. I leave a blank area with a black background in my Xojo application and I position and size the OMXPlayer video output to fit within that blank area. My application now looks like it is generating the video. It’s an illusion but it’s also a convincing one.
What are you using for Navigation and Diagnostic ? i wanted to do same on my vw and to have something personalised, as well what are you using on the amplifier part ? something that you can control via the pi or not ?
What are you using for Navigation and Diagnostic ? i wanted to do same on my vw and to have something personalised, as well what are you using on the amplifier part ? something that you can control via the pi or not ?
Thanks,
Aurelian[/quote]
Hi Aurelian,
I haven’t tackled the Navigation and Diagnostic parts yet.
I’ve seen some open source navigation software (the name escapes me) and will probably use that if can.
I’m targeting a specific car (Chevrolet Corvette) and a specific generation (1984-1989) which use the old General Motors OBD-1 protocol. I’m planning to roll-my-own solution for this. I’ve purchased the necessary OBD-1 to USB cable and have researched the data produced by the OBD-1 protocol. Hopefully I can get something up and running on the Raspberry Pi with Xojo. I’ll report back as I start working on this part of the project.
The amplifiers are built into the speaker housings on the Corvette, so I’m not going to need amplifiers. Just the line-out signal. At least that is my current assumption. If I have to employ my own amplifiers, there’s a lot to choose from at MCM Electronics.
Luckily my project doesn’t need something as sophisticated as Multi-touch. The touch-screen I’m using (from Adafruit.com) doesn’t support multi-touch. I just need simple touch-screen push-buttons. Multi-touch would be much to ‘fiddly’ for an in-dash entertainment system. I’ve got to keep is easy to use while driving.
This Sunday I have made my own solution because I do not have much time to wait. Quick & dirty, but it works for what I need. I need that for a museum.
I will share the solution here, but I hope, we will find someone who will do it better. I use “xdotool” to simulate keystrokes, this must be installed first.The link to my project is: www.qualidat.com/material/wnk-video.zip.
Everything must be in the folder “/home/pi/Documents”, also the mp4 videos and a text file “titel.txt”, which contains the file names and a short description for the listbox in front. An example is inside, but videofiles are not there - you can use your own.
While it’s awkward to change anything on the Raspberry when the application is running on autostart, there is a socket. With a browser you can shoot down the application. Use the URL http: // ip-address: 8080 /? !!! and the program ends.