video streaming over http in blackberry
- by ysnky
hi all,
while i was searching video player over http, i found the article which is located at this url;
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream ing_media_-_Start_to_finish.html?nodeid=2456737&ve rnum=0
i can run by adding ";deviceside=true" at the end of url. it works fine in the jde4.5 simulator. it gets 3gp videos from my local server. i tested with 580kb files and works fine. but when i get the same file from my server (not local, real server) i have problems with big files (e.g 580 kb). it plays 180kb files (but sometimes it does not play this file either) but not plays 580kb file. and also i deployed my application to my 9000 device it sometimes plays small file (180kb) but never plays big file (580kb).
why it plays if it is on my local file, not play in real world?
i ve stucked for days. hope you help me.
and also the code at the url given below is not work, the only code i ve found is the above.
blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To _-_Play_video_within_a_BlackBerry_smartphone_appli cation.html?nodeid=1383173&vernum=0
btw, there is no method such as resize(long param) of CircularByteBuffer class. so i comment relavent line (buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100)); as shown below.
public void increaseBufferCapacity(int percent) {
if(percent < 0){
log(0, "FAILED! SP.setBufferCapacity() - " + percent);
throw new IllegalArgumentException("Increase factor must be positive..");
}
synchronized(readLock){
synchronized(connectionLock){
synchronized(userSeekLock){
synchronized(mediaIStream){
log(0, "SP.setBufferCapacity() - " + percent);
//buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));
this.bufferCapacity = buffer.getSize();
}
}
}
}
}
thanks in advance.