title: video streaming over http in blackberry
body: <p>while i was searching video player over http, i found the article which is located at this url;</p>
  
  <p><a href="http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream" rel="nofollow noreferrer">http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Stream</a> ing_media_-_Start_to_finish.html?nodeid=2456737&amp;ve rnum=0</p>
  
  <p>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).</p>
  
  <p>why it plays if it is on my local file, not play in real world?</p>
  
  <p>i ve stucked for days. hope you help me.</p>
  
  <p>and also the code at the url given below is not work, the only code i ve found is the above.</p>
  
  <p>blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To _-_Play_video_within_a_BlackBerry_smartphone_appli cation.html?nodeid=1383173&amp;vernum=0</p>
  
  <p>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.</p>
  
  <pre><code>public void increaseBufferCapacity(int percent) {
      if(percent &lt; 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();
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>thanks in advance.</p>