From 821b1bea4a77497506c3e22529ba76b2f84cceb7 Mon Sep 17 00:00:00 2001
From: xuxiuxi <xuxiuxi@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期三, 03 五月 2017 11:57:01 +0800
Subject: [PATCH]
---
VisitFace/RtspNativeCodec/app/src/main/cpp/DebugNetwork.cpp | 12 ++++++++++--
1 files changed, 10 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..23be522 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.78.105.44"
#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,7 +131,7 @@
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;
@@ -134,6 +139,9 @@
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