[XDA-University] whitemamba:
Hey guys I have this error, not sure what to do now:

oduct/huashan/obj/lib/libstagefright_soft_vpxenc.so)
target SharedLib: camera.qcom (/Volumes/vanir/vanir-4.3/out/target/product/huashan/obj/SHARED_LIBRARIES/camera.qcom_intermediates/LINKED/camera.qcom.so)
device/sony/qcom-common/camera/CameraWrapper.cpp:204: error: undefined reference to 'android::CameraParameters::KEY_SUPPORTED_ISO_MODES'
device/sony/qcom-common/camera/CameraWrapper.cpp:204: error: undefined reference to 'android::CameraParameters::KEY_ISO_MODE'
device/sony/qcom-common/camera/CameraWrapper.cpp:241: error: undefined reference to 'android::CameraParameters::KEY_ISO_MODE'
collect2: error: ld returned 1 exit status
make: *** [/Volumes/vanir/vanir-4.3/out/target/product/huashan/obj/SHARED_LIBRARIES/camera.qcom_intermediates/LINKED/camera.qcom.so] Error 1
make: *** Waiting for unfinished jobs....
hardware/qcom/media-caf/dashplayer/DashPlayer.cpp:1737: error: undefined reference to 'android::DashPlayerStats::setFileDescAndOutputStream(int)'
hardware/qcom/media-caf/dashplayer/DashPlayer.cpp:789: error: undefined reference to 'android::DashPlayer::Renderer::notifySeekPosition(long long)'
collect2: error: ld returned 1 exit status
make: *** [/Volumes/vanir/vanir-4.3/out/target/product/huashan/obj/SHARED_LIBRARIES/libdashplayer_intermediates/LINKED/libdashplayer.so] Error 1

Here are my affected files:

CameraWrapper.cpp

/*

//#define LOG_NDEBUG 0
//#define LOG_PARAMETERS

#define LOG_TAG "CameraWrapper"
#include <cutils/log.h>

#include <utils/threads.h>
#include <utils/String8.h>
#include <hardware/hardware.h>
#include <hardware/camera.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
#include <cutils/properties.h>

// Sony parameter names
static char KEY_SONY_IMAGE_STABILISER_VALUES[] = "sony-is-values";
static char KEY_SONY_IMAGE_STABILISER[] = "sony-is";
static char KEY_SONY_VIDEO_STABILISER[] = "sony-vs";
static char KEY_SONY_VIDEO_HDR[] = "sony-video-hdr";
static char KEY_SONY_VIDEO_HDR_VALUES[] = "sony-video-hdr-values";
static char KEY_SONY_ISO_AVAIL_MODES[] = "sony-iso-values";
static char KEY_SONY_ISO_MODE[] = "sony-iso";
static char KEY_SONY_AE_MODE_VALUES[] = "sony-ae-mode-values";
static char KEY_SONY_AE_MODE[] = "sony-ae-mode";

// Sony parameter values
static char VALUE_SONY_ON[] = "on";
static char VALUE_SONY_OFF[] = "off";
static char VALUE_SONY_STILL_HDR[] = "on-still-hdr";

... ...

static char * camera_fixup_getparams(int id, const char * settings)
{
android::CameraParameters params;
params.unflatten(android::String8(settings));

camera_fixup_capability(&params);

if (params.get(KEY_SONY_ISO_AVAIL_MODES)) {
// fixup the iso mode list with those that are in the sony list
const char* isoModeList = params.get(KEY_SONY_ISO_AVAIL_MODES);
char buffer[255] = "ISO";
char bufferPos = 3;
for (int pos = 0; pos < strlen(isoModeList); pos++) {
if (isoModeList[pos] != ',') {
buffer[bufferPos++] = isoModeList[pos];
} else {
strcat(buffer,",ISO");
bufferPos += 4;
}
}
sprintf(buffer, "%s,auto", buffer);
[B]params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, buffer);[/B]
}

if (params.get(KEY_SONY_IMAGE_STABILISER)) {
const char* sony_is = params.get(KEY_SONY_IMAGE_STABILISER);
if (strcmp(sony_is, VALUE_SONY_STILL_HDR) == 0) {
// Scene mode is HDR then (see fixup_setparams)
params.set(android::CameraParameters::KEY_SCENE_MODE, "hdr");
}
}

if (params.get(KEY_SONY_VIDEO_HDR) && params.get(KEY_SONY_VIDEO_HDR_VALUES)) {
params.set("video-hdr-values", params.get(KEY_SONY_VIDEO_HDR_VALUES));
params.set("video-hdr", params.get(KEY_SONY_VIDEO_HDR));
}

if (params.get(KEY_SONY_ISO_MODE)) {
if (params.get(KEY_SONY_AE_MODE_VALUES)) {
const char* aeMode = params.get(KEY_SONY_AE_MODE);
if (strcmp(aeMode, "auto") == 0 ) {
params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
params.set("shutter-speed","auto");
} else if (strcmp(aeMode, "iso-prio") == 0) {
char* isoVal = (char*)malloc(sizeof(char)*
(3 + strlen(params.get(KEY_SONY_ISO_MODE))));
sprintf(isoVal,"ISO%s",params.get(KEY_SONY_ISO_MODE));
[B]params.set(android::CameraParameters::KEY_ISO_MODE,isoVal);[/B]
params.set("shutter-speed","auto");
} else if (strcmp(aeMode, "shutter-prio") == 0) {
params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
const char* shutterSpeed = params.get("sony-shutter-speed");
if (shutterSpeed) {
params.set("shutter-speed",shutterSpeed);
}
} else if (strcmp(aeMode, "manual") == 0) {
const char* shutterSpeed = params.get("sony-shutter-speed");
if (shutterSpeed) {
params.set("shutter-speed",shutterSpeed);
}
char* isoVal = (char*)malloc(sizeof(char)*
(3 + strlen(params.get(KEY_SONY_ISO_MODE))));
sprintf(isoVal,"ISO%s",params.get(KEY_SONY_ISO_MODE));
[B]params.set(android::CameraParameters::KEY_ISO_MODE,isoVal);[/B]
} else {
params.set(android::CameraParameters::KEY_ISO_MODE, "auto");
params.set("shutter-speed","auto");
}
}
}

android::String8 strParams = params.flatten();
char *ret = strdup(strParams.string());

ALOGD("%s: get parameters fixed up", __FUNCTION__);
return ret;
}

... ...

DashPlayer.cpp

/*

//#define LOG_NDEBUG 0

#define LOG_TAG "DashPlayer"
#define SRMax 30
#include <utils/Log.h>
#include <dlfcn.h> // for dlopen/dlclose
#include "DashPlayer.h"
#ifdef QCOM_WFD_SINK
#include "WFDRenderer.h"
#endif //QCOM_WFD_SINK
//#include "HTTPLiveSource.h"
#include "DashPlayerDecoder.h"
#include "DashPlayerDriver.h"
#include "DashPlayerRenderer.h"
#include "DashPlayerSource.h"
#include "DashCodec.h"
//#include "RTSPSource.h"
//#include "StreamingSource.h"
//#include "GenericSource.h"

#include "ATSParser.h"
#include <media/stagefright/foundation/hexdump.h>
#include <media/stagefright/foundation/ABuffer.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AMessage.h>
#include <media/stagefright/foundation/AString.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
#include <media/stagefright/MetaData.h>
#include <TextDescriptions.h>

#ifdef ANDROID_JB_MR2
#include <gui/IGraphicBufferProducer.h>
#else
#include <gui/ISurfaceTexture.h>
#endif

#include <cutils/properties.h>
#include "avc_utils.h"

namespace android {

////////////////////////////////////////////////////////////////////////////////

DashPlayer::DashPlayer()
: mUIDValid(false),
mVideoIsAVC(false),
mAudioEOS(false),
mVideoEOS(false),
mScanSourcesPending(false),
mScanSourcesGeneration(0),
mTimeDiscontinuityPending(false),
mFlushingAudio(NONE),
mFlushingVideo(NONE),
mResetInProgress(false),
mResetPostponed(false),
mSetVideoSize(true),
mSkipRenderingAudioUntilMediaTimeUs(-1ll),
mSkipRenderingVideoUntilMediaTimeUs(-1ll),
mVideoLateByUs(0ll),
mNumFramesTotal(0ll),
mNumFramesDropped(0ll),
mPauseIndication(false),
mSourceType(kDefaultSource),
mRenderer(NULL),
mIsSecureInputBuffers(false),
mStats(NULL),
mBufferingNotification(false),
mSRid(0) {
mTrackName = new char[6];
}

DashPlayer::~DashPlayer() {
if (mRenderer != NULL) {
looper()->unregisterHandler(mRenderer->id());
}
if (mAudioDecoder != NULL) {
looper()->unregisterHandler(mAudioDecoder->id());
}
if (mVideoDecoder != NULL) {
looper()->unregisterHandler(mVideoDecoder->id());
}
if (mTextDecoder != NULL) {
looper()->unregisterHandler(mTextDecoder->id());
}
if(mStats != NULL) {
mStats->logFpsSummary();
mStats = NULL;
}
if (mTrackName != NULL) {
delete[] mTrackName;
mTrackName = NULL;
}
}

... ...

if (mDriver != NULL) {
sp<DashPlayerDriver> driver = mDriver.promote();
if (driver != NULL) {
if( newSeekTime >= 0 ) {
[B]mRenderer->notifySeekPosition(newSeekTime);[/B]
driver->notifyPosition( newSeekTime );
mSource->notifyRenderingPosition(newSeekTime);
driver->notifySeekComplete();
}
}
}

break;
}

... ...

status_t DashPlayer::dump(int fd, const Vector<String16> &args)
{
if(mStats != NULL) {
[B]mStats->setFileDescAndOutputStream(fd);[/B]
}

return OK;
}

Maybe it is the problem with GCC 4.8? I am building on Mac OS X, but GCC 4.7 worked fine on another ROM. How do I switch back to GCC 4.7?

Thanks in advance! :D