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
Highlighted
New Developer
Posts: 11
Registered: ‎07-17-2009
My Device: Not Specified

Custom datasource for RTSP

I was wondering if it's possible to create a custom datasource for RTSP?

there is no problem for streaming data from a rtsp server by passing the rtsp url to

 

  Manager.createPlayer(rtsp_url);

 

it worked well. But it seemed not supporting the seekable feature, i.e., I cannot actually let the player move back and forth as expected.

 

My problem is: how to make a video clip seekable, i.e., users can move the progress bar back and forth?

Actually, a pre question should be: is it possible to set the media time for a streaming video data file on a remote server, considering no local copy of the data? 

 

It was said that in order to make the data seekable, you had better create a custom datasource for buffering. Following the bufferedplayback demo code, now create the player with

 

Manager.createPlayer(customDataSource);

 

where the customDataSource makes a connection to the remote server with

 

Connector.open(rtsp_url) ;

 

But, there was a exception: ConnectionNotFoundException: No RTSP Protocol found when  Connector.open() is called.

 

so my final queston is: can I create a custom datasource which can support a specified protocol?

 

thanks for any help,

 

andersontaylor 

 

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Custom datasource for RTSP

I think the idea that was suggested to you is that inside the custom data source you need to open the connection using the UDP or TCP protocol and implement your own RTSP stack (or at least the features you require).
New Developer
Posts: 11
Registered: ‎07-17-2009
My Device: Not Specified

Re: Custom datasource for RTSP

Thanks for the reply.

 

I was wondering if you can shed a light with an example for this?

 

andersontaylor

 

 

Developer
Posts: 1,474
Registered: ‎04-14-2009
My Device: Not Specified

Re: Custom datasource for RTSP

Sorry, I don't know enough about RTSP. In general though, you'll probably have a small buffer where you store the audio/video frames/samples received from the server and provide the OS with the frames/samples whenever it asks your for them via the SourceStream.read() method. To enable seeking, you'll need to tell the OS that the stream is seekable and then also properly pass on the seek commands to the server and/or to your receive buffer.