diff --git a/src/zm_rtsp_server_adts_source.cpp b/src/zm_rtsp_server_adts_source.cpp index a1dc8b093..dc14a9cb9 100644 --- a/src/zm_rtsp_server_adts_source.cpp +++ b/src/zm_rtsp_server_adts_source.cpp @@ -1,3 +1,4 @@ +#if HAVE_RTSP_SERVER /* --------------------------------------------------------------------------- ** ** ADTS_DeviceSource.cpp @@ -44,3 +45,4 @@ ADTS_ZoneMinderDeviceSource::ADTS_ZoneMinderDeviceSource( << "\r\n"; m_auxLine.assign(os.str()); } +#endif diff --git a/src/zm_rtsp_server_device_source.cpp b/src/zm_rtsp_server_device_source.cpp index b10981d55..466b5b22a 100644 --- a/src/zm_rtsp_server_device_source.cpp +++ b/src/zm_rtsp_server_device_source.cpp @@ -8,6 +8,7 @@ ** ** -------------------------------------------------------------------------*/ +#if HAVE_RTSP_SERVER #include #include "zm_rtsp_server_device_source.h" @@ -167,7 +168,7 @@ int ZoneMinderDeviceSource::getNextFrame() { pthread_mutex_lock(&m_mutex); if ( m_captureQueue.size() ) { NAL_Frame * f = m_captureQueue.front(); - while ( (f->m_timestamp.tv_sec - tv.tv_sec) > 10 ) { + while ( m_captureQueue.size() and ((f->m_timestamp.tv_sec - tv.tv_sec) > 10) ) { m_captureQueue.pop_front(); delete f; f = m_captureQueue.front(); @@ -205,3 +206,4 @@ unsigned char* ZoneMinderDeviceSource::extractFrame(unsigned char* frame, size_ size = 0; return frame; } +#endif diff --git a/src/zm_rtsp_server_h264_device_source.cpp b/src/zm_rtsp_server_h264_device_source.cpp index 700e37873..796f6e9e4 100644 --- a/src/zm_rtsp_server_h264_device_source.cpp +++ b/src/zm_rtsp_server_h264_device_source.cpp @@ -1,3 +1,4 @@ +#if HAVE_RTSP_SERVER /* --------------------------------------------------------------------------- ** ** H264_DeviceSource.cpp @@ -222,3 +223,4 @@ unsigned char* H26X_ZoneMinderDeviceSource::extractFrame(unsigned char* frame, return outFrame; } +#endif diff --git a/src/zm_rtsp_server_server_media_subsession.cpp b/src/zm_rtsp_server_server_media_subsession.cpp index c898e0103..e38a4fe4a 100644 --- a/src/zm_rtsp_server_server_media_subsession.cpp +++ b/src/zm_rtsp_server_server_media_subsession.cpp @@ -1,3 +1,4 @@ +#if HAVE_RTSP_SERVER /* --------------------------------------------------------------------------- ** ** ServerMediaSubsession.cpp @@ -104,3 +105,4 @@ char const* BaseServerMediaSubsession::getAuxLine( } return auxLine; } +#endif diff --git a/src/zm_rtsp_server_thread.cpp b/src/zm_rtsp_server_thread.cpp index 6f3c433c9..6841146e1 100644 --- a/src/zm_rtsp_server_thread.cpp +++ b/src/zm_rtsp_server_thread.cpp @@ -1,3 +1,4 @@ +#if HAVE_RTSP_SERVER #include "zm_rtsp_server_thread.h" #include "zm_rtsp_server_device_source.h" #include "zm_rtsp_server_h264_device_source.h" @@ -6,7 +7,6 @@ #include #include "zm.h" -#if HAVE_RTSP_SERVER RTSPServerThread::RTSPServerThread(Monitor *p_monitor) : monitor(p_monitor), diff --git a/src/zm_rtsp_server_unicast_server_media_subsession.cpp b/src/zm_rtsp_server_unicast_server_media_subsession.cpp index e0aad63d2..5ef468a19 100644 --- a/src/zm_rtsp_server_unicast_server_media_subsession.cpp +++ b/src/zm_rtsp_server_unicast_server_media_subsession.cpp @@ -1,3 +1,4 @@ +#if HAVE_RTSP_SERVER /* --------------------------------------------------------------------------- ** This software is in the public domain, furnished "as is", without technical ** support, and with no warranty, express or implied, as to its usefulness for @@ -45,3 +46,4 @@ char const* UnicastServerMediaSubsession::getAuxSDPLine( ) { return this->getAuxLine(dynamic_cast(m_replicator->inputSource()), rtpSink->rtpPayloadType()); } +#endif