summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-07-01 15:02:14 -0700
committerJames Dong <jdong@google.com>2010-07-07 12:11:53 -0700
commit145bfe5eb3e08c9689c28f6bf3287a979438b04b (patch)
treeba140d50bbed7d0f8cb76fb3bd7920ecc5c4a6ce /include
parent91952e5221d2151e10738d7228575c4afe444f5e (diff)
downloadframeworks_av-145bfe5eb3e08c9689c28f6bf3287a979438b04b.zip
frameworks_av-145bfe5eb3e08c9689c28f6bf3287a979438b04b.tar.gz
frameworks_av-145bfe5eb3e08c9689c28f6bf3287a979438b04b.tar.bz2
Allow application to set two more encoding paramters: video profile and level
Change-Id: I673e681cefe184d5c556c612c54600a24a2143e5
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MetaData.h4
-rw-r--r--include/media/stagefright/OMXCodec.h7
2 files changed, 11 insertions, 0 deletions
diff --git a/include/media/stagefright/MetaData.h b/include/media/stagefright/MetaData.h
index 95fe6f6..73f5547 100644
--- a/include/media/stagefright/MetaData.h
+++ b/include/media/stagefright/MetaData.h
@@ -69,6 +69,10 @@ enum {
kKeyDate = 'date', // cstring
kKeyWriter = 'writ', // cstring
+ // video profile and level
+ kKeyVideoProfile = 'vprf', // int32_t
+ kKeyVideoLevel = 'vlev', // int32_t
+
// Set this key to enable authoring files in 64-bit offset
kKey64BitFileOffset = 'fobt', // int32_t (bool)
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h
index 99ec8e6..214f43a 100644
--- a/include/media/stagefright/OMXCodec.h
+++ b/include/media/stagefright/OMXCodec.h
@@ -27,6 +27,7 @@ namespace android {
class MemoryDealer;
struct OMXCodecObserver;
+struct CodecProfileLevel;
struct OMXCodec : public MediaSource,
public MediaBufferObserver {
@@ -178,6 +179,12 @@ private:
status_t setupMPEG4EncoderParameters(const sp<MetaData>& meta);
status_t setupAVCEncoderParameters(const sp<MetaData>& meta);
+ // If profile/level is set in the meta data, its value in the meta
+ // data will be used; otherwise, the default value will be used.
+ status_t getVideoProfileLevel(const sp<MetaData>& meta,
+ const CodecProfileLevel& defaultProfileLevel,
+ CodecProfileLevel& profileLevel);
+
status_t setVideoOutputFormat(
const char *mime, OMX_U32 width, OMX_U32 height);