I. INTRODUCTION
There are a large number of different media formats in the current world, and many new media formats are about to be built. In order to store and transfer these different media formats, there are many different formats of storage devices and transport protocols, such as large-home use of media storage devices (such as CDs, VCD and DVD), wired transport protocols (such as UDP, HTTP), Wireless transport protocol (such as WAP).
In order to enable mobile devices to access these different formats of media data, it is necessary to design a standardized, powerful and extensible application interface. The J2ME provides a standard set of playback and recording audio or video interfaces, the mobile Media API (MMAPI).
Second, the MMAPI system structure
In general, the media processing process can be decomposed into two processes:
The process of handling transport protocols for media data.
The process of processing media data content.
1, processing the media data transmission protocol process
The process of processing a transport protocol is the process of transferring the content of the media data from a data source, such as a file, a capture device, or a streaming service, to the content processing of the media data.
Mmapi the process of using data source to handle transport protocols for media data. A data source knows how to read the media data from its original location and transfer it to the Media data processing (Player). Media data can be stored in a different location, from a remote server to a resource file or an RMS database. Media data can be transferred from the original location via HTTP, streaming protocol like RTP, or other mechanism to media data processing (Player). Figure I shows the working process of data source.
Figure I: Data source work process
Javax.microedition.media.protocol.DataSource provides support for the MMAPI data source.
2, processing the media data content process
The process of processing media data content typically requires interpretation and decoding of the media data, and the type of output settings for that media should be recognized, such as audio settings or video settings. For example, when DataSource obtains a MP3 media data from a media data source and transmits it to the process of processing media data content, this process first parses and decodes the MP3 media data, simultaneously detects the MP3 media as audio data and turns on the device's audio device, The parsed and decoded media data is transmitted directly to the device's audio device buffer, and the audio device generates an audio signal based on the data content in the buffer.
Mmapi uses the player to process media data content. A player is an implementation instance of the Javax.microedition.media.Player interface, which reads media data, parses and decodes data, identifies media output devices and transmits media data to output devices from data source. The player provides a set of methods to control playback and synchronization of the media.
MMAPI also provides one or more controls to adjust the player's behavior, which can be obtained from a player instance and used controls when the player converts data from the media. We can access some special media types through some of the special controls provided in the player. The controls is implemented by the Javax.microedition.media.Control interface.