80 likes | 240 Views
Mobile Media API. It provides a framework for embedded multimedia facilities in java enabled mobile devices. Introduction. MMAPI is a specification of the Java Technology for Wireless Industry(JTWI) specification (JSR-135) provided by JCP(Java Community Process).
E N D
Mobile Media API It provides a framework for embedded multimedia facilities in java enabled mobile devices.
Introduction • MMAPI is a specification of the Java Technology for Wireless Industry(JTWI) specification (JSR-135) provided by JCP(Java Community Process). • MMAPI provides a high level interface to provide specific HTTP, Audio & Video. • MMAPI are compatible with both CLDC & CDC.
Features • MMAPI provides support for various multimedia capabilities , such as tone generation, audio and video playback. • MMAPI requires limited resources, very less memory and processing capabilities. • Its is not protocol or format specific, it supports most of the multimedia capable audio & video formats such as MP3 & WAV. • It provides extensible & flexible framework, so new features can be added to it, without making any modification to old version API.
Architecture of MMAPI • It consist of DataSource, Player, Manager and Control. Provides data provides Control Creates Player Control DataSource Manager
Description of Major Parts • Player: Controls and reads the data provided by the DataSource. Its life Cycle includes five states, these are UNREALIZED, REALIZED, PREFETCHED, STARTED & CLOSED. This object is stored in heap memory. • Life Cycle of a player started in unrealized state and it does not have enough information to acquire. • The realized state helps the player to acquire media sources and after that it changes the state from unrealized to realized. • In prefetched state it acquire resources and fills buffer data. After that it enters into Started State. Then the stop() is use to stop the player and in close state it releases the acquired resources.
Major parts of mmapi Arch. • DataSource: Consist of process of protocol handling and hides the detail of processing data. it can be created from either an input stream instance or a URL. • Controls: Provides control over the functionality of player. • Manager: It represents static factory class. The createPlayer() method of the Manage class creates an instance of player
MMAPI Packages • It provides following three packages: • The javax.microedition.media Package • The javax.microedition.media.control package • The javax.microedition.media.protocol package All the above packages are consist of useful classes and interfaces, such as player interface, ToneControl interface, DataSource class etc.
Using MMAPI • Playing Audio file – Refer AudioMidlet.java • Playing Video file – Refer VideoMidlet.java