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

Native 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
New Contributor
Posts: 2
Registered: ‎01-19-2013
My Device: -
My Carrier: -

Streaming Audio

Hi!

I’m considering porting my WP7 radio player app to BB10.

To do that I need any of the following 2 things:

1. MP3 and HE-AAC decoders + API to play raw PCM audio stream. I can’t just port FAAD2 because the license costs money; I need to use the OS-provided decoder. Besides, I was unable to find BB10 API to play raw PCM audio stream.

2. Or, API to feed raw samples to the decoder, similar to the WP7/Silverlight MediaStreamSource abstract class.

After reading documentation, I concluded the BB10 platform is incapable of playing streaming media unless the transport protocol + container + codec combination is supported by the OS.

Is that correct?

Thanks in advance.

Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: Streaming Audio

MP3 and HE-AAC v1 and v2 are supported natively.

 

There is also an API for raw PCM. A search of this forum for "Raw PCM" finds this:

http://supportforums.blackberry.com/t5/Native-Development/BlackBerry-10-Audio-Subsystem/ta-p/2018769

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Highlighted
New Contributor
Posts: 2
Registered: ‎01-19-2013
My Device: -
My Carrier: -

Re: Streaming Audio

Innovatology, I have a feeling that you didn’t read my question.

I know "MP3 and HE-AAC v1 and v2 are supported natively" - for playing either local files, or HTTP streams in the supported media container.

 

Now my question is: can I use the system-provided MP3 and HE-AAC decoders to play HTTP audio stream in unsupported media container, like I did on WP7 platform?

 

I can rephrase it.

Is there an API similar to mmr_input_attach that accepts some “audio stream” abstraction implemented on my side, instead of just the URL?

 

Thanks in advance.

BlackBerry Development Advisor
Posts: 683
Registered: ‎11-29-2011
My Device: PRIV
My Carrier: Rogers

Re: Streaming Audio

the solution for unsupported streaming multimedia formats is presently either to:

1. use a fifo as the input file and feed the compressed data into the fifo from your streamer.  this is not officially supported, but I am told it probably will work, so long as you never let the fifo run out of data.

2. implement a lightweight streaming proxy as part of your app which unwraps the incomping stream and then re-wraps it in a supported streamer format (http live streaming for example).  then point mm-renderer to the local url.

3. implement your own streamer and decoder, and simply play out raw PCM samples via libasound or similar.

 

If none of these will work for you, then you will just have to wait until additional streamers are supported, or until a more flexible API is available.  Right now we have only a high-level mm-renderer interface, and a low-level PCM interface.  There is an intermediate layer, but it is not available publicly, because it is not formalized, and changes regularly -- this layer is the backend side of mm-renderer.  Access to all of the decoder blocks is part of the intermediate layer, so they are not available for direct use today.  In the future, there will be more detailed interfaces (similar to openmax for example), but not at launch.

 

Cheers,

Sean

Developer
Posts: 313
Registered: ‎05-31-2010
My Device: Alpha 10, Bold 9900, Storm 9530, Tour 9630, Curve 9320, Curve 8900
My Carrier: All

Re: Streaming Audio

I am also looking for port my streaming audio application from BB7 to BB10. But no clue yet. If some one can post some helpful tutorial, I am so appreciated. Thank you




p(^_^)q
Good good study, day day up