|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.media.MediaMetadataRetriever
public class MediaMetadataRetriever
MediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file.
| Field Summary | |
|---|---|
static int |
METADATA_KEY_ALBUM
|
static int |
METADATA_KEY_ARTIST
|
static int |
METADATA_KEY_AUTHOR
|
static int |
METADATA_KEY_CD_TRACK_NUMBER
|
static int |
METADATA_KEY_COMPOSER
|
static int |
METADATA_KEY_DATE
|
static int |
METADATA_KEY_DURATION
|
static int |
METADATA_KEY_GENRE
|
static int |
METADATA_KEY_NUM_TRACKS
|
static int |
METADATA_KEY_TITLE
|
static int |
METADATA_KEY_YEAR
|
static int |
MODE_CAPTURE_FRAME_ONLY
|
static int |
MODE_GET_METADATA_ONLY
|
| Constructor Summary | |
|---|---|
MediaMetadataRetriever()
|
|
| Method Summary | |
|---|---|
Bitmap |
captureFrame()
Call this method after setDataSource(). |
byte[] |
extractAlbumArt()
Call this method after setDataSource(). |
String |
extractMetadata(int keyCode)
Call this method after setDataSource(). |
protected void |
finalize()
Called by the virtual machine when there are no longer any (non-weak) references to the receiver. |
void |
release()
Call it when one is done with the object. |
void |
setDataSource(String path)
Call this method before the rest. |
void |
setMode(int mode)
Call this method before setDataSource() so that the mode becomes effective for subsequent operations. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MODE_GET_METADATA_ONLY
public static final int MODE_CAPTURE_FRAME_ONLY
public static final int METADATA_KEY_CD_TRACK_NUMBER
public static final int METADATA_KEY_ALBUM
public static final int METADATA_KEY_ARTIST
public static final int METADATA_KEY_AUTHOR
public static final int METADATA_KEY_COMPOSER
public static final int METADATA_KEY_DATE
public static final int METADATA_KEY_GENRE
public static final int METADATA_KEY_TITLE
public static final int METADATA_KEY_YEAR
public static final int METADATA_KEY_DURATION
public static final int METADATA_KEY_NUM_TRACKS
| Constructor Detail |
|---|
public MediaMetadataRetriever()
| Method Detail |
|---|
public void setMode(int mode)
mode - The intended mode of operation. Can be any combination of
MODE_GET_METADATA_ONLY and MODE_CAPTURE_FRAME_ONLY:
1. MODE_GET_METADATA_ONLY & MODE_CAPTURE_FRAME_ONLY:
For neither frame capture nor meta data retrieval
2. MODE_GET_METADATA_ONLY: For meta data retrieval only
3. MODE_CAPTURE_FRAME_ONLY: For frame capture only
4. MODE_GET_METADATA_ONLY | MODE_CAPTURE_FRAME_ONLY:
For both frame capture and meta data retrieval
public void setDataSource(String path)
throws IllegalArgumentException
path - The path of the input media file.
IllegalArgumentException - If the path is invalid.public String extractMetadata(int keyCode)
keyCode - One of the constants listed below at the end of the class.
public Bitmap captureFrame()
public byte[] extractAlbumArt()
public void release()
protected void finalize()
throws Throwable
ObjectNote: The virtual machine assumes that the implementation in class Object is empty.
finalize in class ObjectThrowable - The virtual machine ignores any exceptions which are
thrown during finalization.
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||