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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
ahmadahmad
Posts: 404
Registered: ‎05-31-2011
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;

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.
New Contributor
TessyJose
Posts: 8
Registered: ‎11-17-2011
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
Please use plain text.
Visitor
NaveenIthappu
Posts: 1
Registered: ‎07-26-2012
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;
}
Please use plain text.
Developer
peter_strange
Posts: 17,629
Registered: ‎07-14-2008
Please use plain text.