Streaming Player API – Bringing the Big Screen to the Small Screen

Dev Con

It’s out, folks – the Streaming Player API has now been published with full source code!

During the BlackBerry Developer Conference in 2009, I hosted a session where we discussed the best practices for developing Media Streaming applications. I want to give a big round of thanks to all the participants for sharing their stories – you really helped me to come up with an open source API module for streaming audio and video that simply works out of the box! Sample code or API, whatever you’d like to call it – the central idea was to provide you with something that was as simple as saying “play this URL over HTTP” or “seek to 2:20.”

The StreamingPlayer class is the starting point of this API. It does all the heavy lifting related to implementing a DataSource and a SourceStream, managing a ring buffer, synchronizing playback, download and user action threads, and last but not least, handle OS and user-initiated seek calls in an efficient way by fully considering the limitations of HTTP streams.

On top of the features mentioned above, the API also has enough public methods and constants for all you adventurers out there. A StreamingPlayerListener interface can notify an application about every streaming event you will ever need, as well as a mechanism (my favorite) to preprocess each chunk of downloaded data before it’s sent to the underlying Player. This preprocessing should be useful for decrypting encrypted content, or if you would like to parse meta information from the raw stream.

I welcome everybody to join me in making this a success by providing your valuable feedback and comments. A Knowledge Base article, Streaming media – Start to finish, has already been published; you can read more about it and download the code there. If you have any questions, feel free to point and shoot at me but do not hesitate to submit any issues or feature requests in the BlackBerry® Issue Tracker. I will be following the issue tracker on a daily basis.

Until next time, happy streaming!

About Mike Kirkup

Mike Kirkup is the Director for the Developer Relations program at Research In Motion (RIM), which is responsible for managing the technical relationships and programs for RIM’s developer community worldwide. Mike and his team work with RIM’s developer community to provide support and guidance as developers work to integrate their applications to the BlackBerry platform. Mike joined RIM in 2001 as a Security Software Developer in RIM’s Wireless Security Group. As part of the Wireless Securty group, Mike contributed to the development of the BlackBerry Cryptography API, S/MIME and PGP implementations. Mike holds a Masters of Management Science and a Bachelor of Mathematics from the University of Waterloo.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus