Multimedia Techniques

The Android platform provides comprehensive multimedia functionality. This chapter introduces techniques to manipulate images, record and play back audio, and record and play back video. Most decoders are supported by Android for reading multimedia, but only a subset of encoders is available for creating multimedia. Media framework support in Android 2.2 is summarized in Table 6.1. In particular, note the absence of a lossless compressed audio format. This will change in future releases.

Table 6.1 The Supported Media Types in Android 2.2 for Reading and Writing

Media

Android Native

Type

Compression

Codec Support

Formats

Image

None (raw)

View

BMP

Lossless

View

GIF, PNG

Lossy

Save/View

JPEG

Audio

None (raw)

Record/Play

PCM

(Music)

None (raw)

Play

WAVE

Lossless

No support

For example, FLAC

Lossy

Play

MP3, MP4, AAC, HE-AACvl, HE-AACv2, Ogg Vorbis

Midi

Play

MID, XMF, RTTTL, RTX, OTA, IMY

Audio

Lossy

Record/Play

AMR-NB

(Speech)

Lossy

Play

AMR-WB

Video

Nearly Lossless

Play

H.264

Lossy

Record/Play

H.263, MPEG-4 SP

An application that records any type of media requires setting the appropriate permission in the AndroidManifest XML file (one or both of the following):

<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_VIDEO"/>

Character Building Thought Power

Character Building Thought Power

Character-Building Thought Power by Ralph Waldo Trine. Ralph draws a distinct line between bad and good habits. In this book, every effort is made by the writer to explain what comprises good habits and why every one needs it early in life. It draws the conclusion that habits nurtured in early life concretize into impulses in future for the good or bad of the subject.

Get My Free Ebook


Post a comment