10-01-2010 02:34 PM - edited 10-01-2010 02:36 PM
well.. I think you should be using simulator from BB to test all the code, BB API is doesn't follow the standards, specially when it come to hardware management, and also it changes a lot from version to version (for example, search for connector class from api 4.5 and compare to connector from api 4.6).
Player is also a little different from standard. If you're developing for BB devices, you should be using BB API and BB Simulator, since they're BB implementations of JavaME, not the standard JavaME.
Almost forgot... USE BB MEDIA MANUALS, they're in the developers download page, they have a lot of examples on how to develop a DataSource for BB.
10-23-2010 04:58 AM
Now I'm facing a big problem: which type of connections can I use to send/receive the rtp packets?
I can use the normal blocking connections like UDPDatagramConnection(and DatagramConnectionBase to receive)? Or i need other types of connections, maybe non-blocking (but they exists in BB platform?)?
If u wanna provide some code, i would be very interested in reading myself, but if not possible, thanks for the informations
11-08-2010 05:29 AM
I resolved the problem implementing Datasource and the Sourcestream...I tested it with the transmission of big amr data through rtp... the problem is that i must send a little amount of data, I think that - 20-40 ms of data are good...with the pre defined bit-rate, 240 bytes of data (12.2kbps * 20 ms) is ok?
And what about buffering? I need to buffer amr audio in the implemented read method of the sourceStream, how can i buffer them in just one amr chunk (composed maybe by ~10 audio amr paload? Which value i can return while buffering, without make the player going into exception?
Thanks for all the answers
11-08-2010 09:09 AM
About the connection, I was using UDPDatagram stuff, but I also tried the raw socket approach, however it's an issue you must solve according to your OS version, there are several changes in the connection class, between OS 4.5 and 4.6. If your planning to support 4.5 and previous OS you should be trying the raw socket, however, I could advice you to live and let die, use the UDPDatagram, and never, ever try your app in any device previous to 4.6.
About the buffering, I never tried the amr codec over the net, I only tried the uLaw, so the magic numbers, like the amount of bytes and miliseconds are completely different, and the only way you're going to get those numbers is testing your app. What I did was, letting the recording player write in the buffer as fast as it can, and later, reading the buffer by chunks of 20ms (if I can remember well) then transcode the chunks and then send em over the net. You don't need the transcode, but I don't know if you can split the chunks like I used to, because I was splitting PCM, and it's very easy to handle. The problem here is that you can't control how many bytes the player record into the buffer, you can only hope for it to be constant, In my case it was arround 200ms of data, sometimes it read 50ms, and the next time it reads 400ms, so you should be aware of that while coding. While reading and playing, its a bit easier, because the player will try to read always a huge amount of data, so you can simply give it whatever you have, and then return the read function with no data, the player makes a few tries and then stop, later plays the data, and as it runs short of data comes back for more, don't worry.
Thats pretty much it.
11-08-2010 03:16 PM
Well, actually i'm receiving the rtp packet directly in the read methods...so i can write always the same amount of data in the buffer...the problem is that now i've to buffer the amr payloads into a big one, so i've to buffer them, no problem if you don't know alejandromagnus...But i wanna just know how's the behaviour of the player and ifit tries to buffer...I tried with small amr and it didn't work, so, can I buffer them and return 0 data read (or something else), without making him reporting exceptions?
05-02-2012 04:42 AM
I am very New for Voip Calling...I dont have any Idea that how do I start its Implementatation..I found one link but that is J2ME Based. http://stackoverflow.com/questions/1628849/is-it-p
Can you please help me that how i start with voip...if Possible Please send me some source code...
Thanks In Advance!!!!!!!!