修复编译错误和警告

PtzNew
Matthew 3 months ago
parent 09dae14725
commit 7212994a5f

@ -171,11 +171,27 @@ void Runner::RequestCapture(CTerminal* pTerminal, unsigned int channel, unsigned
pTerminal->RequestCapture(channel, preset, type, scheduleTime);
}
#include <signal.h>
#include <android/log.h>
#if 0
void sighandler(int sig) {
__android_log_print(ANDROID_LOG_ERROR, "NativeCrash", "Caught signal %d", sig);
exit(1);
}
#endif
jint JNI_OnLoad(JavaVM* vm, void* reserved)
{
JNIEnv* env = NULL;
jint result = -1;
// 在 JNI_OnLoad 或其他初始化函数中注册
#if 0
signal(SIGSEGV, sighandler);
#endif
#if defined(JNI_VERSION_1_6)
if (result==-1 && vm->GetEnv((void**)&env, JNI_VERSION_1_6) == JNI_OK)
{
@ -983,9 +999,8 @@ Java_com_xypower_mpapp_MicroPhotoService_infoLog(
return;
}
const char *msgStr = env->GetStringUTFChars(msg, 0);
XYLOG(XYLOG_SEVERITY_INFO, msgStr);
env->ReleaseStringUTFChars(msg, msgStr);
std::string str = jstring2string(env, msg);
XYLOG(XYLOG_SEVERITY_INFO, str.c_str());
}
extern "C" JNIEXPORT jboolean JNICALL

@ -1846,7 +1846,7 @@ bool CPhoneDevice::TakeVideoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
{
TakePhotoCb(0, localPhotoInfo, "", 0);
XYLOG(XYLOG_SEVERITY_ERROR, "Failed to TP on NET Camera CH=%u PR=%X PHOTOID=%u URL=%s", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset,
localPhotoInfo.photoId, ip, streamingUrl.c_str());
localPhotoInfo.photoId, ip.c_str(), streamingUrl.c_str());
}
// Notify to take next photo
// TakePhotoCb(1, localPhotoInfo, "", takingTime);

@ -62,7 +62,7 @@ void YuShiCtrl::EnableOsd(bool enable, uint8_t channel)
std::istringstream s(jsonString);
if (!Json::parseFromStream(reader, s, &root, &errors)) {
XYLOG(XYLOG_SEVERITY_ERROR,"Failed to parse JSON:%s", errors);
XYLOG(XYLOG_SEVERITY_ERROR, "Failed to parse JSON:%s", errors.c_str());
return;
}

Loading…
Cancel
Save