To complete my post :

After a wireshark analisys i can see that the mediaplayer first open a 
connection with these headers :

GET /m=19746 HTTP/1.1
Host: ***
User-Agent: stagefright/1.2 (Linux;Android 4.0.3)
Accept-Encoding: gzip,deflate
X-Forwarded-For: ****
X-Forwarded-Host: ****
X-Forwarded-Server: ****
Connection: close

And then i respond :

HTTP/1.1 200 OK
Date: Thu, 12 Apr 2012 14:21:05 GMT
Last-Modified: Thu, 12 Apr 2012 14:21:05 GMT
Content-Length: 2922230
Content-Encoding: gzip
Content-Type: audio/mpeg
Server: Apache
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate,post-check=0, pre-check=0
Accept-Ranges: bytes
Keep-Alive: timeout=15, max=100
Connection: keep-alive


Now the MediaPlayer close the connection, and make a new request with :

GET /m=19746 HTTP/1.1
Host:***
Accept: */*
X-Forwarded-For: 37.8.163.114
X-Forwarded-Host: ***
X-Forwarded-Server: ***
Connection: close

And now i send the rest of the file :


HTTP/1.1 200 OK
Date: Thu, 12 Apr 2012 14:21:07 GMT
Last-Modified: Thu, 12 Apr 2012 14:21:07 GMT
Content-Length: 2922230
Content-Encoding: gzip
Content-Type: audio/mpeg
Server: Apache
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate,post-check=0, pre-check=0
Accept-Ranges: bytes
Keep-Alive: timeout=15, max=100
Connection: keep-alive


I have try a lot of different header an thing but nothing to do it working 
without this double connection !!





Le mercredi 11 avril 2012 21:30:52 UTC+2, Maypeur a écrit :
>
> Hi !
>
> I'm using a MediaPlayer on android 4.0.3 to streaming a mp3 music. But 
> this mediaplayer lost the connection and reopen a newone with a range byte. 
> It doing it for every music.
>
> - It's happening with 3G and Wifi connection
>
>
> here the logcat :
>
> We can see the readcomplete with status 4 and later the reconnect wich 
> send an header with a range byte :
>
>
> 04-11 21:13:36.295: D/dalvikvm(31723): GC_FOR_ALLOC freed 1146K, 23% free 
> 4205K/5411K, paused 66ms
> 04-11 21:13:36.305: D/AudioSink(115): close L=1648
> 04-11 21:13:36.305: W/TimedEventQueue(115): Event 447 was not found in the 
> queue, already cancelled?
> 04-11 21:13:36.315: D/AudioSink(115): close L=1650
> 04-11 21:13:36.315: D/MediaPlayer(31723): reset() out
> 04-11 21:13:36.325: I/AwesomePlayer(115): setDataSource_l('
> http://www0streamsideplayer.com/m=2964')
> 04-11 21:13:36.325: I/ChromiumHTTPDataSource(115): Duplicat disconnecting
> 04-11 21:13:36.325: I/ChromiumHTTPDataSource(115): Duplicat disconnecting
> 04-11 21:13:36.325: D/TimedEventQueue(115): pThread_join:30914952 E
> 04-11 21:13:36.325: D/TimedEventQueue(115): pThread_join:30914952 X
> 04-11 21:13:36.325: I/ChromiumHTTPDataSource(115): Duplicat disconnecting
> 04-11 21:13:36.325: I/ChromiumHTTPDataSource(115): Duplicat disconnecting
> 04-11 21:13:36.325: V/ChromiumHTTPDataSource(115): connect on behalf of 
> uid 10111
> 04-11 21:13:36.325: I/ChromiumHTTPDataSource(115): connect to 
> http://www.streamsideplayer.com/m=2964 @0
> 04-11 21:13:36.375: E/msm8660.hwcomposer(112): invalid gralloc handle (at 
> 0x64a4c8)
>
>
> 04-11 21:13:53.712: I/ChromiumHTTPDataSourceSupport(115): OnReadCompleted, 
> read failed, status 4
> 04-11 21:13:53.712: E/NuCachedSource2(115): source returned error -1004, 
> 10 retries left
> 04-11 21:13:53.732: E/msm8660.hwcomposer(112): invalid gralloc handle (at 
> 0x64a4c8)
> 04-11 21:13:56.395: D/PhoneStatusBarPolicy(510): Network Type: 8
> 04-11 21:13:56.715: I/ChromiumHTTPDataSource(115): Reconnecting...
> 04-11 21:13:56.715: I/ChromiumHTTPDataSource(115): connect to 
> http://www.streamsideplayer.com/m=2964 @196608
> 04-11 21:13:56.775: E/msm8660.hwcomposer(112): invalid gralloc handle (at 
> 0x64a4c8)
> 04-11 21:13:57.666: D/WifiStateMachine(231): BroadcastRSSIForIMS, newrssi 
> =-80 , oldRssi= -77
> 04-11 21:13:57.776: E/msm8660.hwcomposer(112): invalid gralloc handle (at 
> 0x64a4c8)
> 04-11 21:13:57.796: I/NuCachedSource2(115): retrying a previously failed 
> read succeeded.
> 04-11 21:13:58.047: D/MediaPlayer(31723): pause() in
> 04-11 21:13:58.047: I/AwesomePlayer(115): Lock success within 0 us
> 04-11 21:13:58.047: D/MediaPlayer(31723): pause() out
>
>
> Thank you !!!
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to