Android Multimedia Framework

Multimedia in Android tutorials


Android includes Stagefright, a media playback engine at the native level that has built-in software-based codecs for popular media formats.

Stagefright audio and video playback features include integration with OpenMAX codecs, session management, time-synchronized rendering, transport control, and DRM.

Stagefright also supports integration with custom hardware codecs provided by you. To set a hardware path to encode and decode media, you must implement a hardware-based codec as an OpenMax IL (Integration Layer) component.

Note: Stagefright updates can occur through the Android monthly security update process and as part of an Android OS release.

Architecture

Media applications interact with the Android native multimedia framework according to the following architecture.

Figure 1. Media architecture

Application Framework Binder IPC The Binder IPC proxies facilitate communication over process boundaries. They are located in the frameworks/av/media/libmedia directory and begin with the letter "I". Native Multimedia Framework At the native level, Android provides a multimedia framework that utilizes the Stagefright engine for audio and video recording and playback. Stagefright comes with a default list of supported software codecs and you can implement your own hardware codec by using the OpenMax integration layer standard. For more implementation details, see the MediaPlayer and Stagefright components located in frameworks/av/media. OpenMAX Integration Layer (IL) The OpenMAX IL provides a standardized way for Stagefright to recognize and use custom hardware-based multimedia codecs called components. You must provide an OpenMAX plugin in the form of a shared library named libstagefrighthw.so. This plugin links Stagefright with your custom codec components, which must be implemented according to the OpenMAX IL component standard.

Implementing custom codecs

Stagefright comes with built-in software codecs for common media formats, but you can also add your own custom hardware codecs as OpenMAX components. To do this, you must create the OMX components and an OMX plugin that hooks together your custom codecs with the Stagefright framework. For example components, see the hardware/ti/omap4xxx/domx/; for an example plugin for the Galaxy Nexus, see hardware/ti/omap4xx/libstagefrighthw.

To add your own codecs:

  1. Create your components according to the OpenMAX IL component standard. The component interface is located in the frameworks/native/include/media/OpenMAX/OMX_Component.h file. To learn more about the OpenMAX IL specification, refer to the OpenMAX website.
  2. Create a OpenMAX plugin that links your components with the Stagefright service. For the interfaces to create the plugin, see frameworks/native/include/media/hardware/OMXPluginBase.h and HardwareAPI.h header files.
  3. Build your plugin as a shared library with the name libstagefrighthw.so in your product Makefile. For example:

    LOCAL_MODULE := libstagefrighthw

    In your device's Makefile, ensure you declare the module as a product package:

    PRODUCT_PACKAGES += libstagefrighthw ...

Exposing codecs to the framework

The Stagefright service parses the system/etc/media_codecs.xml and system/etc/media_profiles.xml to expose the supported codecs and profiles on the device to app developers via the android.media.MediaCodecList and android.media.CamcorderProfile classes. You must create both files in the device/// directory and copy this over to the system image's system/etc directory in your device's Makefile. For example:

PRODUCT_COPY_FILES += device/samsung/tuna/media_profiles.xml:system/etc/media_profiles.xml device/samsung/tuna/media_codecs.xml:system/etc/media_codecs.xml

For complete examples, seee device/samsung/tuna/media_codecs.xml and device/samsung/tuna/media_profiles.xml .

blogging and making money blogging as a business blogging apps that pay blogging about mental health blogging business blogging boys blogging best practices blogging business ideas blogging books blogging basics blogging bishop blogging business plan vlogging camera blogging courses blogging classes blogging courses for beginners blogging conferences 2021 blogging conferences 2022 blogging coach vlogging camera with flip screen blogging definition blogging dirty blogging dog center blogging def blogging definition and example blogging define blogging dallas cowboys blogging degree blogging examples blogging equipment blogging etiquette blogging essentials blogging events blogging explained blogging earning potential blogging essential tools blogging for beginners blogging for money blogging for dummies blogging for kids blogging for free blogging for seo blogging for students blogging for business blogging guide blogging goals blogging godaddy blogging gif blogging gigs blogging guidelines blogging google blogging guide substack bloggingheads blogging how to blogging hashtags blogging helps your inbound marketing by blogging history blogging hubspot blogging hoosier history blogging host sites blogging ideas blogging in 2021 blogging income blogging ideas for beginners blogging in the classroom blogging images blogging in spanish blogging is dead


Share this article





Related Posts


Multimedia in Games
Multimedia in Games

Latest Posts
Interactive Multimedia applications
Interactive Multimedia…
University of Library Studies and Information…
Griffin Technology NA16029 PowerMate USB Multimedia Controller
Griffin Technology…
The quintessential control knob for all…
Free multimedia software Download
Free multimedia…
Works on Win10, which can t be said about…
Multimedia Designer
Multimedia Designer
What is a Multimedia Designer? Multimedia…
Multimedia Arts and Design
Multimedia Arts…
Did You Know.Full Sail University offers…
Search
Featured posts
  • Presentation tools in multimedia
  • Multimedia Information Technology
  • Multimedia in Games
  • Multimedia Internet
  • Double DIN Multimedia
  • Types of text in Multimedia
  • Importance of Multimedia in Education
  • Mac multimedia software
  • Multimedia software Free Download
Copyright © 2022 l multimedia-technology.com. All rights reserved.