You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 line
1.7 KiB

  1. #include "XNetSDKTest.h"
  2. #include "SystemInfo.h"
  3. #include "SystemFunction.h"
  4. #include "Camera_Param.h"
  5. #include "Simplify_Encode.h"
  6. USE_NS_NETSDK_CFG
  7. //
  8. //void OnDevConfig(int nMsgId, int nResult, const char *szCfgName, const char *szResult, int nResultLen, int nSeq)
  9. //{
  10. // if (nResult < 0)
  11. // {
  12. // printf("OnDevConfig:[MsgId:%d; Result:%d]\r\n", nMsgId, nResult);
  13. // return;
  14. // }
  15. //
  16. // if((ESXSDK_DEV_GET_SYS_CONFIG == nMsgId || ESXSDK_DEV_GET_CHN_CONFIG == nMsgId) && szCfgName && szResult && nResultLen > 0)
  17. // {
  18. // if (strcmp(szCfgName, JK_SystemInfo) == 0)
  19. // {
  20. // SystemInfo cfg;
  21. // cfg.Parse(szResult);
  22. // printf("SystemInfo:[SerialNo:%s; BuildTime:%s; ]\r\n", cfg.SerialNo.Value(), cfg.BuildTime.Value());
  23. // }
  24. // else if (strcmp(szCfgName, JK_SystemFunction) == 0)
  25. // {
  26. // SystemFunction cfg;
  27. // cfg.Parse(szResult);
  28. // printf("SystemFunction:[CombineStream:%d; ]\r\n", cfg.mEncodeFunction.CombineStream.Value());
  29. // }
  30. // else if(strcmp(szCfgName, "Camera.Param.[0]") == 0)
  31. // {
  32. // Camera_Param cfg;
  33. // cfg.SetName("Camera.Param.[0]");
  34. // cfg.Parse(szResult);
  35. // printf("Camera_Param:[IRCUTMode:%d; ]\r\n", cfg.IRCUTMode.Value());
  36. //
  37. // const char *pCfg = cfg.ToString();
  38. // int nRet = XSDK_DevSetChnConfig(g_hDevice, 0, JK_Camera_Param, pCfg, strlen(pCfg), 5000, EXCMD_CONFIG_SET);
  39. // }
  40. // else if(strcmp(szCfgName, "Simplify.Encode") == 0)
  41. // {
  42. // Simplify_Encode cfg;
  43. // cfg.Parse(szResult);
  44. // printf("Simplify_Encode:[BitRate:%d; ]\r\n", cfg.mExtraFormat.mVideo.BitRate.Value());
  45. //
  46. // const char *pCfg = cfg.ToString();
  47. // int nRet = XSDK_DevSetSysConfig(g_hDevice, JK_Simplify_Encode, pCfg, strlen(pCfg), 5000, EXCMD_CONFIG_SET);
  48. // }
  49. //
  50. // }
  51. //}