diff options
author | James Dong <jdong@google.com> | 2010-12-02 17:42:08 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-01-12 17:12:46 -0800 |
commit | 9efe47374b61afd0ce84afa64e9fa5b41dfaef22 (patch) | |
tree | 4bb85e1b5ef19ce8cad358a9a52ab05f2e6077e4 /cmds | |
parent | a29bf14e1d2857debc632ce4304a1c72dded348c (diff) | |
download | frameworks_base-9efe47374b61afd0ce84afa64e9fa5b41dfaef22.zip frameworks_base-9efe47374b61afd0ce84afa64e9fa5b41dfaef22.tar.gz frameworks_base-9efe47374b61afd0ce84afa64e9fa5b41dfaef22.tar.bz2 |
Squash commits of the following patches, cherry-picked from other branch - do not merge.
o Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode
o Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime()
as part of the preparation for publishing MediaMetadataRetriever as public Java API
o Remove captureFrame from MediaMetadataRetriever.java class
It has been replaced by getFrameAtTime() method
o Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java
o Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc
o part of a multi-project change.
bug - 3309041
Change-Id: I2efb6e8b8d52897186b016cb4efda6862f5584c4
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/stagefright/stagefright.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp index f55b746..ff92431 100644 --- a/cmds/stagefright/stagefright.cpp +++ b/cmds/stagefright/stagefright.cpp @@ -596,21 +596,19 @@ int main(int argc, char **argv) { const char *filename = argv[k]; CHECK_EQ(retriever->setDataSource(filename), (status_t)OK); - CHECK_EQ(retriever->setMode( - METADATA_MODE_FRAME_CAPTURE_AND_METADATA_RETRIEVAL), - (status_t)OK); - - sp<IMemory> mem = retriever->captureFrame(); + sp<IMemory> mem = + retriever->getFrameAtTime(-1, + MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC); if (mem != NULL) { - printf("captureFrame(%s) => OK\n", filename); + printf("getFrameAtTime(%s) => OK\n", filename); } else { mem = retriever->extractAlbumArt(); if (mem != NULL) { printf("extractAlbumArt(%s) => OK\n", filename); } else { - printf("both captureFrame and extractAlbumArt " + printf("both getFrameAtTime and extractAlbumArt " "failed on file '%s'.\n", filename); } } |