summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-07-18 17:46:06 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-07-24 16:59:21 -0700
commitbf5bea96f236adb5eef78c2f414ef82b3602a0f7 (patch)
treeec9dcb7ffdb2de6257fcee026583ffe998fef1d8 /media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
parent7aa1b72252749c990c9a5efce3d8fe399261b88e (diff)
downloadframeworks_av-bf5bea96f236adb5eef78c2f414ef82b3602a0f7.zip
frameworks_av-bf5bea96f236adb5eef78c2f414ef82b3602a0f7.tar.gz
frameworks_av-bf5bea96f236adb5eef78c2f414ef82b3602a0f7.tar.bz2
Codecs: Add MetaDataMode support to software video encoders.
This support is needed to enable efficient video recording with emulator and camera HAL 2. - Update SoftAVCEncoder and SoftMPEG4Encoder to support MetaDataMode extension. - Allow CameraSource to handle opaque pixel formats, so that MetaDataMode can be used. - Remove hardware codec restriction for MetaDataMode Bug: 6243944 Change-Id: I970eb3d55542a413b6d75a78f76d3a8583155601
Diffstat (limited to 'media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h')
-rw-r--r--media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
index 3e90d54..cc4ea8f 100644
--- a/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
+++ b/media/libstagefright/codecs/m4v_h263/enc/SoftMPEG4Encoder.h
@@ -43,6 +43,11 @@ struct SoftMPEG4Encoder : public SimpleSoftOMXComponent {
virtual void onQueueFilled(OMX_U32 portIndex);
+ // Override SoftOMXComponent methods
+
+ virtual OMX_ERRORTYPE getExtensionIndex(
+ const char *name, OMX_INDEXTYPE *index);
+
protected:
virtual ~SoftMPEG4Encoder();
@@ -51,6 +56,10 @@ private:
kNumBuffers = 2,
};
+ enum {
+ kStoreMetaDataExtensionIndex = OMX_IndexVendorStartUnused + 1
+ };
+
// OMX input buffer's timestamp and flags
typedef struct {
int64_t mTimeUs;
@@ -63,6 +72,7 @@ private:
int32_t mVideoFrameRate;
int32_t mVideoBitRate;
int32_t mVideoColorFormat;
+ bool mStoreMetaDataInBuffers;
int32_t mIDRFrameRefreshIntervalInSec;
int64_t mNumInputFrames;
@@ -80,6 +90,9 @@ private:
OMX_ERRORTYPE initEncoder();
OMX_ERRORTYPE releaseEncoder();
+ uint8_t* extractGrallocData(void *data, buffer_handle_t *buffer);
+ void releaseGrallocData(buffer_handle_t buffer);
+
DISALLOW_EVIL_CONSTRUCTORS(SoftMPEG4Encoder);
};