Media Control Questions

Post your Gambas programming questions here.
Post Reply
Beeza
Posts: 3
Joined: Monday 9th March 2020 2:02pm

Media Control Questions

Post by Beeza »

I have created a simple internet radio application using the Gambas media player control. It displays a list of available station names which are stored in a Sqlite database along with their stream URL. When the user double clicks on the list item the stream URL is retrieved and passed to the media player. It works very well. However I have two issues, the resolution of which would make the application even better.

1) Sometimes the stream gets interrupted, due to network issues at my end or server issues at the radio station end. Either way, I can find no way to detect the loss of the stream in order to display an appropriate message or to trigger a reload of the URL to restore the stream. Does anybody have any ideas on how to achieve this?

2) Some radio statiions output metadata along with the stream which identifies the current song being played. I have no idea how this is either encoded or formatted. Is it possible to extract this metadata using Gambas functionality?

Thanks.

Beeza
User avatar
stevedee
Posts: 518
Joined: Monday 20th March 2017 6:06pm

Re: Media Control Questions

Post by stevedee »

Beeza wrote: Thursday 30th April 2020 2:27pm I have created a simple internet radio application...

1) Sometimes the stream gets interrupted, due to network issues at my end or server issues at the radio station end...
I'll be very interested to see if you find a solution to the loss of an audio stream, as I couldn't find one.

My internet radios launch mPlayer because when it loses the stream, mplayer exits (I think it was the only player that I tried that did this). By periodically checking whether the mplayer process is still running, I'm able to deal with this problem.

I also periodically check whether my program is still running (Python, not Gambas) and restart it if necessary. These two checks work really well in my case.
Post Reply