Bläddra i källkod

Fix a number of MSVC warnings

jp9000 7 år sedan
förälder
incheckning
4704723759

+ 5 - 4
plugins/obs-outputs/ftl-stream.c

@@ -297,11 +297,11 @@ static int avc_get_video_frame(struct ftl_stream *stream,
 
 
 	unsigned char *video_stream = packet->data;
 	unsigned char *video_stream = packet->data;
 
 
-	while (consumed < packet->size) {
+	while ((size_t)consumed < packet->size) {
 		size_t total_max = sizeof(stream->coded_pic_buffer.nalus) /
 		size_t total_max = sizeof(stream->coded_pic_buffer.nalus) /
 			sizeof(stream->coded_pic_buffer.nalus[0]);
 			sizeof(stream->coded_pic_buffer.nalus[0]);
 
 
-		if (stream->coded_pic_buffer.total >= total_max) {
+		if ((size_t)stream->coded_pic_buffer.total >= total_max) {
 			warn("ERROR: cannot continue, nalu buffers are full");
 			warn("ERROR: cannot continue, nalu buffers are full");
 			return -1;
 			return -1;
 		}
 		}
@@ -330,7 +330,7 @@ static int avc_get_video_frame(struct ftl_stream *stream,
 			      video_stream[2] << 8 |
 			      video_stream[2] << 8 |
 			      video_stream[3];
 			      video_stream[3];
 
 
-			if (len > (packet->size - consumed)) {
+			if ((size_t)len > (packet->size - (size_t)consumed)) {
 				warn("ERROR: got len of %d but packet only "
 				warn("ERROR: got len of %d but packet only "
 						"has %d left",
 						"has %d left",
 						len, packet->size - consumed);
 						len, packet->size - consumed);
@@ -345,7 +345,8 @@ static int avc_get_video_frame(struct ftl_stream *stream,
 		uint8_t nalu_type = video_stream[0] & 0x1F;
 		uint8_t nalu_type = video_stream[0] & 0x1F;
 		uint8_t nri = (video_stream[0] >> 5) & 0x3;
 		uint8_t nri = (video_stream[0] >> 5) & 0x3;
 
 
-		int send_marker_bit = (consumed >= packet->size) && !is_header;
+		int send_marker_bit =
+			((size_t)consumed >= packet->size) && !is_header;
 
 
 		if ((nalu_type != 12 && nalu_type != 6 && nalu_type != 9) ||
 		if ((nalu_type != 12 && nalu_type != 6 && nalu_type != 9) ||
 		    nri) {
 		    nri) {

+ 1 - 1
plugins/obs-vst

@@ -1 +1 @@
-Subproject commit 0b989b70eb87080862219e6fd469e7a360bcdf5d
+Subproject commit a07f7398be8264a420c84ebae3f3712027a502b7

+ 0 - 1
plugins/win-ivcam/seg_service/CMakeLists.txt

@@ -28,7 +28,6 @@ set(seg_service_SOURCES
 	seg_service.cpp
 	seg_service.cpp
 	SegProc.cpp
 	SegProc.cpp
 	stdafx.cpp
 	stdafx.cpp
-	xdlldata.c
 	seg_service.rc
 	seg_service.rc
 	${seg_service_GENERATED_FILES}
 	${seg_service_GENERATED_FILES}
 	)
 	)

+ 4 - 4
plugins/win-ivcam/seg_service/SegProc.h

@@ -145,8 +145,8 @@ private:
             m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
             m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
             m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
             m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(nullptr);
 
 
-            m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_COLOR, 0, 0, m_fps);
-            m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_DEPTH, 0, 0, m_fps);
+            m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_COLOR, 0, 0, (pxcF32)m_fps);
+            m_senseManager->QueryCaptureManager()->FilterByStreamProfiles(PXCCapture::StreamType::STREAM_TYPE_DEPTH, 0, 0, (pxcF32)m_fps);
             
             
             status = m_senseManager->EnableStreams(&currentProfile);
             status = m_senseManager->EnableStreams(&currentProfile);
             if (status != PXC_STATUS_NO_ERROR)
             if (status != PXC_STATUS_NO_ERROR)
@@ -174,7 +174,7 @@ private:
         std::unique_lock<std::mutex> lck(m_pauseMtx);
         std::unique_lock<std::mutex> lck(m_pauseMtx);
         m_senseManager->Close();
         m_senseManager->Close();
 
 
-        pxcStatus status = senseMgrInit();
+        senseMgrInit();
         m_isPause = false;
         m_isPause = false;
         m_cvPause.notify_one();
         m_cvPause.notify_one();
         return S_OK;
         return S_OK;
@@ -330,7 +330,7 @@ public:
 
 
     static DWORD WINAPI LoopStub(LPVOID lpParam)
     static DWORD WINAPI LoopStub(LPVOID lpParam)
     {
     {
-        if (!lpParam) return -1;
+        if (!lpParam) return (DWORD)-1;
         return ((CSegProc*)lpParam)->Loop(NULL);
         return ((CSegProc*)lpParam)->Loop(NULL);
     }
     }