From 0250edfd9c4d453f25a2f9827698ccf87ff5afff Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期四, 17 八月 2017 10:22:18 +0800
Subject: [PATCH] merge home base

---
 RtspFace/PL_RTSPServer.cpp |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/RtspFace/PL_RTSPServer.cpp b/RtspFace/PL_RTSPServer.cpp
index 6610e04..4f140ca 100644
--- a/RtspFace/PL_RTSPServer.cpp
+++ b/RtspFace/PL_RTSPServer.cpp
@@ -2,8 +2,8 @@
 #include "MaterialBuffer.h"
 #include "logger.h"
 
-#include <liveMedia.hh>
-#include <BasicUsageEnvironment.hh>
+#include <liveMedia/liveMedia.hh>
+#include <BasicUsageEnvironment/BasicUsageEnvironment.hh>
 
 #include "FFmpegRTSPServer/IEncoder.h"
 #include "FFmpegRTSPServer/LiveRTSPServer.h"
@@ -96,9 +96,18 @@
 			ReleaseFrame();
 			return 0;
 		}
-		
+
+		//static size_t f = 0;
+		//static FILE *pFile = fopen("/data/bb.264", "wb");
+		//fwrite(in.buffer, sizeof(char), in.buffSize, pFile);
+		//if (++f > 400){
+		//	fclose(pFile);
+		//	exit(0);
+		//}
+
 		uint8_t* pBuffer = in.buffer;
 		size_t newBufferSize = in.buffSize;
+
 		if (in.config.payWithAux)
 		{
 			if (newBufferSize <= 4)
@@ -109,11 +118,12 @@
 			pBuffer += 4;
 			newBufferSize -= 4;
 		}
-		
+
 		*FrameBuffer = pBuffer;
 		*FrameSize = newBufferSize;
 
 		LOG_DEBUG << "send frame size=" << in.buffSize << std::endl;
+		return 1;
 	}
 	
 	virtual char ReleaseFrame()
@@ -232,7 +242,7 @@
 		return false;
 	memcpy(in->buffer, frame->buffer, frame->buffSize);
 	in->buffSize = frame->buffSize;
-	
+
 	if (in->encoderStub == nullptr)
 		return false;
 	

--
Gitblit v1.8.0