[ 6 posts ] 
Author Message
 Post subject: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 6:44 am 
User avatar

Joined: Sat Aug 01, 2009 6:23 pm
Posts: 10
I've been noticing some occasional issues with buffering audio files. It looks like gstreamer stalls out when it hits some memory threshold, which is understandable.

Problem is it stalls the download operation from the server, during that stalled time the TCP connection is allowed to timeout, when gstreamer attempts to fetch the remainder of the audio file the TCP session (server side) is closed and it errors out.

Here is the error which comes out of /var/log/messages when it happens. Its pretty easy to reproduce.

Code:
2010-04-22T06:29:08.787811Z [86426] palm-webos-device user.err mediaserver: GSTREAMER: ERROR          palmhttpsrc HttpSrc_Pull.cpp:1584:NetworkLoop:(NULL) Erroring out, but ConnectCode is 0 and ResponseCode is 200
2010-04-22T06:29:08.847930Z [86426] palm-webos-device user.err mediaserver: GSTREAMER: ERROR         palmmp3demux PalmMp3Demux.c:845:palm_mp3demux_loop:(NULL) fill returned failure -5
2010-04-22T06:29:09.130554Z [86426] palm-webos-device user.warning mediaserver: PIPELINE: MediaPipeline::notifyCallComplete: called for listener 0x1c4258


Audio playback dies in conjunction with this error.

Perhaps detection of the closing socket or some keep alives while the buffer is stalled are in order.

I should add I am using 2 audio objects in a round robin configuration to provide gapless playback.

_________________
Ampache Mobile


Top
 Profile  
 
 Post subject: Re: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 4:25 pm 

Joined: Thu Jul 16, 2009 2:36 pm
Posts: 352
That would explain why playback in drPodder is sometimes interrupted when you have paused for a while or after you get a phone call, or sometimes just randomly. :)

I should add this to the others I've collected here http://drpodder.com/webos-bugs/ so I can refer users to Palm when they complain about these issues.

_________________
Jamie Hatfield/drnull
My webOS application: drPodder


Top
 Profile  
 
 Post subject: Re: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 4:28 pm 
User avatar

Joined: Sat Aug 01, 2009 6:23 pm
Posts: 10
I've seen that too and I put a work around in my app for it, I actually think thats a different bug.

I think that one is when the device sleeps the gstreamer memory must be getting flushed.

EDIT: Thanks for drPodder, I use it everyday

_________________
Ampache Mobile


Top
 Profile  
 
 Post subject: Re: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 4:45 pm 
User avatar

Joined: Sat Aug 01, 2009 6:23 pm
Posts: 10
Now that I think of it more, ya... could be the same bug, or a combination of both.

The paused issue appears to be an issue for apps like grooveshark, from what I've seen in the App reviews.

_________________
Ampache Mobile


Top
 Profile  
 
 Post subject: Re: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 4:50 pm 

Joined: Thu Jul 16, 2009 2:36 pm
Posts: 352
Was just browsing your code at http://ampache-mobile.googlecode.com/sv ... oPlayer.js and DANG that's a lot of special case handling. Makes me shudder to think of all the special cases that I'm missing. :( And what's with all the buffers? (not to get too OT from your bug report here).

This is really case in point why we really, really need Palm-approved objects for controlling media playback and simplifying the event handling code as I alluded to at the end of this post earlier today. https://developer.palm.com/distribution ... 909#p27909

Palm knows all the special cases (I hope!) and when the implementation or details changes for the audio object, they could change the wrapper object appropriately and the hundreds of apps using audio wouldn't have to make the changes themselves.

_________________
Jamie Hatfield/drnull
My webOS application: drPodder


Top
 Profile  
 
 Post subject: Re: 1.4.1 Audio Failure with Server Timeout
PostPosted: Thu Apr 22, 2010 5:06 pm 
User avatar

Joined: Sat Aug 01, 2009 6:23 pm
Posts: 10
jhatfiel wrote:
Was just browsing your code at http://ampache-mobile.googlecode.com/sv ... oPlayer.js and DANG that's a lot of special case handling. Makes me shudder to think of all the special cases that I'm missing. :( And what's with all the buffers? (not to get too OT from your bug report here).

This is really case in point why we really, really need Palm-approved objects for controlling media playback and simplifying the event handling code as I alluded to at the end of this post earlier today. https://developer.palm.com/distribution ... 909#p27909

Palm knows all the special cases (I hope!) and when the implementation or details changes for the audio object, they could change the wrapper object appropriately and the hundreds of apps using audio wouldn't have to make the changes themselves.


I think most of the cases I am handling aren't as much of an issue for an app like drPodder where you are only dealing with one audio object. AudioPlayer.js could probably be a whole lot cleaner, most of the code is for dealing with users switching around while songs are still buffering.

For my app I need the fine grain control that direct access to the audio object gives you, I also think that Palms reasoning for exposing it as a true HTML5 audio object is that as HTML5 matures people will write libraries to handle all the cases which you'll be able to drop right into your app and never look back. Similar to how prototype handles XML requests for you.

_________________
Ampache Mobile


Top
 Profile  
 
Display posts from previous:  Sort by  
   [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron