Dear Aleksei,
I'm trying to investigate the problem in the RecvStream.java class.
I have fixed the playerupdate() method, the states of the player are
represented as Strings and so they have to be compared using equals()
instead of ==.
Once fixed I have obtained that player at 30 secs of normal call
enters in the PlayerListener.ERROR state with EventData code -5 that
is an unspecified error.
(
http://supportforums.blackberry.com/t5/Java-Development/PlayerListener-ERROR-eventData-is-5-But-PlayerListener-ERROR/td-p/464383)
As posted by Izrdus in the link above, he has idenitifed the player
error problem as follows:
"I had a problem with my bookkeeping when the offset approaches length
in buffer javax.microedition.media.protocol.SourceStream.read(byte[],
int, int). Basically after 58000 bytes the audio would become
corrupted, causing the player to raise an error."
What do you about the Izrdus' solution?
I found an official code snippet from BlackBerry
(
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To_-_Support_streaming_audio_to_the_media_application.html?nodeid=1369914&vernum=0)
explaining how to use the SourceStream as source for a Player. In that
snippet the Thread.sleep() is used with a delay of 100ms so I think
that sleeping 20ms for collecting more data should not be the problem.
Cheers
Antonio Grillo, PhD Student
Dept. of Computer Science, System and Industrial Engineering
Room D1-21(aka S4ALab)
phone: 06 72597714
mail:
address@hiddenUniversity of Rome "Tor Vergata"
Via del Politecnico, 1 00133 Roma
On Fri, Apr 29, 2011 at 04:33, aleksei drassen <
address@hidden> wrote:
The problem is in the player buffer (RecvStream.java), when the player is
ready to "play" the buffer (byte[] b) of the player does'nt have anything
data stored yet, then the outputstream returns -1 (end of stream) throw to
the thread sleep(20), so the player enter to a error state and stops, i'm
trying to determine how i can solve this without affect other app layers,
one solution (stable) is putting the recvstream in a timer to reset
and initiate the class ever 30 secs, but this is a bad solution (is'nt a
solution).
so, i think the solution maybe is rewritting the class take care to the
delayer timer and write stream implementation. For now i have some work in
my house and i cannot write anything for the moment, but if you understand
what is i say i think you can write the best stable class implementation
(and i appreciate if you share anyway)
lucky you!
From: address@hidden
Date: Thu, 28 Apr 2011 13:59:26 +0200
Subject: Re: [Linphone-developers] linphone blackberry error 523 on device
To: address@hidden
Hi Aleksei,
I'm trying linphone-bb on two real devices (Bold 9700).
I have patched the source code and I've disabled the log (ALT +
twice("lg")) as you suggested in the last mail.
Now, I can make VoIP call between two real devices but at 30 sec
(sometime a little more) there is no more audio, I'm trying to
understand the classes SendStream.java and RecvStream.java.
Do you make some progress in solving this problem?
If you have detected a possible source of problem may I help you in
investigate and solve it?
Cheers
Antonio
On Fri, Apr 8, 2011 at 18:03, aleksei drassen <address@hidden>
wrote:
Hi, no, i test all and is no rigth to prevent the 523 error on the
device,
the error ocurrs when the device try to fill queue (thread(20)) ms on
the device log, so, you'll need go directly to the device and disable
(on
hand) the debug log.
device: on the home screen press alt+lglg (press "l" + "g" twice) and
toggle hide all elements on the list and select global warning, save,
and
thats all.
Maybe you have no sound at 30 secs of normal call (blackberry to
blackberry), but i don't resolve that issue yet.
cheers
Date: Thu, 7 Apr 2011 16:30:16 +0200
From: address@hidden
To: address@hidden; address@hidden
Subject: RE: [Linphone-developers] linphone blackberry error 523 on
device
Hi Aleksei,
I tried to implement the patch that you suggested for avoiding the 523
App Error on blackberry.
Unfortunately such patch does not work for me:
1) I've encapsulated the send method in a thread [Class
AudioStreamImpl.java]
Thread l1TmpThread = new Thread(new Runnable(){
public void run() {
mSendStream=new SendStream(mSession);
mSendStream.start();
}
});
l1TmpThread.start();
2) I've set a 30 ms sleep time when an RTPException occurs [Class
SendStream.java]
try {
mSession.sendPacket(packet, mTs);
} catch (RtpException e) {
Thread.sleep(30);
sLogger.disableLogLevel(1);
}
3) I've disabled all the log features [Class Logger.java]
public void log(int level, String msg, Throwable e){
//No Operations
}
maybe I'm forgotting something??
Thanks in advance for your attentions
Antonio
_______________________________________________
Linphone-developers mailing list
address@hiddenhttps://lists.nongnu.org/mailman/listinfo/linphone-developers