Media Control Questions

Post

Posted
Rating:
#1 (In Topic #406)
Trainee
 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
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
stevedee is in the usergroup ‘Regular’

Beeza said

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.
Online now: No Back to the top
1 guest and 0 members have just viewed this.