Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

Thread.sleep can be used as a poor man's substitute for a proper wait/notify. I suspect the problem is elsewhere.
New Developer
Posts: 21
Registered: ‎09-18-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

Thanks to both of you for your reply.

 

Yeah true. It was my mistake. Actually header was added two times , so it was not able to play the stream.

 

Now it's working fine, But after some time i am getting error says "Uncaught Exception : Application is not responding."

 

So can you please tell me what may be the problem . I am receiveing UDP Packets of 20 ms.

 

 

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

You need to throttle the rate at which you receive UDP packets. Receiving UDP packet every 20ms will very likely result in your application's event queue filling up.
New Developer
Posts: 21
Registered: ‎09-18-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

Yes true.

 

I tried with 40ms , but with 40ms data player could not play the stream. By analysis , I came to know that  for 20ms data amr frame header is 3c , but it's not same for 40ms data.

 

R you able to play 40ms buffer ?? If yes , Then what's the AMR format for 40ms frame.

 

And even with 60ms data , that error "Application is not responding. " is received though after a long time(Only receiver without player). But i could not say that application will work atleast for a day.

 

So it seems that by increasing framesize , we can make application live for long duration . But I cant say application will work forever.

 

Then what is the solution for this problem.

 

Thanks.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

AMR frames are always 20ms long. You cannot "increase framesize". To play back 40ms, you need to add 2 x 20ms frames to the playback buffer.
New Developer
Posts: 21
Registered: ‎09-18-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

Hello,

 

Thanks for your reply. Yes i tried with 2*20ms buffer. But Player start after 900-1000 packets of 40ms framesize.

 

So can you please tell me what may be the reason for this much delay??

 

It doesnot work like realtime player.

 

Any idea or solution to this problem ???

 

 

Thanks.

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

Please start a new thread instead of posting to this thread...
New Contributor
Posts: 3
Registered: ‎11-25-2010
My Device: Not Specified

Re: Player custom DataSource streaming without RTSP possible?

I'm in the same situation to write a mp3 player which would play the file in buffers using DataSource API.Could you please send me your complete code which will help me a lot.

Thanks in advance.