[Android Q&A, Help & Troubleshooting] czarsuperstar@gmail.com:
How to fix ExtendedCodec.cpp

i keep getting this error : frameworks/av/media/libstagefright/ExtendedCodec.cpp:1505:0: error: unterminated argument list invoking macro "ALOGI"

} //namespace android

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:72:40: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]

static const MetaKeyEntry MetaKeyTable[] {

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp: In static member function 'static android::status_t android::ExtendedCodec::setupHEVCEncoderParameters(const android::sp<android::MetaData>&, const android::sp<android::IOMX>&, android::IOMX::node_id, const char*, int, const android::sp<android::eek:MXCodec>&)':

frameworks/av/media/libstagefright/ExtendedCodec.cpp:601:9: error: 'OMX_VIDEO_PARAM_HEVCTYPE' was not declared in this scope

if (OMX_VIDEO_PARAM_HEVCTYPE == h265type;

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:601:37: error: 'h265type' was not declared in this scope

if (OMX_VIDEO_PARAM_HEVCTYPE == h265type;

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:601:45: error: expected ')' before ';' token

if (OMX_VIDEO_PARAM_HEVCTYPE == h265type;

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:601:45: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

frameworks/av/media/libstagefright/ExtendedCodec.cpp:602:19: error: 'h265type' was not declared in this scope

InitOMXParams(h265type);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:41: error: expected type-specifier before 'OMX_VIDEO_HEVCPROFILETYPE'

if (h265type.eProfile = static_cast<OMX_VIDEO_HEVCPROFILETYPE>)(profileLevel.mProfile);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:41: error: expected '>' before 'OMX_VIDEO_HEVCPROFILETYPE'

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:41: error: expected '(' before 'OMX_VIDEO_HEVCPROFILETYPE'

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:41: error: 'OMX_VIDEO_HEVCPROFILETYPE' was not declared in this scope

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:67: error: expected primary-expression before ')' token

if (h265type.eProfile = static_cast<OMX_VIDEO_HEVCPROFILETYPE>)(profileLevel.mProfile);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:91: error: expected ')' before ';' token

if (h265type.eProfile = static_cast<OMX_VIDEO_HEVCPROFILETYPE>)(profileLevel.mProfile);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:622:91: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:36: error: expected type-specifier before 'OMX_VIDEO_HEVCLEVELTYPE'

(h265type.eLevel = static_cast<OMX_VIDEO_HEVCLEVELTYPE>)(profileLevel.mLevel);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:36: error: expected '>' before 'OMX_VIDEO_HEVCLEVELTYPE'

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:36: error: expected '(' before 'OMX_VIDEO_HEVCLEVELTYPE'

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:36: error: 'OMX_VIDEO_HEVCLEVELTYPE' was not declared in this scope

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:60: error: expected primary-expression before ')' token

(h265type.eLevel = static_cast<OMX_VIDEO_HEVCLEVELTYPE>)(profileLevel.mLevel);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:623:82: error: expected ')' before ';' token

(h265type.eLevel = static_cast<OMX_VIDEO_HEVCLEVELTYPE>)(profileLevel.mLevel);

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:625:30: error: 'OMX_VIDEO_HEVCProfileMain' was not declared in this scope

if (h265type.eProfile == OMX_VIDEO_HEVCProfileMain ||

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:626:30: error: 'OMX_VIDEO_HEVCProfileMain10' was not declared in this scope

h265type.eProfile == OMX_VIDEO_HEVCProfileMain10){

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: 'ALOGI' was not declared in this scope

ALOGI("Profile type is %d", h265type.eProfile;

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: expected ';' at end of input

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: expected '}' at end of input

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: expected '}' at end of input

frameworks/av/media/libstagefright/ExtendedCodec.cpp: At global scope:

frameworks/av/media/libstagefright/ExtendedCodec.cpp:588:14: warning: unused parameter 'componentName' [-Wunused-parameter]

status_t ExtendedCodec::setupHEVCEncoderParameters

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: expected '}' at end of input

ALOGI("Profile type is %d", h265type.eProfile;

^

frameworks/av/media/libstagefright/ExtendedCodec.cpp: In static member function 'static android::status_t android::ExtendedCodec::setupHEVCEncoderParameters(const android::sp<android::MetaData>&, const android::sp<android::IOMX>&, android::IOMX::node_id, const char*, int, const android::sp<android::eek:MXCodec>&)':

frameworks/av/media/libstagefright/ExtendedCodec.cpp:627:9: error: control reaches end of non-void function [-Werror=return-type]

ALOGI("Profile type is %d", h265type.eProfile;

^

cc1plus: some warnings being treated as errors

make: *** [/home/czarsuperstar/aosp/out/target/product/w5/obj/SHARED_LIBRARIES/libstagefright_intermediates/ExtendedCodec.o] Error 1

make: *** Waiting for unfinished jobs....

---------- Post added at 06:21 PM ---------- Previous post was at 06:08 PM ----------

this is code from the cpp :if (OMX_VIDEO_PARAM_HEVCTYPE == h265type;

InitOMXParams(h265type);

h265type.nPortIndex = portIndex;

status_t err = omx->getParameter(

node, (OMX_INDEXTYPE)OMX_IndexParamVideoHevc, h265type, sizeof(h265type));

if (err != OK) {

ALOGE("Error: getParameter IndexParamVideoHevc failed");

return UNKNOWN_ERROR;

}

// Check profile and level parameters

CodecProfileLevel defaultProfileLevel, profileLevel;

defaultProfileLevel.mProfile = h265type.eProfile;

defaultProfileLevel.mLevel = h265type.eLevel;

err = target->getVideoProfileLevel(meta, defaultProfileLevel, profileLevel);

if (err != OK) {

ALOGE("Error: failed to get Profile / Level");

return err;

}

if (h265type.eProfile = static_cast = <OMX_VIDEO_HEVCPROFILETYPE>)(profileLevel.mProfile);

(h265type.eLevel = static_cast = <OMX_VIDEO_HEVCLEVELTYPE>)(profileLevel.mLevel);

if (h265type.eProfile == OMX_VIDEO_HEVCProfileMain ||

h265type.eProfile == OMX_VIDEO_HEVCProfileMain10){

ALOGI("Profile type is %d", h265type.eProfile;

} else {

ALOGW("Use main profile instead of %d for HEVC recording",

(h265type.eProfile);

h265type.eProfile == OMX_VIDEO_HEVCProfileMain;

}

return err;

}

please help me. Thank you.