summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-23 10:39:51 -0700
committerGloria Wang <gwang@google.com>2011-06-23 15:28:36 -0700
commit8e51d58fca9b7669f271378f9245e180f4360cbc (patch)
tree22a6d99c3bfb7f41b79aee1e7cffe4c0e76df865
parent06371d97f549981cd2d524c8868fde2ef10dc1e9 (diff)
downloadframeworks_av-8e51d58fca9b7669f271378f9245e180f4360cbc.zip
frameworks_av-8e51d58fca9b7669f271378f9245e180f4360cbc.tar.gz
frameworks_av-8e51d58fca9b7669f271378f9245e180f4360cbc.tar.bz2
- Public part of the Metadata API.
- Modify the media framework test for Metadata. Change-Id: Ib8fa4991f114e1bb88a17ca662844b9b8e1d0faf
-rw-r--r--include/media/Metadata.h71
-rw-r--r--media/libmedia/Metadata.cpp3
2 files changed, 36 insertions, 38 deletions
diff --git a/include/media/Metadata.h b/include/media/Metadata.h
index 9c915ce..07567eb 100644
--- a/include/media/Metadata.h
+++ b/include/media/Metadata.h
@@ -51,47 +51,46 @@ class Metadata {
static const Type kAny = 0;
+ // Playback capabilities.
+ static const Type kPauseAvailable = 1; // Boolean
+ static const Type kSeekBackwardAvailable = 2; // Boolean
+ static const Type kSeekForwardAvailable = 3; // Boolean
+ static const Type kSeekAvailable = 4; // Boolean
+
// Keep in sync with android/media/Metadata.java
- static const Type kTitle = 1; // String
- static const Type kComment = 2; // String
- static const Type kCopyright = 3; // String
- static const Type kAlbum = 4; // String
- static const Type kArtist = 5; // String
- static const Type kAuthor = 6; // String
- static const Type kComposer = 7; // String
- static const Type kGenre = 8; // String
- static const Type kDate = 9; // Date
- static const Type kDuration = 10; // Integer(millisec)
- static const Type kCdTrackNum = 11; // Integer 1-based
- static const Type kCdTrackMax = 12; // Integer
- static const Type kRating = 13; // String
- static const Type kAlbumArt = 14; // byte[]
- static const Type kVideoFrame = 15; // Bitmap
- static const Type kCaption = 16; // TimedText
-
- static const Type kBitRate = 17; // Integer, Aggregate rate of
+ static const Type kTitle = 5; // String
+ static const Type kComment = 6; // String
+ static const Type kCopyright = 7; // String
+ static const Type kAlbum = 8; // String
+ static const Type kArtist = 9; // String
+ static const Type kAuthor = 10; // String
+ static const Type kComposer = 11; // String
+ static const Type kGenre = 12; // String
+ static const Type kDate = 13; // Date
+ static const Type kDuration = 14; // Integer(millisec)
+ static const Type kCdTrackNum = 15; // Integer 1-based
+ static const Type kCdTrackMax = 16; // Integer
+ static const Type kRating = 17; // String
+ static const Type kAlbumArt = 18; // byte[]
+ static const Type kVideoFrame = 19; // Bitmap
+
+ static const Type kBitRate = 20; // Integer, Aggregate rate of
// all the streams in bps.
- static const Type kAudioBitRate = 18; // Integer, bps
- static const Type kVideoBitRate = 19; // Integer, bps
- static const Type kAudioSampleRate = 20; // Integer, Hz
- static const Type kVideoframeRate = 21; // Integer, Hz
+ static const Type kAudioBitRate = 21; // Integer, bps
+ static const Type kVideoBitRate = 22; // Integer, bps
+ static const Type kAudioSampleRate = 23; // Integer, Hz
+ static const Type kVideoframeRate = 24; // Integer, Hz
// See RFC2046 and RFC4281.
- static const Type kMimeType = 22; // String
- static const Type kAudioCodec = 23; // String
- static const Type kVideoCodec = 24; // String
-
- static const Type kVideoHeight = 25; // Integer
- static const Type kVideoWidth = 26; // Integer
- static const Type kNumTracks = 27; // Integer
- static const Type kDrmCrippled = 28; // Boolean
-
- // Playback capabilities.
- static const Type kPauseAvailable = 29; // Boolean
- static const Type kSeekBackwardAvailable = 30; // Boolean
- static const Type kSeekForwardAvailable = 31; // Boolean
- static const Type kSeekAvailable = 32; // Boolean
+ static const Type kMimeType = 25; // String
+ static const Type kAudioCodec = 26; // String
+ static const Type kVideoCodec = 27; // String
+
+ static const Type kVideoHeight = 28; // Integer
+ static const Type kVideoWidth = 29; // Integer
+ static const Type kNumTracks = 30; // Integer
+ static const Type kDrmCrippled = 31; // Boolean
// @param p[inout] The parcel to append the metadata records
// to. The global metadata header should have been set already.
diff --git a/media/libmedia/Metadata.cpp b/media/libmedia/Metadata.cpp
index aec96f1..8eeebbb 100644
--- a/media/libmedia/Metadata.cpp
+++ b/media/libmedia/Metadata.cpp
@@ -32,7 +32,7 @@ namespace {
// All these constants below must be kept in sync with Metadata.java.
enum MetadataId {
FIRST_SYSTEM_ID = 1,
- LAST_SYSTEM_ID = 32,
+ LAST_SYSTEM_ID = 31,
FIRST_CUSTOM_ID = 8192
};
@@ -43,7 +43,6 @@ enum Types {
BOOLEAN_VAL,
LONG_VAL,
DOUBLE_VAL,
- TIMED_TEXT_VAL,
DATE_VAL,
BYTE_ARRAY_VAL,
};