diff options
author | Andreas Huber <andih@google.com> | 2010-03-12 15:08:52 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-03-12 15:08:52 -0800 |
commit | 93e1fb99a0c66784b49b105ce84a23baf054ee9c (patch) | |
tree | a8e515ed08896dbd16463cb4b7ad85b3162c584c /media/libstagefright | |
parent | c116510dd22091369ab15b63fbbc176e1fb39a04 (diff) | |
download | frameworks_av-93e1fb99a0c66784b49b105ce84a23baf054ee9c.zip frameworks_av-93e1fb99a0c66784b49b105ce84a23baf054ee9c.tar.gz frameworks_av-93e1fb99a0c66784b49b105ce84a23baf054ee9c.tar.bz2 |
Fix the media metadata retriever (tests). The native constants must match those published at the java layer.
Change-Id: Ic1efed709e4d93c61913b231a8cd3ef1074f8ca0
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/StagefrightMetadataRetriever.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/media/libstagefright/StagefrightMetadataRetriever.cpp b/media/libstagefright/StagefrightMetadataRetriever.cpp index 4679207..2968917 100644 --- a/media/libstagefright/StagefrightMetadataRetriever.cpp +++ b/media/libstagefright/StagefrightMetadataRetriever.cpp @@ -206,6 +206,12 @@ static VideoFrame *extractVideoFrameWithCodecFlags( VideoFrame *StagefrightMetadataRetriever::captureFrame() { LOGV("captureFrame"); + if (0 == (mMode & METADATA_MODE_FRAME_CAPTURE_ONLY)) { + LOGV("captureFrame disabled by mode (0x%08x)", mMode); + + return NULL; + } + if (mExtractor.get() == NULL) { LOGV("no extractor."); return NULL; @@ -256,6 +262,12 @@ VideoFrame *StagefrightMetadataRetriever::captureFrame() { MediaAlbumArt *StagefrightMetadataRetriever::extractAlbumArt() { LOGV("extractAlbumArt (extractor: %s)", mExtractor.get() != NULL ? "YES" : "NO"); + if (0 == (mMode & METADATA_MODE_METADATA_RETRIEVAL_ONLY)) { + LOGV("extractAlbumArt/metadata retrieval disabled by mode"); + + return NULL; + } + if (mExtractor == NULL) { return NULL; } @@ -274,6 +286,12 @@ MediaAlbumArt *StagefrightMetadataRetriever::extractAlbumArt() { } const char *StagefrightMetadataRetriever::extractMetadata(int keyCode) { + if (0 == (mMode & METADATA_MODE_METADATA_RETRIEVAL_ONLY)) { + LOGV("extractAlbumArt/metadata retrieval disabled by mode"); + + return NULL; + } + if (mExtractor == NULL) { return NULL; } |