View Single Post
Old 08-23-2009, 07:07 AM   #134 (permalink)
jnilsson
Member
 
jnilsson's Avatar
 
Join Date: Aug 2005
Location: Barcelona, Spain
Posts: 38
hey, yea, i could really use some help... have not been able to work latelly but getting back at it now. I'll organize me code a bit and put it up. As i said, im not that much of a java developer but have "touched" on several languages so i understard it and am learning as i go along. Its not the easies place to start to learn because of the mess that is the development environment.

anyway, what i have had most problems with is the streaming part. As there are no "natural" shoutcast functionality, we have to create it from 0. So, we have to read the header information in the stream, and send the response. Not that complicated, once we have done this, we get a feed which we have to feed to the internal mplayer object. This is where im having problems. The mplayer object does accept streams but you have to pass it as a mp3 file. So, there are two ways of doing this:

1. is to pass it to a local temp file, and when we have X amount downloaded start to play it. The problem with this is that we can't read and write to the same temp file, and doing it with more then 1 file causes cuts in the stream, not acceptable.

2. is to create a local webservice that streams the input stream to a virtual "mp3" stream, which works. I have seen the code, have just not been able to get it to work. I found a music player with its code that works, but the project is huge and a mess to follow for me.

this is basicly where i am at the moment. As to me, the most importaint part is the stream, so i have been stuck here for a while.

like i said, ill clean up the code and pass it to the git repo, i'll try to do it today. am reinstalling my environment with the snow leopard this weekend, so i should be ready to start to work in a few hours.

I'll let you know when i have the gir repo ready.
__________________
(Offline)   Reply With Quote