Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
roney99625
Posts: 39
Registered: 03-20-2009

Player stucks due to GC

Hi,

 

I have a strange issue with the player. I am using datasource to get audio and video data from file system and able to play it well if I run the application alone. But if I have 1 or 2 other applications running in background, the GC shown off. After the GC over, the play could not recover and glitches continously. Does any one know whats wrong? The one solution I can see is to avoid GC kicks off and I believe that its not controllable. Correct me if I am wrong. Any other solution???

 

Thanks in advance.

 

Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: Player stucks due to GC

Have you tried increasing the size of the playback buffer?
Please use plain text.
Developer
peter_strange
Posts: 14,614
Registered: 07-14-2008

Re: Player stucks due to GC

Have you reviewed these two videos?

 

Garbage Collection:

http://www.blackberry.com/DevMediaLibrary/view.do?name=GarbageCollection

 

Low Memory Manager:

http://www.blackberry.com/DevMediaLibrary/view.do?name=LowMemoryManager

 

I would especially recommend the first one, and it tells you how to use the profiler, which might help you determine if there is anything in your application that you do not need,

Please use plain text.
Developer
roney99625
Posts: 39
Registered: 03-20-2009

Re: Player stucks due to GC

Yes I did. My fundamental proble is why the player could not recover afer GC? What prevents it from being playable again? Does anyone know?
Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: Player stucks due to GC

Are you by any chance using a time-dependent algorithm to feed the player with data. In other words, are you sure it's not your algorithm that's to blame? Can you confirm that you're telling that you have an infinite amount of data to play and the player nevertheless stops asking you for more data?
Please use plain text.
Developer
roney99625
Posts: 39
Registered: 03-20-2009

Re: Player stucks due to GC

Thats right. I am not using any time specific info. All of suddenly after GC over, it tries to seek at same location again and again in stream but not able to play the data. I would not blam the data since it is playable if no GC show up. May be there is something internal in media player that goes wrong after GC. I don't know
Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: Player stucks due to GC

Tell the player that the stream in non-seekable and see if that makes a difference.
Please use plain text.
Developer
roney99625
Posts: 39
Registered: 03-20-2009

Re: Player stucks due to GC

Thats making it unplayable all the time... Not working :smileysad:
Please use plain text.
Developer
Posts: 1,474
Registered: 04-14-2009

Re: Player stucks due to GC

Non-seekable streams play fine for me. Are you sure your code is OK?
Please use plain text.
Developer
roney99625
Posts: 39
Registered: 03-20-2009

Re: Player stucks due to GC

May be I am using 2 source streams and hence its not working for me????
Please use plain text.