From 8dd085f78e4bcfbc89ede104108cd03053183865 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 01 八月 2017 15:37:00 +0800
Subject: [PATCH]
---
VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp b/VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp
index 40b456b..3527b0c 100644
--- a/VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp
+++ b/VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp
@@ -16,10 +16,12 @@
#include "ev_proto.h"
#include "face_daemon_proto.h"
-#define STFACE_SERVER_IP "192.168.1.146"
+#define STFACE_SERVER_IP "52.79.232.163"
#define STFACE_SERVER_PORT "15432"
#define STFACE_RECV_BUFFER_SIZE 1024
#define STFACE_DEBUG_NETWORK_SYNC false
+
+std::string g_dbgLog;
struct SocketClientContext
{
@@ -43,6 +45,8 @@
static void* daemon_thd(void* arg)
{
SocketClientContext* ctx = (SocketClientContext*)arg;
+
+ //g_dbgLog = "";
int clientfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
if (clientfd < 0)
@@ -74,6 +78,7 @@
int recvSize = recv(clientfd, ctx->buffer, STFACE_RECV_BUFFER_SIZE, 0);
ctx->buffer[recvSize] = '\0';
+ g_dbgLog = (char*)ctx->buffer;
LOG_NOTICE << "face detect result: " << ctx->buffer << LOG_ENDL;
close(clientfd);
@@ -126,14 +131,18 @@
evpHeader->cmd = FaceDaemonCommand::FDC_SENSETIMEFACEDETECT_SAVE;
evpHeader->size = sizeof(EVPHeader) + sizeof(FDP_Image) + imgidx.size;
- fdpImage->db_id = 123;
+ fdpImage->db_id = 1001;
fdpImage->mb_type = imgidx.type;
fdpImage->width = imgidx.width;
fdpImage->height = imgidx.height;
+ fdpImage->size = 0;//#todo
memcpy(fdpImage->buff, buffImg, imgidx.size);
ctx->buffSize = evpHeader->size;
+ evpHeader->hton();
+ fdpImage->hton();
+
ctx->sendBuff(nullptr, 0);
// delete ctx itself
}
--
Gitblit v1.8.0