C H A P T E R  3

Porting the Mobile Media API

The JSR 135 implementation in Java Wireless Client software is built using two components that are not part of the source code:

To port the JSR 135 implementation to your own platform, you must supply these components or port to suitable replacements.

In addition, the JSR 135 implementation builds only on Windows, only using the JavaCall API.


Capabilities

The JSR 135 implementation in Java Wireless Client software has the following capabilities:

The following formats, protocols and the corresponding JSR-135 controls are supported:


TABLE 3-1 MMAPI Supported Features and Attributes

Feature

Protocols

Controls

Supported Formats

Sampled audio (WAV)

HTTP

File

InputStream

  • VolumeControl
  • StopTimeControl
  • PCM 16-bit stereo
  • AMR narrow-band

Audio capture

capture://audio

  • RecordControl

 

Interactive MIDI

device://midi

  • VolumeControl
  • MIDIControl

 

GIF (includes animated GIF)

HTTP

File

InputStream

  • FramePositioningControl
  • GUIControl
  • RateControl
  • StopTimeControl
  • VideoControl

 

MIDI

HTTP

File

InputStream

  • MIDIControl
  • PitchControl
  • RateControl
  • StopTimeControl
  • TempoControl
  • VolumeControl
  • MIDI type 0
  • MIDI type 1
  • SP-MIDI

Tone sequence

HTTP

File

InputStream

  • StopTimeControl
  • ToneControl
  • VolumeControl

 

Interactive tone sequence

device://tone

  • StopTimeControl
  • ToneControl
  • VolumeControl

 


Note that the JSR 135 capabilities in this release are narrower than in the 1.1.3 release.


Porting Information

To build a JSR 135 implementation for your device, you must implement the JavaCall API functions that are related to multimedia. These are defined in the header javacall_multimedia.h, which is in javacall/interface/jsr135_mmapi.

See the JavaCall API documentation for details.

Currently the GIF player is implemented entirely in Java platform code and, consequently, does not need porting.

The JSR 135 implementation included with the Java Wireless Client software is an example. Any part of it can be used for your own implementation.

You can examine the Windows JavaCall API implementation in javacall/implementation/win32/jsr135_mmapi. This implementation is based on the QSound engine, the AMR decoder, and Windows DirectSound.