Re: 记录仪IPV6新SDK对接问题
这个名称不能修改
这个名称不能修改
你好。谢谢你的回复。
我这边目前ipv6的SDK,基本过了一遍。目前还是之前提到的紧急录像菜单点进去后,会程序卡住的问题很严重。
我复现了一个日志。麻烦你有空的时候帮忙看一下。我这边的操作流程如下:
1.进入4G记录仪界面,等APP看见图像。
2.点击存储,再点击“紧急抓拍”。进入“紧急抓拍的页面”,会显示之前的抓拍文件。
3.点击返回,返回到直播界面。
4.再次点击紧急抓拍按键,进入紧急抓拍页面。
这个时候,程序就卡死在tuya_ipc_album_query_by_name调用。就不返回了。(日志的3691行)
代码片段如下:
int tuya_ipc_stor_album_cb(int event, void args)
{
#if 0
PR_DEBUG("ToDo......tuya_ipc_stor_album_cb() p2p rev event cb=[%d]\n", event);
return 0;
#else
PR_DEBUG("###############################################");
PR_DEBUG("tuya_ipc_stor_album_cb() p2p rev event cb=[%d] start", event);
switch (event)
{
/ 内容结构:
C2C_ALBUM_INDEX_HEAD
C2C_ALBUM_INDEX_ITEM
C2C_ALBUM_INDEX_ITEM
C2C_ALBUM_INDEX_ITEM
/
case MEDIA_STREAM_ALBUM_QUERY: / query album */
{
C2C_QUERY_ALBUM_REQ *pSrcType = (C2C_QUERY_ALBUM_REQ *)args;
Code: Select all
// NOTICE: pIndexFile malloc/free in SDK
printf("__%s:%d->tuya_ipc_album_query_by_name In\n", __FUNCTION__, __LINE__);
int ret = tuya_ipc_album_query_by_name(pSrcType->albumName, pSrcType->channel, &pSrcType->fileLen, (C2C_ALBUM_INDEX_HEAD **)&(pSrcType->pIndexFile));
printf("__%s:%d->tuya_ipc_album_query_by_name Out\n", __FUNCTION__, __LINE__);
if (0 != ret)
{
PR_DEBUG("err %d\n", ret);
}
if (pSrcType->pIndexFile)
{
C2C_ALBUM_INDEX_HEAD *ptmp = (C2C_ALBUM_INDEX_HEAD *)pSrcType->pIndexFile;
PR_DEBUG("get album items %d\n", ptmp->itemCount);
}
break;
}
case MEDIA_STREAM_ALBUM_DOWNLOAD_START: /* start download album */
{
C2C_CMD_IO_CTRL_ALBUM_DOWNLOAD_START *pSrcType = (C2C_CMD_IO_CTRL_ALBUM_DOWNLOAD_START *)args;
PR_DEBUG("start download\n");
SS_DOWNLOAD_STATUS_E status = 0;
SS_ALBUM_DOWNLOAD_START_INFO_T strStarInfo = {0};
strStarInfo.session_id = pSrcType->channel;
memcpy(strStarInfo.album_name, pSrcType->albumName, strlen(pSrcType->albumName));
strStarInfo.file_count = pSrcType->fileTotalCnt;
strStarInfo.thumbnail = 0;//pSrcType->thumbnail; hanwei modify
strStarInfo.p_file_info_arr = (SS_FILE_PATH_T *)pSrcType->pFileInfoArr;
PR_DEBUG("strStarInfo.file_count=%d\n", strStarInfo.file_count);
PR_DEBUG("strStarInfo.thumbnail=%d\n", strStarInfo.thumbnail);
PR_DEBUG("strStarInfo.p_file_info_arr=%s\n", strStarInfo.p_file_info_arr->file_name);
printf("__%s:%d->tuya_ipc_album_set_download_status In\n", __FUNCTION__, __LINE__);
int ret = tuya_ipc_album_set_download_status(SS_DL_START, &strStarInfo);
printf("__%s:%d->tuya_ipc_album_set_download_status Out\n", __FUNCTION__, __LINE__);
if (0 != ret)
{
PR_DEBUG("err %d\n", ret);
}
break;
}
case MEDIA_STREAM_ALBUM_DOWNLOAD_CANCEL: // cancel album
{
// thread do nothing...
C2C_ALBUM_DOWNLOAD_CANCEL *pSrcType = (C2C_ALBUM_DOWNLOAD_CANCEL *)args;
SS_ALBUM_DOWNLOAD_START_INFO_T strStarInfo = {0};
strStarInfo.session_id = pSrcType->channel;
memcpy(strStarInfo.album_name, pSrcType->albumName, strlen(pSrcType->albumName));
printf("__%s:%d->tuya_ipc_album_set_download_status In\n", __FUNCTION__, __LINE__);
int ret = tuya_ipc_album_set_download_status(SS_DL_CANCLE, &strStarInfo);
printf("__%s:%d->tuya_ipc_album_set_download_status Out\n", __FUNCTION__, __LINE__);
if (0 != ret)
{
PR_DEBUG("err %d\n", ret);
}
PR_DEBUG("ok %d\n", ret);
break;
}
case MEDIA_STREAM_ALBUM_DELETE: // delete
{
C2C_CMD_IO_CTRL_ALBUM_DELETE *pSrcType = (C2C_CMD_IO_CTRL_ALBUM_DELETE *)args;
printf("__%s:%d->tuya_ipc_album_delete_by_file_info In\n", __FUNCTION__, __LINE__);
int ret = tuya_ipc_album_delete_by_file_info(pSrcType->channel, pSrcType->albumName, pSrcType->fileNum, (SS_FILE_PATH_T *)pSrcType->pFileInfoArr);
printf("__%s:%d->tuya_ipc_album_delete_by_file_info Out\n", __FUNCTION__, __LINE__);
if (0 != ret)
{
PR_DEBUG("err %d\n", ret);
tuya_ipc_delete_video_finish_v2(pSrcType->channel, TUYA_DOWNLOAD_ALBUM, 0);
}
break;
}
default:
PR_ERR("tuya_ipc_stor_album_cb() Error unSupport Event = %d\n", event);
return -1;
break;
}
PR_DEBUG("tuya_ipc_stor_album_cb() p2p rev event cb=[%d] end", event);
PR_DEBUG("###############################################");
return 0;
#endif
}
详细的日志麻烦查看附件。辛苦你了。感谢。
你好 感谢你的回复。
编译器信息如下:
arm-linux-gnueabihf-9.1.0-g++ -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-9.1.0-g++
COLLECT_LTO_WRAPPER=/opt/sigmastar/sigmastar-9.1.0/bin/../libexec/gcc/arm-linux-gnueabihf/9.1.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: '/home/meng/build_toolchain/linaro_linux_9_1_0/build/snapshots/gcc.gitgcc-9_1_0-release/configure' SHELL=/bin/bash --with-mpc=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --with-system-zlib --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --with-float=hard --with-fpu=vfpv3-d16 --with-mode=thumb --with-tune=cortex-a9 --with-arch=armv7-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/meng/build_toolchain/linaro_linux_9_1_0/build/sysroots/arm-linux-gnueabihf --with-sysroot=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabihf/libc --enable-checking=yes --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=arm-linux-gnueabihf --prefix=/home/meng/build_toolchain/linaro_linux_9_1_0/build/builds/destdir/x86_64-unknown-linux-gnu
Thread model: posix
gcc version 9.1.0 (GCC)
我们这边也尝试释放了很多内存过来。目前使用free命令剩余能到64M空闲内存。可是还是会出现malloc()这个报错。出现后,确实就故障了。就必须重启设备了。
idx.bin这个文件目前就只有4个报警文件,idx.bin的大小为912字节。
向你请教一下。这个有什么办法可以定位吗?谢谢你。辛苦了。