Java Reference
In-Depth Information
Caution Not all devices support all schemes. For example, RTSP support is a relative latecomer to the
MMAPI; as I write this, only a few devices include support for it.
Table 16-1. Some Commonly Supported MMAPI Schemes
Scheme Name
Purpose
Note
capture
The scheme-part indicates the capture device.
Captures live media
from a device sensor
http
Fetches via HTTP
It usually downloads the entire file before rendering.
rtp
The scheme-part indicates the server address, port,
and content type.
Streams via RTP
rtsp
The scheme-part indicates the server address, port,
and resource from which to stream.
Streams via RTSP
Listing 16-2 shows some examples of syntactically valid locators. However, just
because a locator is syntactically correct does not mean that the device has the necessary
protocol and codec support to play the media that the locator specifies.
Listing 16-2. Some Valid Locators
http://www.noplace.com/loon-hoot.mp3
http://www.noplace.com/loon-display.3gp
capture://video
capture://audio
capture://radio
rtp://www.noplace.com:1224/audio
Under the hood, when you pass a locator to Manager.createPlayer , it sets up
whatever protocol engine it needs after parsing the locator. It then creates a DataSource
to pass media data from the source to the player. If you're looking to provide support
for a protocol that isn't supported by the MMAPI implementation on a specific device,
you can write a DataSource subclass that implements your protocol and use it with
Manager.createPlayer , like you see in the pseudocode in Listing 16-3.
 
Search WWH ::




Custom Search