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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 404
Registered: ‎05-31-2011
My Device: curve
My Carrier: devel

StreamingPlayer.zip

Hi, i try to run the StreamingPlayer.zip  application from this link "http://supportforums.blackberry.com/t5/Java-Development/Streaming-media-Start-to-finish/ta-p/488255" but i have 3 errors "cannot find symbol" while running :

1-   private CircularByteBuffer buffer; 

2-  buffer = new CircularByteBuffer(bufferCapacity, true);

3-  buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));

 

can anybody help me plz, if anybody have this application worked i m verry grateful.

 

thanks in advance;

BlackBerry Development Advisor
Posts: 15,889
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: StreamingPlayer.zip

You'll need to download that separately.  From the article:

 

Note: The API needs an implementation of a thread safe Circular Byte Buffer. You can copy the implementation as CircularByteBuffer.java to rimx.media.streaming package and then compile the project. For an example, click here.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
New Contributor
Posts: 8
Registered: ‎11-17-2011
My Device: developer
My Carrier: developer

Re: StreamingPlayer.zip

Hi ahmadahmad,

could you pls tel me how u solved the problem with
buffer.resize(buffer.getSize() + (buffer.getSize() * percent / 100));

i am facing the same
Visitor
Posts: 1
Registered: ‎07-26-2012
My Device: Bold
My Carrier: Airtel

Re: StreamingPlayer.zip

Add the following method to CircularByteBuffer.java

 

/**
* Increase the size of the buffer
*
*/
public void resize(int bySize){
byte[] newBuffer = new byte[bySize];
int marked = marked();
int available = available();
if (markPosition <= writePosition){
// any space between the mark and
// the first write needs to be saved.
// In this case it is all in one piece.
int length = writePosition - markPosition;
System.arraycopy(buffer, markPosition, newBuffer, 0, length);
} else {
int length1 = buffer.length - markPosition;
System.arraycopy(buffer, markPosition, newBuffer, 0, length1);
int length2 = writePosition;
System.arraycopy(buffer, 0, newBuffer, length1, length2);
}
buffer = newBuffer;
markPosition = 0;
readPosition = marked;
writePosition = marked + available;
}
Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified