UIQ Internet Radio

Yell Radio

Yell Radio (from the original name of the popular streaming SHOUTcast protocol, ICanYell) is an application capable of locating and listening to Internet radio stations. The example demonstrates the use of some APIs and good practices in application development for the UIQ platform, including:

Features include:

The application consists of two parts: the UI-independent engine and the UIQ-based player. The engine is provided as a static library, and can be easily reused. The player provides front end to all functionality provided by the engine. The engine is further divided into directory and streaming parts. The player consists of playlist and playback views.

Directory

The www.shoutcast.com website serves as a central directory for all publicly broadcasted SHOUTcast radio stations. It responds to HTTP GET queries with XML documents.

CDirectory provides services for accessing SHOUTcast yellow pages.

MDirectoryClient receives data from the directory.

CStation contains information on a radio station retrieved from yellow pages, such as name, audio format, and bitrate.

CPlaylist contains list of URIs which can then be used to retrieve audio streams.

Application class using directory services implements MDirectoryClient interface, and issues requests to CDirectory instance. Supported requests include:

For each station found, the following information is available:

Station playlist is simply a list of servers (IP addresses and port numbers) hosted by the station. Multiple servers are often provided to expand listener capacity, and almost always stream the same content.

Streaming

SHOUTcast protocol was developed by Nullsoft, Inc. and is very HTTP-like. Unfortunately, it uses a custom HTTP header, preventing the use of the HTTP framework; therefore, RSocket API is used instead. Body part of the response is just raw MP3 or AAC+ data with some metadata embedded at regular intervals, containing e.g. artist and track names.

CStream represents audio stream being retrieved from a radio station.

MStreamClient receives meta-information on the stream being retrieved.

MStreamSink is the audio stream consumer interface.

CAudioSink directs audio stream to device speaker or headphones. It does not decode audio stream, but instead expects the corresponding codec to be present in the system.

User Interface

When the application starts, Playlist view is opened. Playlist view contains two tabs, Favorites and Directory. If there are stored favorite stations, Favorites tab is opened; otherwise Directory is displayed. The Directory provides access to the search function, which can perform search by genre and by keyword.

    

When a search is complete, the stations found are displayed in a list box. Highlighted list box item indicates number of listeners, audio format, and bitrate. The list is sorted by number of listeners in descending order, keeping popular stations on top. For a selected station, it is possible to add it to favorites, and to start listening.

On the Favorites tab, it is possible to start listening to a favorite station, import new entries from .pls files, remove, rename and edit existing entries (select servers to be used).

During playback, the following information is displayed: name of a radio station, artist, track, bitrate, and amount of traffic used. Controls are provided for playback and volume adjustment.

Building

Run the usual:

> bldmake bldfiles

and

> abld build gcce urel

on both projects (the static library and the application), and then create a sis file using

> makesis icyplayer.pkg

You may need to make some changes to path names in the package file if you use other SDK version than the UIQ 3.0 SDK.

Changes in this version

Version 1.0 2008-04-30

First release.

Download:  YellRadio

sys_warning

You need to be a registered member of the UIQ Developer Community and logged in to be able to download this file.

  243.70 Kb  (Last update: 2008-05-02)

«« Back

UIQ 3 SDK documentation

Quick links

More developer resources