summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-12-02 17:42:08 -0800
committerJames Dong <jdong@google.com>2011-01-12 17:12:46 -0800
commit9efe47374b61afd0ce84afa64e9fa5b41dfaef22 (patch)
tree4bb85e1b5ef19ce8cad358a9a52ab05f2e6077e4 /include
parenta29bf14e1d2857debc632ce4304a1c72dded348c (diff)
downloadframeworks_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 'include')
-rw-r--r--include/media/IMediaMetadataRetriever.h4
-rw-r--r--include/media/MediaMetadataRetrieverInterface.h31
-rw-r--r--include/media/mediametadataretriever.h37
3 files changed, 10 insertions, 62 deletions
diff --git a/include/media/IMediaMetadataRetriever.h b/include/media/IMediaMetadataRetriever.h
index 9baba8e..8e3cdbb 100644
--- a/include/media/IMediaMetadataRetriever.h
+++ b/include/media/IMediaMetadataRetriever.h
@@ -32,9 +32,7 @@ public:
virtual void disconnect() = 0;
virtual status_t setDataSource(const char* srcUrl) = 0;
virtual status_t setDataSource(int fd, int64_t offset, int64_t length) = 0;
- virtual status_t setMode(int mode) = 0;
- virtual status_t getMode(int* mode) const = 0;
- virtual sp<IMemory> captureFrame() = 0;
+ virtual sp<IMemory> getFrameAtTime(int64_t timeUs, int option) = 0;
virtual sp<IMemory> extractAlbumArt() = 0;
virtual const char* extractMetadata(int keyCode) = 0;
};
diff --git a/include/media/MediaMetadataRetrieverInterface.h b/include/media/MediaMetadataRetrieverInterface.h
index ff57774..0449122 100644
--- a/include/media/MediaMetadataRetrieverInterface.h
+++ b/include/media/MediaMetadataRetrieverInterface.h
@@ -32,9 +32,7 @@ public:
virtual ~MediaMetadataRetrieverBase() {}
virtual status_t setDataSource(const char *url) = 0;
virtual status_t setDataSource(int fd, int64_t offset, int64_t length) = 0;
- virtual status_t setMode(int mode) = 0;
- virtual status_t getMode(int* mode) const = 0;
- virtual VideoFrame* captureFrame() = 0;
+ virtual VideoFrame* getFrameAtTime(int64_t timeUs, int option) = 0;
virtual MediaAlbumArt* extractAlbumArt() = 0;
virtual const char* extractMetadata(int keyCode) = 0;
};
@@ -43,35 +41,12 @@ public:
class MediaMetadataRetrieverInterface : public MediaMetadataRetrieverBase
{
public:
- MediaMetadataRetrieverInterface()
- : mMode(0) {
- }
+ MediaMetadataRetrieverInterface() {}
virtual ~MediaMetadataRetrieverInterface() {}
-
- // @param mode The intended mode of operations:
- // can be any of the following:
- // METADATA_MODE_NOOP: Experimental - just add and remove data source.
- // METADATA_MODE_FRAME_CAPTURE_ONLY: For capture frame/thumbnail only.
- // METADATA_MODE_METADATA_RETRIEVAL_ONLY: For meta data retrieval only.
- // METADATA_MODE_FRAME_CAPTURE_AND_METADATA_RETRIEVAL: For both frame
- // capture and meta data retrieval.
- virtual status_t setMode(int mode) {
- if (mode < METADATA_MODE_NOOP ||
- mode > METADATA_MODE_FRAME_CAPTURE_AND_METADATA_RETRIEVAL) {
- return BAD_VALUE;
- }
-
- mMode = mode;
- return NO_ERROR;
- }
-
- virtual status_t getMode(int* mode) const { *mode = mMode; return NO_ERROR; }
- virtual VideoFrame* captureFrame() { return NULL; }
+ virtual VideoFrame* getFrameAtTime(int64_t timeUs, int option) { return NULL; }
virtual MediaAlbumArt* extractAlbumArt() { return NULL; }
virtual const char* extractMetadata(int keyCode) { return NULL; }
-
- uint32_t mMode;
};
}; // namespace android
diff --git a/include/media/mediametadataretriever.h b/include/media/mediametadataretriever.h
index ddc07f6..e905006 100644
--- a/include/media/mediametadataretriever.h
+++ b/include/media/mediametadataretriever.h
@@ -42,37 +42,14 @@ enum {
METADATA_KEY_YEAR = 8,
METADATA_KEY_DURATION = 9,
METADATA_KEY_NUM_TRACKS = 10,
- METADATA_KEY_IS_DRM_CRIPPLED = 11,
- METADATA_KEY_CODEC = 12,
- METADATA_KEY_RATING = 13,
- METADATA_KEY_COMMENT = 14,
- METADATA_KEY_COPYRIGHT = 15,
- METADATA_KEY_BIT_RATE = 16,
- METADATA_KEY_FRAME_RATE = 17,
- METADATA_KEY_VIDEO_FORMAT = 18,
- METADATA_KEY_VIDEO_HEIGHT = 19,
- METADATA_KEY_VIDEO_WIDTH = 20,
- METADATA_KEY_WRITER = 21,
- METADATA_KEY_MIMETYPE = 22,
- METADATA_KEY_DISC_NUMBER = 23,
- METADATA_KEY_ALBUMARTIST = 24,
- METADATA_KEY_COMPILATION = 25,
+ METADATA_KEY_WRITER = 11,
+ METADATA_KEY_MIMETYPE = 12,
+ METADATA_KEY_ALBUMARTIST = 13,
+ METADATA_KEY_DISC_NUMBER = 14,
+ METADATA_KEY_COMPILATION = 15,
// Add more here...
};
-// The intended mode of operations:$
-// METADATA_MODE_NOOP: Experimental - just add and remove data source.$
-// METADATA_MODE_FRAME_CAPTURE_ONLY: For capture frame/thumbnail only.$
-// METADATA_MODE_METADATA_RETRIEVAL_ONLY: For meta data retrieval only.$
-// METADATA_MODE_FRAME_CAPTURE_AND_METADATA_RETRIEVAL: For both frame capture
-// and meta data retrieval.$
-enum {
- METADATA_MODE_NOOP = 0x00,
- METADATA_MODE_METADATA_RETRIEVAL_ONLY = 0x01,
- METADATA_MODE_FRAME_CAPTURE_ONLY = 0x02,
- METADATA_MODE_FRAME_CAPTURE_AND_METADATA_RETRIEVAL = 0x03
-};
-
class MediaMetadataRetriever: public RefBase
{
public:
@@ -81,9 +58,7 @@ public:
void disconnect();
status_t setDataSource(const char* dataSourceUrl);
status_t setDataSource(int fd, int64_t offset, int64_t length);
- status_t setMode(int mode);
- status_t getMode(int* mode);
- sp<IMemory> captureFrame();
+ sp<IMemory> getFrameAtTime(int64_t timeUs, int option);
sp<IMemory> extractAlbumArt();
const char* extractMetadata(int keyCode);