aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--videocodec/OMXVideoEncoderAVC.cpp28
-rw-r--r--videocodec/OMXVideoEncoderAVC.h2
-rw-r--r--videocodec/OMXVideoEncoderBase.cpp4
-rw-r--r--videocodec/OMXVideoEncoderBase.h2
-rw-r--r--videocodec/OMXVideoEncoderH263.cpp30
-rw-r--r--videocodec/OMXVideoEncoderH263.h1
-rw-r--r--videocodec/OMXVideoEncoderMPEG4.cpp29
-rw-r--r--videocodec/OMXVideoEncoderMPEG4.h1
8 files changed, 93 insertions, 4 deletions
diff --git a/videocodec/OMXVideoEncoderAVC.cpp b/videocodec/OMXVideoEncoderAVC.cpp
index 9a39570..9a59485 100644
--- a/videocodec/OMXVideoEncoderAVC.cpp
+++ b/videocodec/OMXVideoEncoderAVC.cpp
@@ -466,9 +466,37 @@ OMX_ERRORTYPE OMXVideoEncoderAVC::BuildHandlerList(void) {
AddHandler((OMX_INDEXTYPE)OMX_IndexConfigIntelSliceNumbers, GetConfigIntelSliceNumbers, SetConfigIntelSliceNumbers);
AddHandler((OMX_INDEXTYPE)OMX_IndexParamIntelAVCVUI, GetParamIntelAVCVUI, SetParamIntelAVCVUI);
AddHandler((OMX_INDEXTYPE)OMX_IndexParamVideoBytestream, GetParamVideoBytestream, SetParamVideoBytestream);
+ AddHandler((OMX_INDEXTYPE)OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
return OMX_ErrorNone;
}
+OMX_ERRORTYPE OMXVideoEncoderAVC::GetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure;
+ CHECK_TYPE_HEADER(p);
+ CHECK_PORT_INDEX(p, OUTPORT_INDEX);
+
+ struct ProfileLevelTable {
+ OMX_U32 profile;
+ OMX_U32 level;
+ } plTable[] = {
+ {OMX_VIDEO_AVCProfileBaseline, OMX_VIDEO_AVCLevel41},
+ };
+
+ OMX_U32 count = sizeof(plTable)/sizeof(ProfileLevelTable);
+ CHECK_ENUMERATION_RANGE(p->nProfileIndex,count);
+
+ p->eProfile = plTable[p->nProfileIndex].profile;
+ p->eLevel = plTable[p->nProfileIndex].level;
+
+ return OMX_ErrorNone;
+}
+
+OMX_ERRORTYPE OMXVideoEncoderAVC::SetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ LOGW("SetParamVideoAVCProfileLevel is not supported.");
+ return OMX_ErrorUnsupportedSetting;
+}
+
OMX_ERRORTYPE OMXVideoEncoderAVC::GetParamVideoAvc(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_AVCTYPE *p = (OMX_VIDEO_PARAM_AVCTYPE *)pStructure;
diff --git a/videocodec/OMXVideoEncoderAVC.h b/videocodec/OMXVideoEncoderAVC.h
index e0de2f2..1f32118 100644
--- a/videocodec/OMXVideoEncoderAVC.h
+++ b/videocodec/OMXVideoEncoderAVC.h
@@ -46,7 +46,7 @@ protected:
DECLARE_HANDLER(OMXVideoEncoderAVC, ParamIntelAVCVUI);
DECLARE_HANDLER(OMXVideoEncoderAVC, ParamVideoBytestream);
DECLARE_HANDLER(OMXVideoEncoderAVC, ConfigIntelSliceNumbers);
-
+ DECLARE_HANDLER(OMXVideoEncoderAVC, ParamVideoProfileLevelQuerySupported);
private:
enum {
diff --git a/videocodec/OMXVideoEncoderBase.cpp b/videocodec/OMXVideoEncoderBase.cpp
index 0c812e1..63ab076 100644
--- a/videocodec/OMXVideoEncoderBase.cpp
+++ b/videocodec/OMXVideoEncoderBase.cpp
@@ -443,7 +443,7 @@ OMX_ERRORTYPE OMXVideoEncoderBase::BuildHandlerList(void) {
AddHandler(OMX_IndexConfigVideoFramerate, GetConfigVideoFramerate, SetConfigVideoFramerate);
AddHandler(OMX_IndexConfigVideoIntraVOPRefresh, GetConfigVideoIntraVOPRefresh, SetConfigVideoIntraVOPRefresh);
//AddHandler(OMX_IndexParamIntelAdaptiveSliceControl, GetParamIntelAdaptiveSliceControl, SetParamIntelAdaptiveSliceControl);
- AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
+ //AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
AddHandler((OMX_INDEXTYPE)OMX_IndexStoreMetaDataInBuffers, GetStoreMetaDataInBuffers, SetStoreMetaDataInBuffers);
return OMX_ErrorNone;
@@ -786,6 +786,7 @@ OMX_ERRORTYPE OMXVideoEncoderBase::SetParamIntelAdaptiveSliceControl(OMX_PTR pSt
return OMX_ErrorNone;
}
+/*
OMX_ERRORTYPE OMXVideoEncoderBase::GetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure;
@@ -804,6 +805,7 @@ OMX_ERRORTYPE OMXVideoEncoderBase::SetParamVideoProfileLevelQuerySupported(OMX_P
LOGW("SetParamVideoProfileLevelQuerySupported is not supported.");
return OMX_ErrorUnsupportedSetting;
}
+*/
OMX_ERRORTYPE OMXVideoEncoderBase::GetStoreMetaDataInBuffers(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
diff --git a/videocodec/OMXVideoEncoderBase.h b/videocodec/OMXVideoEncoderBase.h
index 95c8216..ee36f47 100644
--- a/videocodec/OMXVideoEncoderBase.h
+++ b/videocodec/OMXVideoEncoderBase.h
@@ -65,7 +65,7 @@ protected:
DECLARE_HANDLER(OMXVideoEncoderBase, ConfigVideoFramerate);
DECLARE_HANDLER(OMXVideoEncoderBase, ConfigVideoIntraVOPRefresh);
DECLARE_HANDLER(OMXVideoEncoderBase, ParamIntelAdaptiveSliceControl);
- DECLARE_HANDLER(OMXVideoEncoderBase, ParamVideoProfileLevelQuerySupported);
+ //DECLARE_HANDLER(OMXVideoEncoderBase, ParamVideoProfileLevelQuerySupported);
DECLARE_HANDLER(OMXVideoEncoderBase, StoreMetaDataInBuffers);
protected:
diff --git a/videocodec/OMXVideoEncoderH263.cpp b/videocodec/OMXVideoEncoderH263.cpp
index 15572a4..00d66e7 100644
--- a/videocodec/OMXVideoEncoderH263.cpp
+++ b/videocodec/OMXVideoEncoderH263.cpp
@@ -40,7 +40,7 @@ OMX_ERRORTYPE OMXVideoEncoderH263::InitOutputPortFormatSpecific(OMX_PARAM_PORTDE
mParamH263.nPortIndex = OUTPORT_INDEX;
mParamH263.eProfile = OMX_VIDEO_H263ProfileBaseline;
// TODO: check eLevel, 10
- mParamH263.eLevel = OMX_VIDEO_H263Level70; //OMX_VIDEO_H263Level10;
+ mParamH263.eLevel = OMX_VIDEO_H263Level45; //OMX_VIDEO_H263Level10;
// override OMX_PARAM_PORTDEFINITIONTYPE
paramPortDefinitionOutput->nBufferCountActual = OUTPORT_ACTUAL_BUFFER_COUNT;
@@ -236,9 +236,37 @@ out:
OMX_ERRORTYPE OMXVideoEncoderH263::BuildHandlerList(void) {
OMXVideoEncoderBase::BuildHandlerList();
AddHandler(OMX_IndexParamVideoH263, GetParamVideoH263, SetParamVideoH263);
+ AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
return OMX_ErrorNone;
}
+OMX_ERRORTYPE OMXVideoEncoderH263::GetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure;
+ CHECK_TYPE_HEADER(p);
+ CHECK_PORT_INDEX(p, OUTPORT_INDEX);
+
+ struct ProfileLevelTable {
+ OMX_U32 profile;
+ OMX_U32 level;
+ } plTable[] = {
+ {OMX_VIDEO_H263ProfileBaseline, OMX_VIDEO_H263Level45}
+ };
+
+ OMX_U32 count = sizeof(plTable)/sizeof(ProfileLevelTable);
+ CHECK_ENUMERATION_RANGE(p->nProfileIndex,count);
+
+ p->eProfile = plTable[p->nProfileIndex].profile;
+ p->eLevel = plTable[p->nProfileIndex].level;
+
+ return OMX_ErrorNone;
+}
+
+OMX_ERRORTYPE OMXVideoEncoderH263::SetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ LOGW("SetParamVideoH263ProfileLevel is not supported.");
+ return OMX_ErrorUnsupportedSetting;
+}
+
OMX_ERRORTYPE OMXVideoEncoderH263::GetParamVideoH263(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_H263TYPE *p = (OMX_VIDEO_PARAM_H263TYPE *)pStructure;
diff --git a/videocodec/OMXVideoEncoderH263.h b/videocodec/OMXVideoEncoderH263.h
index 44f5fbc..172763e 100644
--- a/videocodec/OMXVideoEncoderH263.h
+++ b/videocodec/OMXVideoEncoderH263.h
@@ -38,6 +38,7 @@ protected:
virtual OMX_ERRORTYPE BuildHandlerList(void);
virtual OMX_ERRORTYPE SetVideoEncoderParam();
DECLARE_HANDLER(OMXVideoEncoderH263, ParamVideoH263);
+ DECLARE_HANDLER(OMXVideoEncoderH263, ParamVideoProfileLevelQuerySupported);
private:
enum {
diff --git a/videocodec/OMXVideoEncoderMPEG4.cpp b/videocodec/OMXVideoEncoderMPEG4.cpp
index d9273f4..918b391 100644
--- a/videocodec/OMXVideoEncoderMPEG4.cpp
+++ b/videocodec/OMXVideoEncoderMPEG4.cpp
@@ -240,9 +240,38 @@ out:
OMX_ERRORTYPE OMXVideoEncoderMPEG4::BuildHandlerList(void) {
OMXVideoEncoderBase::BuildHandlerList();
AddHandler(OMX_IndexParamVideoMpeg4, GetParamVideoMpeg4, SetParamVideoMpeg4);
+ AddHandler(OMX_IndexParamVideoProfileLevelQuerySupported, GetParamVideoProfileLevelQuerySupported, SetParamVideoProfileLevelQuerySupported);
return OMX_ErrorNone;
}
+
+OMX_ERRORTYPE OMXVideoEncoderMPEG4::GetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ OMX_ERRORTYPE ret;
+ OMX_VIDEO_PARAM_PROFILELEVELTYPE *p = (OMX_VIDEO_PARAM_PROFILELEVELTYPE *)pStructure;
+ CHECK_TYPE_HEADER(p);
+ CHECK_PORT_INDEX(p, OUTPORT_INDEX);
+
+ struct ProfileLevelTable {
+ OMX_U32 profile;
+ OMX_U32 level;
+ } plTable[] = {
+ {OMX_VIDEO_MPEG4ProfileSimple, OMX_VIDEO_MPEG4Level5},
+ };
+
+ OMX_U32 count = sizeof(plTable)/sizeof(ProfileLevelTable);
+ CHECK_ENUMERATION_RANGE(p->nProfileIndex,count);
+
+ p->eProfile = plTable[p->nProfileIndex].profile;
+ p->eLevel = plTable[p->nProfileIndex].level;
+
+ return OMX_ErrorNone;
+}
+
+OMX_ERRORTYPE OMXVideoEncoderMPEG4::SetParamVideoProfileLevelQuerySupported(OMX_PTR pStructure) {
+ LOGW("SetParamVideoMpeg4ProfileLevel is not supported.");
+ return OMX_ErrorUnsupportedSetting;
+}
+
OMX_ERRORTYPE OMXVideoEncoderMPEG4::GetParamVideoMpeg4(OMX_PTR pStructure) {
OMX_ERRORTYPE ret;
OMX_VIDEO_PARAM_MPEG4TYPE *p = (OMX_VIDEO_PARAM_MPEG4TYPE *)pStructure;
diff --git a/videocodec/OMXVideoEncoderMPEG4.h b/videocodec/OMXVideoEncoderMPEG4.h
index 33b93a2..31f75d9 100644
--- a/videocodec/OMXVideoEncoderMPEG4.h
+++ b/videocodec/OMXVideoEncoderMPEG4.h
@@ -39,6 +39,7 @@ protected:
virtual OMX_ERRORTYPE BuildHandlerList(void);
virtual OMX_ERRORTYPE SetVideoEncoderParam();
DECLARE_HANDLER(OMXVideoEncoderMPEG4, ParamVideoMpeg4);
+ DECLARE_HANDLER(OMXVideoEncoderMPEG4, ParamVideoProfileLevelQuerySupported);
private:
enum {