Merge pull request #3127 from Carbenium/header-cleanup

Cleanup and reorganize includes
This commit is contained in:
Isaac Connor 2021-02-04 12:52:04 -05:00 committed by GitHub
commit 513739aeb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
125 changed files with 436 additions and 684 deletions

View File

@ -682,7 +682,7 @@ if(NOT ZM_NO_RTSPSERVER)
set(optlibsfound "${optlibsfound} libLive555")
else(Live555_FOUND)
set(HAVE_RTSP_SERVER 0)
set(optlibsfound "${optlibsnotfound} libLive555")
set(optlibsnotfound "${optlibsnotfound} libLive555")
endif(Live555_FOUND)
else(NOT ZM_NO_RTSPSERVER)
set(HAVE_RTSP_SERVER 0)

View File

@ -21,18 +21,6 @@
#ifndef ZM_H
#define ZM_H
#include "zm_define.h"
#include "zm_config.h"
#include "zm_signal.h"
#ifdef SOLARIS
#undef DEFAULT_TYPE // pthread defines this which breaks StreamType DEFAULT_TYPE
#include <string.h> // define strerror() and friends
#endif
#include "zm_logger.h"
#include <iostream>
extern const char *self;
#endif // ZM_H

View File

@ -1,9 +1,10 @@
#include "zm_analysis_thread.h"
#include "zm_signal.h"
AnalysisThread::AnalysisThread(Monitor *p_monitor) {
monitor = p_monitor;
terminate = false;
//sigemptyset(&block_set);
}
AnalysisThread::~AnalysisThread() {

View File

@ -1,15 +1,12 @@
#ifndef ZM_ANALYSIS_THREAD_H
#define ZM_ANALYSIS_THREAD_H
#include "zm_thread.h"
#include <signal.h>
#include "zm_monitor.h"
#include "zm_thread.h"
class AnalysisThread : public Thread {
private:
bool terminate;
sigset_t block_set;
Monitor *monitor;
public:

View File

@ -15,9 +15,8 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
//
#include "zm.h"
#include "zm_box.h"
// This section deliberately left blank

View File

@ -20,14 +20,8 @@
#ifndef ZM_BOX_H
#define ZM_BOX_H
#include "zm.h"
#include "zm_coord.h"
#ifndef SOLARIS
#include <math.h>
#else
#include <cmath>
#endif
//
// Class used for storing a box, which is defined as a region
@ -61,8 +55,8 @@ public:
inline int Area() const { return size.X()*size.Y(); }
inline const Coord Centre() const {
int mid_x = int(round(lo.X()+(size.X()/2.0)));
int mid_y = int(round(lo.Y()+(size.Y()/2.0)));
int mid_x = int(std::round(lo.X()+(size.X()/2.0)));
int mid_y = int(std::round(lo.Y()+(size.Y()/2.0)));
return Coord( mid_x, mid_y );
}
inline bool Inside( const Coord &coord ) const

View File

@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "zm.h"
#include "zm_buffer.h"
unsigned int Buffer::assign(const unsigned char *pStorage, unsigned int pSize) {

View File

@ -20,9 +20,8 @@
#ifndef ZM_BUFFER_H
#define ZM_BUFFER_H
#include "zm.h"
#include <string.h>
#include "zm_logger.h"
#include <cstring>
class Buffer
{
@ -42,12 +41,12 @@ public:
}
Buffer(const unsigned char *pStorage, unsigned int pSize) : mAllocation(pSize), mSize(pSize) {
mHead = mStorage = new unsigned char[mSize];
memcpy(mStorage, pStorage, mSize);
std::memcpy(mStorage, pStorage, mSize);
mTail = mHead + mSize;
}
Buffer(const Buffer &buffer) : mAllocation(buffer.mSize), mSize(buffer.mSize) {
mHead = mStorage = new unsigned char[mSize];
memcpy(mStorage, buffer.mHead, mSize);
std::memcpy(mStorage, buffer.mHead, mSize);
mTail = mHead + mSize;
}
~Buffer() {
@ -116,7 +115,7 @@ public:
// Add bytes to the end of the buffer
unsigned int append(const unsigned char *pStorage, unsigned int pSize) {
expand(pSize);
memcpy(mTail, pStorage, pSize);
std::memcpy(mTail, pStorage, pSize);
mTail += pSize;
mSize += pSize;
return mSize;
@ -133,7 +132,7 @@ public:
mHead = mTail = mStorage;
else if ( level ) {
if ( ((uintptr_t)mHead-(uintptr_t)mStorage) > mSize ) {
memcpy( mStorage, mHead, mSize );
std::memcpy( mStorage, mHead, mSize );
mHead = mStorage;
mTail = mHead + mSize;
}

View File

@ -17,9 +17,10 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_camera.h"
#include "zm_monitor.h"
Camera::Camera(
unsigned int p_monitor_id,
SourceType p_type,

View File

@ -20,15 +20,12 @@
#ifndef ZM_CAMERA_H
#define ZM_CAMERA_H
#include <sys/types.h>
#include <sys/ioctl.h>
#include "zm_image.h"
#include "zm_packet.h"
#include <sys/ioctl.h>
#include <sys/types.h>
class Camera;
#include "zm_monitor.h"
class Monitor;
class ZMPacket;
//
// Abstract base class for cameras. This is intended just to express

View File

@ -18,24 +18,17 @@
//
#include "zm_comms.h"
#include "zm_logger.h"
#include <errno.h>
#include <arpa/inet.h> // for debug output
#include <cerrno>
#include <cstdarg>
#include <cstdio> // for snprintf
#include <fcntl.h>
#include <stdarg.h>
#include <utility>
#if defined(BSD)
#include <stdlib.h>
#else
#include <alloca.h>
#endif
#include <netinet/tcp.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <netinet/tcp.h>
#include <arpa/inet.h> // for debug output
#include <stdio.h> // for snprintf
#include <utility>
#ifdef SOLARIS
#include <sys/filio.h> // define FIONREAD

View File

@ -20,18 +20,13 @@
#ifndef ZM_COMMS_H
#define ZM_COMMS_H
#include "zm_logger.h"
#include "zm_exception.h"
#include <string.h>
#include <unistd.h>
#include "zm_logger.h"
#include <netdb.h>
#include <errno.h>
#include <sys/un.h>
#include <set>
#include <vector>
#include <sys/uio.h>
#include <sys/un.h>
#include <vector>
#if defined(BSD)
#include <sys/socket.h>

View File

@ -15,21 +15,17 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
//
#include "zm_config.h"
#include "zm.h"
#include "zm_db.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "zm_logger.h"
#include "zm_utils.h"
#include <cstring>
#include <dirent.h>
#include <glob.h>
#include "zm_utils.h"
#include "zm_config.h"
// Note that Error and Debug calls won't actually go anywhere unless you
// set the relevant ENV vars because the logger gets it's setting from the
// config.

View File

@ -20,16 +20,15 @@
#ifndef ZM_CONFIG_H
#define ZM_CONFIG_H
#include "config.h"
#include "zm_config_data.h"
#include "zm_config_defines.h"
#include <string>
#if !defined(PATH_MAX)
#define PATH_MAX 1024
#endif
#include "config.h"
#include "zm_config_defines.h"
#include "zm_config_data.h"
#include <string>
#ifdef HAVE_LIBAVFORMAT
#define ZM_HAS_FFMPEG 1
#endif // HAVE_LIBAVFORMAT

View File

@ -17,7 +17,6 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_coord.h"
// This section deliberately left blank

View File

@ -20,7 +20,7 @@
#ifndef ZM_COORD_H
#define ZM_COORD_H
#include "zm.h"
#include "zm_define.h"
//
// Class used for storing an x,y pair, i.e. a coordinate

View File

@ -1,19 +1,21 @@
#include "zm.h"
#include "zm_crypt.h"
#include "zm_logger.h"
#include "BCrypt.hpp"
#include <algorithm>
#if HAVE_LIBJWT
#include <jwt.h>
#else
#include "jwt_cpp.h"
#endif
#include <algorithm>
#if HAVE_LIBCRYPTO
#include <openssl/sha.h>
#elif HAVE_GNUTLS_GNUTLS_H
#include <gnutls/gnutls.h>
#include <gnutls/crypto.h>
#endif
#include <string.h>
// returns username if valid, "" if not
#if HAVE_LIBJWT

View File

@ -20,10 +20,8 @@
#ifndef ZM_CRYPT_H
#define ZM_CRYPT_H
#include <string.h>
#include <string>
#include <utility>
bool verifyPassword( const char *username, const char *input_password, const char *db_password_hash);

View File

@ -17,12 +17,10 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include <dlfcn.h>
#include "zm.h"
#include "zm_curl_camera.h"
#include "zm_packetqueue.h"
#include "zm_packet.h"
#include <dlfcn.h>
#if HAVE_LIBCURL

View File

@ -20,16 +20,13 @@
#ifndef ZM_CURL_CAMERA_H
#define ZM_CURL_CAMERA_H
#if HAVE_LIBCURL
#include "zm_camera.h"
#include "zm_ffmpeg.h"
#include "zm_config.h"
#include "zm_buffer.h"
#include "zm_regexp.h"
#include "zm_utils.h"
#include "zm_signal.h"
#include <string>
#include "zm_camera.h"
#include <deque>
#include <string>
#if HAVE_LIBCURL
#if HAVE_CURL_CURL_H
#include <curl/curl.h>

View File

@ -16,13 +16,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include <stdlib.h>
#include <string.h>
#include "zm.h"
#include "zm_db.h"
#include "zm_logger.h"
#include <cstdlib>
MYSQL dbconn;
RecursiveMutex db_mutex;

View File

@ -20,8 +20,8 @@
#ifndef ZM_DB_H
#define ZM_DB_H
#include <mysql/mysql.h>
#include "zm_thread.h"
#include <mysql/mysql.h>
class zmDbRow {
private:

View File

@ -17,23 +17,17 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include <fcntl.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <sys/uio.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <getopt.h>
#include <arpa/inet.h>
#include <glob.h>
#include "zm.h"
#include "zm_db.h"
#include "zm_time.h"
#include "zm_signal.h"
#include "zm_event.h"
#include "zm_camera.h"
#include "zm_db.h"
#include "zm_frame.h"
#include "zm_logger.h"
#include "zm_monitor.h"
#include "zm_signal.h"
#include "zm_videostore.h"
#include <cstring>
#include <sys/stat.h>
//#define USE_PREPARED_SQL 1

View File

@ -20,39 +20,23 @@
#ifndef ZM_EVENT_H
#define ZM_EVENT_H
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <mysql/mysql.h>
#include <set>
#include "zm_storage.h"
#include <map>
#include <queue>
#include <string>
#include <set>
#include "zm.h"
#include "zm_image.h"
#include "zm_stream.h"
#include "zm_packet.h"
#include "zm_storage.h"
class VideoStore;
class Zone;
class Monitor;
class EventStream;
class Frame;
class Image;
class Monitor;
class VideoStore;
class ZMPacket;
class Zone;
// Maximum number of prealarm frames that can be stored
#define MAX_PRE_ALARM_FRAMES 16
typedef uint64_t event_id_t;
typedef enum { NORMAL=0, BULK, ALARM } FrameType;
#include "zm_frame.h"
typedef uint64_t event_id_t;
//
// Class describing events, i.e. captured periods of activity.

View File

@ -17,18 +17,16 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
//
#include <arpa/inet.h>
#include "zm.h"
#include "zm_db.h"
#include "zm_time.h"
#include "zm_mpeg.h"
#include "zm_event.h"
#include "zm_eventstream.h"
#include "zm_storage.h"
#include "zm_monitor.h"
#include "zm_db.h"
#include "zm_image.h"
#include "zm_logger.h"
#include "zm_sendfile.h"
#include "zm_signal.h"
#include "zm_storage.h"
#include <arpa/inet.h>
#include <sys/stat.h>
const std::string EventStream::StreamMode_Strings[4] = {
"None",

View File

@ -20,9 +20,7 @@
#ifndef ZM_EVENTSTREAM_H
#define ZM_EVENTSTREAM_H
#include "zm_image.h"
#include "zm_stream.h"
#include "zm_video.h"
#include "zm_ffmpeg_input.h"
#include "zm_monitor.h"
#include "zm_storage.h"
@ -37,7 +35,6 @@ extern "C" {
}
#endif
class EventStream : public StreamBase {
public:
typedef enum { MODE_NONE, MODE_SINGLE, MODE_ALL, MODE_ALL_GAPLESS } StreamMode;

View File

@ -18,8 +18,10 @@
*/
#include "zm_ffmpeg.h"
#include "zm_image.h"
#include "zm_logger.h"
#include "zm_rgb.h"
extern "C" {
#include "libavutil/pixdesc.h"
}

View File

@ -17,14 +17,14 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_ffmpeg_camera.h"
#include "zm_packet.h"
#include "zm_signal.h"
#include "zm_utils.h"
#if HAVE_LIBAVFORMAT
#include "zm_ffmpeg_camera.h"
extern "C" {
#include "libavutil/time.h"
#if HAVE_LIBAVUTIL_HWCONTEXT_H
@ -35,7 +35,6 @@ extern "C" {
}
#include <string>
#include <locale>
#if HAVE_LIBAVUTIL_HWCONTEXT_H
#if LIBAVCODEC_VERSION_CHECK(57, 89, 0, 89, 0)

View File

@ -22,10 +22,6 @@
#include "zm_camera.h"
#include "zm_buffer.h"
#include "zm_ffmpeg.h"
#include "zm_videostore.h"
#if HAVE_LIBAVUTIL_HWCONTEXT_H
typedef struct DecodeContext {
AVBufferRef *hw_device_ref;

View File

@ -1,7 +1,7 @@
#include "zm_ffmpeg_input.h"
#include "zm_logger.h"
#include "zm_ffmpeg.h"
#include "zm_logger.h"
FFmpeg_Input::FFmpeg_Input() {
input_format_context = nullptr;

View File

@ -17,17 +17,14 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm_fifo.h"
#include "zm_monitor.h"
#include "zm_signal.h"
#include <fcntl.h>
#include <sys/file.h>
#include <stdio.h>
#include <stdarg.h>
#include <signal.h>
#include <sys/stat.h>
#include "zm.h"
#include "zm_time.h"
#include "zm_signal.h"
#include "zm_monitor.h"
#include "zm_fifo.h"
#define RAW_BUFFER 512
static bool zm_fifodbg_inited = false;
FILE *zm_fifodbg_log_fd = nullptr;

View File

@ -19,23 +19,10 @@
#ifndef ZM_FIFO_H
#define ZM_FIFO_H
#if 0
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "zm.h"
#include "zm_image.h"
#endif
#include "zm_monitor.h"
#include "zm_stream.h"
class Monitor;
#define zmFifoDbgPrintf(level, params...) {\
zmFifoDbgOutput(0, __FILE__, __LINE__, level, ##params);\
}

View File

@ -17,19 +17,11 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include "zm.h"
#include "zm_file_camera.h"
#include "zm_packet.h"
#include <sys/stat.h>
FileCamera::FileCamera(
int p_id,
const char *p_path,

View File

@ -21,11 +21,6 @@
#define ZM_FILE_CAMERA_H
#include "zm_camera.h"
#include "zm_buffer.h"
#include "zm_regexp.h"
#include "zm_packet.h"
#include <sys/param.h>
//
// Class representing 'file' cameras, i.e. those which are

View File

@ -1,10 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include "zm.h"
#include "zm_font.h"
#include "zm_utils.h"
#include <cstring>
#include <sys/stat.h>
int ZmFont::ReadFontFile(const std::string &loc) {
FILE *f = fopen(loc.c_str(), "rb");

View File

@ -2,7 +2,6 @@
#define ZM_FONT_H
#include "zm_define.h"
#include <string>
#define NUM_FONT_SIZES 4

View File

@ -20,12 +20,15 @@
#ifndef ZM_FRAME_H
#define ZM_FRAME_H
#include <sys/time.h>
#include <sys/types.h>
class Frame;
#include "zm_event.h"
#include "zm_time.h"
#include <sys/time.h>
enum FrameType {
NORMAL = 0,
BULK,
ALARM
};
//
// This describes a frame record

View File

@ -15,15 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "zm.h"
#include "zm_db.h"
*/
#include "zm_group.h"
#include <string.h>
#include <stdlib.h>
#include "zm_logger.h"
#include <cstring>
Group::Group() {
Warning("Instantiating default Group Object. Should not happen.");

View File

@ -17,11 +17,11 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "zm_db.h"
#ifndef ZM_GROUP_H
#define ZM_GROUP_H
#include "zm_db.h"
class Group {
protected:

View File

@ -16,16 +16,14 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_font.h"
#include "zm_image.h"
#include "zm_utils.h"
#include "zm_rgb.h"
#include "zm_ffmpeg.h"
#include "zm_image.h"
#include "zm_font.h"
#include "zm_poly.h"
#include "zm_utils.h"
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
static unsigned char y_table_global[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 112, 114, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 128, 129, 130, 131, 132, 133, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 149, 150, 151, 152, 153, 154, 156, 157, 158, 159, 160, 161, 163, 164, 165, 166, 167, 168, 170, 171, 172, 173, 174, 175, 176, 178, 179, 180, 181, 182, 183, 185, 186, 187, 188, 189, 190, 192, 193, 194, 195, 196, 197, 199, 200, 201, 202, 203, 204, 206, 207, 208, 209, 210, 211, 213, 214, 215, 216, 217, 218, 220, 221, 222, 223, 224, 225, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 238, 239, 241, 242, 243, 244, 245, 246, 248, 249, 250, 251, 252, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255};

View File

@ -20,26 +20,21 @@
#ifndef ZM_IMAGE_H
#define ZM_IMAGE_H
#include "zm.h"
extern "C" {
#include "zm_jpeg.h"
}
#include "zm_rgb.h"
#include "zm_coord.h"
#include "zm_box.h"
#include "zm_poly.h"
#include "zm_mem_utils.h"
#include "zm_utils.h"
class Image;
#include "zm_ffmpeg.h"
#include <errno.h>
#include "zm_jpeg.h"
#include "zm_logger.h"
#include "zm_mem_utils.h"
#include "zm_rgb.h"
#if HAVE_ZLIB_H
#include <zlib.h>
#endif // HAVE_ZLIB_H
class Box;
class Image;
class Polygon;
#define ZM_BUFTYPE_DONTFREE 0
#define ZM_BUFTYPE_MALLOC 1
#define ZM_BUFTYPE_NEW 2

View File

@ -18,9 +18,8 @@
*/
#include "zm_jpeg.h"
#include "zm_logger.h"
#include <unistd.h>
#include "zm_logger.h"
/* Overridden error handlers, mostly for decompression */
extern "C" {

View File

@ -15,13 +15,12 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <setjmp.h>
*/
#include "jerror.h"
#include "jinclude.h"
#include "jpeglib.h"
#include "jerror.h"
#include <csetjmp>
// Stop complaints about deuplicate definitions
#undef HAVE_STDLIB_H

View File

@ -15,13 +15,15 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#include <dlfcn.h>
#include "zm.h"
#include "zm_signal.h"
#include "zm_libvlc_camera.h"
#include "zm_packet.h"
#include "zm_signal.h"
#include "zm_utils.h"
#include <dlfcn.h>
#if HAVE_LIBVLC
static void *libvlc_lib = nullptr;
static void (*libvlc_media_player_release_f)(libvlc_media_player_t* ) = nullptr;

View File

@ -20,7 +20,6 @@
#ifndef ZM_LIBVLC_CAMERA_H
#define ZM_LIBVLC_CAMERA_H
#include "zm_buffer.h"
#include "zm_camera.h"
#include "zm_thread.h"

View File

@ -1,8 +1,7 @@
#include <dlfcn.h>
#include "zm.h"
#include "zm_signal.h"
#include "zm_libvnc_camera.h"
#include "zm_swscale.h"
#include "zm_packet.h"
#include <dlfcn.h>
#if HAVE_LIBVNC

View File

@ -2,9 +2,7 @@
#ifndef ZN_LIBVNC_CAMERA_H
#define ZN_LIBVNC_CAMERA_H
#include "zm_buffer.h"
#include "zm_camera.h"
#include "zm_thread.h"
#include "zm_swscale.h"
#if HAVE_LIBVNC

View File

@ -17,20 +17,15 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#if ZM_HAS_V4L
#include "zm_local_camera.h"
#include <sys/types.h>
#include <sys/stat.h>
#include "zm_packet.h"
#include "zm_utils.h"
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <sys/stat.h>
#if ZM_HAS_V4L
/* Workaround for GNU/kFreeBSD and FreeBSD */
#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)

View File

@ -20,10 +20,7 @@
#ifndef ZM_LOCAL_CAMERA_H
#define ZM_LOCAL_CAMERA_H
#include "zm.h"
#include "zm_camera.h"
#include "zm_image.h"
#include "zm_packet.h"
#if ZM_HAS_V4L
@ -42,8 +39,6 @@
#define VIDEO_MAX_FRAME 32
#endif
#include "zm_ffmpeg.h"
//
// Class representing 'local' cameras, i.e. those which are
// directly connect to the host machine and which are accessed

View File

@ -19,24 +19,18 @@
#include "zm_logger.h"
#include "zm_config.h"
#include "zm_utils.h"
#include "zm_db.h"
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <syslog.h>
#include <signal.h>
#include <stdarg.h>
#include <errno.h>
#include "zm_utils.h"
#include <csignal>
#include <cstdarg>
#include <cstring>
#include <libgen.h>
#include <syslog.h>
#include <sys/time.h>
#ifdef __FreeBSD__
#include <sys/thr.h>
#endif
#include <cstdarg>
bool Logger::smInitialised = false;
Logger *Logger::smInstance = nullptr;

View File

@ -20,17 +20,16 @@
#ifndef ZM_LOGGER_H
#define ZM_LOGGER_H
#include "zm_db.h"
#include "zm_config.h"
#include "zm_define.h"
#include "zm_thread.h"
#include <unistd.h>
#include <string>
#include <map>
#ifdef HAVE_SYS_SYSCALL_H
#include <sys/syscall.h>
#endif // HAVE_SYS_SYSCALL_H
#include <mysql/mysql.h>
class Logger {
public:

View File

@ -20,8 +20,7 @@
#ifndef ZM_MEM_UTILS_H
#define ZM_MEM_UTILS_H
#include <stdlib.h>
#include "zm.h"
#include <cstdlib>
inline void* zm_mallocaligned(unsigned int reqalignment, size_t reqsize) {
uint8_t* retptr;

View File

@ -17,43 +17,46 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include <sys/types.h>
#include <sys/stat.h>
#include <arpa/inet.h>
#include <glob.h>
#include "zm.h"
#include "zm_db.h"
#include "zm_time.h"
#include "zm_mpeg.h"
#include "zm_signal.h"
#include "zm_monitor.h"
#include "zm_video.h"
#include "zm_group.h"
#include "zm_eventstream.h"
#if ZM_HAS_V4L
#include "zm_local_camera.h"
#endif // ZM_HAS_V4L
#include "zm_fifo.h"
#include "zm_file_camera.h"
#include "zm_remote_camera.h"
#include "zm_remote_camera_http.h"
#include "zm_remote_camera_nvsocket.h"
#include "zm_signal.h"
#include "zm_time.h"
#include "zm_zone.h"
#if ZM_HAS_V4L
#include "zm_local_camera.h"
#endif // ZM_HAS_V4L
#if HAVE_LIBAVFORMAT
#include "zm_remote_camera_rtsp.h"
#endif // HAVE_LIBAVFORMAT
#include "zm_file_camera.h"
#if HAVE_LIBAVFORMAT
#include "zm_ffmpeg_camera.h"
#endif // HAVE_LIBAVFORMAT
#include "zm_fifo.h"
#if HAVE_LIBVLC
#include "zm_libvlc_camera.h"
#endif // HAVE_LIBVLC
#if HAVE_LIBCURL
#include "zm_curl_camera.h"
#endif // HAVE_LIBCURL
#if HAVE_LIBVNC
#include "zm_libvnc_camera.h"
#endif // HAVE_LIBVNC
#include <sys/types.h>
#include <sys/stat.h>
#if ZM_MEM_MAPPED
#include <sys/mman.h>
#include <fcntl.h>

View File

@ -20,30 +20,16 @@
#ifndef ZM_MONITOR_H
#define ZM_MONITOR_H
#include <vector>
#include <sstream>
#include <thread>
#include "zm.h"
#include "zm_coord.h"
#include "zm_image.h"
#include "zm_rgb.h"
#include "zm_zone.h"
#include "zm_event.h"
#include "zm_video.h"
#include "zm_videostore.h"
#include "zm_image.h"
#include "zm_packet.h"
#include "zm_packetqueue.h"
#include "zm_thread.h"
class Monitor;
#include "zm_group.h"
#include "zm_camera.h"
#include "zm_storage.h"
#include "zm_utils.h"
#include "zm_image_analyser.h"
#include "zm_video.h"
#include <sys/time.h>
#include <vector>
class Camera;
class Group;
#define SIGNAL_CAUSE "Signal"
#define MOTION_CAUSE "Motion"

View File

@ -17,15 +17,14 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_db.h"
#include "zm_time.h"
#include "zm_mpeg.h"
#include "zm_signal.h"
#include "zm_monitor.h"
#include "zm_monitorstream.h"
#include "zm_monitor.h"
#include "zm_signal.h"
#include "zm_time.h"
#include <arpa/inet.h>
#include <glob.h>
#include <sys/stat.h>
const int MAX_SLEEP_USEC = 1000000; // 1 sec

View File

@ -20,11 +20,8 @@
#ifndef ZM_MONITORSTREAM_H
#define ZM_MONITORSTREAM_H
#include "zm.h"
#include "zm_coord.h"
#include "zm_image.h"
#include "zm_utils.h"
#include "zm_monitor.h"
#include "zm_stream.h"
#include <sys/time.h>
class MonitorStream : public StreamBase {
protected:

View File

@ -17,13 +17,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdlib.h>
#include <string.h>
#include "zm.h"
#include "zm_rgb.h"
#include "zm_mpeg.h"
#include "zm_logger.h"
#include "zm_rgb.h"
#include <cstring>
#if HAVE_LIBAVCODEC
extern "C" {
#include <libavutil/mathematics.h>

View File

@ -16,10 +16,11 @@
//You should have received a copy of the GNU General Public License
//along with ZoneMinder. If not, see <http://www.gnu.org/licenses/>.
#include "zm_packet.h"
#include "zm_ffmpeg.h"
#include "zm_ffmpeg.h"
#include "zm_image.h"
#include "zm_logger.h"
#include <sys/time.h>
using namespace std;

View File

@ -20,6 +20,9 @@
#ifndef ZM_PACKET_H
#define ZM_PACKET_H
#include "zm_logger.h"
#include <mutex>
extern "C" {
#include <libavformat/avformat.h>
}
@ -28,9 +31,7 @@ extern "C" {
#include <sys/time.h>
#endif // __FreeBSD__
#include "zm_image.h"
#include "zm_thread.h"
#include <mutex>
class Image;
class ZMPacket {
public:

View File

@ -20,10 +20,11 @@
// PacketQueue must know about all iterators and manage them
#include "zm_packetqueue.h"
#include "zm_ffmpeg.h"
#include "zm_packet.h"
#include "zm_signal.h"
#include <sys/time.h>
#include "zm_time.h"
PacketQueue::PacketQueue():
video_stream_id(-1),

View File

@ -16,19 +16,15 @@
//You should have received a copy of the GNU General Public License
//along with ZoneMinder. If not, see <http://www.gnu.org/licenses/>.
#ifndef ZM_PACKETQUEUE_H
#define ZM_PACKETQUEUE_H
#include <list>
#include "zm_packet.h"
#include "zm_thread.h"
#include <mutex>
#include <condition_variable>
#include <list>
#include <mutex>
class ZMPacket;
extern "C" {
#include <libavformat/avformat.h>
}
typedef std::list<ZMPacket *>::iterator packetqueue_iterator;
class PacketQueue {

View File

@ -17,14 +17,9 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_poly.h"
#ifndef SOLARIS
#include <math.h>
#else
#include <cmath>
#endif
void Polygon::calcArea() {
double float_area = 0.0L;

View File

@ -20,11 +20,9 @@
#ifndef ZM_POLY_H
#define ZM_POLY_H
#include "zm.h"
#include "zm_coord.h"
#include "zm_box.h"
#include <math.h>
class Coord;
//
// Class used for storing a box, which is defined as a region

View File

@ -15,13 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#include <string.h>
#include "zm.h"
#include "zm_regexp.h"
#include "zm_logger.h"
#include <cstring>
#if HAVE_LIBPCRE
RegExpr::RegExpr( const char *pattern, int flags, int p_max_matches ) : max_matches( p_max_matches ), match_buffers( nullptr ), match_lengths( nullptr ), match_valid( nullptr )

View File

@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "zm.h"
#ifndef ZM_REGEXP_H
#define ZM_REGEXP_H
#include "zm_config.h"
#if HAVE_LIBPCRE
#if HAVE_PCRE_H

View File

@ -20,6 +20,8 @@
#include "zm_remote_camera.h"
#include "zm_utils.h"
#include <arpa/inet.h>
#include <netdb.h>
RemoteCamera::RemoteCamera(
unsigned int p_monitor_id,

View File

@ -22,12 +22,7 @@
#include "zm_camera.h"
#include "zm_rtsp_auth.h"
#include <string>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#define SOCKET_BUF_SIZE 8192

View File

@ -18,14 +18,12 @@
//
#include "zm_remote_camera_http.h"
#include "zm_rtsp_auth.h"
#include "zm_mem_utils.h"
#include "zm_packet.h"
#include "zm_signal.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include "zm_regexp.h"
#include "zm_utils.h"
#include <arpa/inet.h>
#include <netdb.h>
#ifdef SOLARIS

View File

@ -20,11 +20,8 @@
#ifndef ZM_REMOTE_CAMERA_HTTP_H
#define ZM_REMOTE_CAMERA_HTTP_H
#include "zm_remote_camera.h"
#include "zm_buffer.h"
#include "zm_regexp.h"
#include "zm_utils.h"
#include "zm_remote_camera.h"
//
// Class representing 'http' cameras, i.e. those which are

View File

@ -19,12 +19,10 @@
#include "zm_remote_camera_nvsocket.h"
#include "zm_mem_utils.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <errno.h>
#include "zm_packet.h"
#include <netdb.h>
#include <sys/socket.h>
#include <sys/types.h>
#ifdef SOLARIS
#include <sys/filio.h> // FIONREAD and friends

View File

@ -20,11 +20,8 @@
#ifndef ZM_REMOTE_CAMERA_NVSOCKET_H
#define ZM_REMOTE_CAMERA_NVSOCKET_H
#include "zm_remote_camera.h"
#include "zm_buffer.h"
#include "zm_regexp.h"
#include "zm_utils.h"
#include "zm_remote_camera.h"
class RemoteCameraNVSocket : public RemoteCamera {
protected:

View File

@ -17,17 +17,13 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_remote_camera_rtsp.h"
#include "zm_config.h"
#include "zm_packet.h"
#if HAVE_LIBAVFORMAT
#include "zm_remote_camera_rtsp.h"
#include "zm_ffmpeg.h"
#include "zm_mem_utils.h"
#include <sys/types.h>
#include <sys/socket.h>
RemoteCameraRtsp::RemoteCameraRtsp(
unsigned int p_monitor_id,
const std::string &p_method,

View File

@ -20,14 +20,9 @@
#ifndef ZM_REMOTE_CAMERA_RTSP_H
#define ZM_REMOTE_CAMERA_RTSP_H
#include "zm_remote_camera.h"
#include "zm_buffer.h"
#include "zm_utils.h"
#include "zm_rtsp.h"
#include "zm_ffmpeg.h"
#include "zm_videostore.h"
#include "zm_packetqueue.h"
#include "zm_remote_camera.h"
#include "zm_rtsp.h"
//
// Class representing 'rtsp' cameras, i.e. those which are

View File

@ -20,7 +20,9 @@
#ifndef ZM_RGB_H
#define ZM_RGB_H
typedef uint32_t Rgb; // RGB colour type
#include "zm_define.h"
typedef uint32 Rgb; // RGB colour type
#define WHITE 0xff
#define WHITE_R 0xff

View File

@ -20,8 +20,6 @@
#ifndef ZM_RTP_H
#define ZM_RTP_H
#include "zm.h"
#define RTP_VERSION 2
#endif // ZM_RTP_H

View File

@ -15,18 +15,15 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#if HAVE_LIBAVFORMAT
//
#include "zm_rtp_ctrl.h"
#include "zm_time.h"
#include "zm_config.h"
#include "zm_rtp.h"
#include "zm_rtsp.h"
#include <errno.h>
#if HAVE_LIBAVFORMAT
RtpCtrlThread::RtpCtrlThread( RtspThread &rtspThread, RtpSource &rtpSource )
: mRtspThread( rtspThread ), mRtpSource( rtpSource ), mStop( false )

View File

@ -20,8 +20,6 @@
#ifndef ZM_RTP_CTRL_H
#define ZM_RTP_CTRL_H
#include "zm_rtp.h"
#include "zm_comms.h"
#include "zm_thread.h"
// Defined in ffmpeg rtp.h

View File

@ -17,15 +17,13 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#if HAVE_LIBAVFORMAT
#include "zm_rtp_data.h"
#include "zm_config.h"
#include "zm_rtsp.h"
#include "zm_signal.h"
#include <arpa/inet.h>
#if HAVE_LIBAVFORMAT
RtpDataThread::RtpDataThread(RtspThread &rtspThread, RtpSource &rtpSource) :
mRtspThread(rtspThread), mRtpSource(rtpSource), mStop(false)

View File

@ -20,7 +20,6 @@
#ifndef ZM_RTP_DATA_H
#define ZM_RTP_DATA_H
#include "zm_buffer.h"
#include "zm_define.h"
#include "zm_thread.h"

View File

@ -21,7 +21,7 @@
#include "zm_time.h"
#include "zm_rtp_data.h"
#include "zm_utils.h"
#include <arpa/inet.h>
#if HAVE_LIBAVCODEC

View File

@ -21,12 +21,12 @@
#define ZM_RTP_SOURCE_H
#include "zm_buffer.h"
#include "zm_config.h"
#include "zm_define.h"
#include "zm_ffmpeg.h"
#include "zm_thread.h"
#include <sys/time.h>
#include <string>
#include <sys/time.h>
#if HAVE_LIBAVCODEC

View File

@ -17,20 +17,14 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#if HAVE_LIBAVFORMAT
#include "zm_rtsp.h"
#include "zm_config.h"
#include "zm_rtp_data.h"
#include "zm_rtp_ctrl.h"
#include "zm_db.h"
#include <sys/time.h>
#include <signal.h>
#include <stdlib.h>
#include <errno.h>
#if HAVE_LIBAVFORMAT
int RtspThread::smMinDataPort = 0;
int RtspThread::smMaxDataPort = 0;

View File

@ -20,16 +20,12 @@
#ifndef ZM_RTSP_H
#define ZM_RTSP_H
#include "zm.h"
#include "zm_ffmpeg.h"
#include "zm_comms.h"
#include "zm_thread.h"
#include "zm_rtp_source.h"
#include "zm_rtsp_auth.h"
#include "zm_sdp.h"
#include <set>
#include <map>
#include <set>
class RtspThread : public Thread {
public:

View File

@ -14,15 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
//
#include "zm.h"
#include "zm_utils.h"
#include "zm_rtsp_auth.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zm_logger.h"
#include "zm_utils.h"
#include <cstring>
namespace zm {

View File

@ -19,6 +19,9 @@
#ifndef ZM_RTSP_AUTH_H
#define ZM_RTSP_AUTH_H
#include "zm_config.h"
#include <string>
#if HAVE_GNUTLS_GNUTLS_H
#include <gnutls/gnutls.h>
#endif

View File

@ -6,17 +6,15 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#include "zm_rtsp_server_adts_source.h"
#include "zm_config.h"
#include <sstream>
#if HAVE_RTSP_SERVER
#include <sstream>
#include <iomanip>
// live555
#include <Base64.hh>
#include "zm_rtsp_server_adts_source.h"
static unsigned const samplingFrequencyTable[16] = {
96000, 88200, 64000, 48000,
44100, 32000, 24000, 22050,
@ -47,4 +45,4 @@ ADTS_ZoneMinderDeviceSource::ADTS_ZoneMinderDeviceSource(
<< "\r\n";
m_auxLine.assign(os.str());
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -9,17 +9,13 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#ifndef ZM_RTSP_SERVER_ADTS_SOURCE_H
#define ZM_RTSP_SERVER_ADTS_SOURCE_H
#include "zm_config.h"
#include "zm_rtsp_server_device_source.h"
#if HAVE_RTSP_SERVER
#ifndef ADTS_ZoneMinder_DEVICE_SOURCE
#define ADTS_ZoneMinder_DEVICE_SOURCE
// project
#include "zm_rtsp_server_device_source.h"
#include "zm_rtsp_server_frame.h"
// ---------------------------------
// ADTS(AAC) ZoneMinder FramedSource
// ---------------------------------
@ -67,5 +63,6 @@ class ADTS_ZoneMinderDeviceSource : public ZoneMinderDeviceSource {
int samplingFrequencyIndex;
int channels;
};
#endif
#endif
#endif // HAVE_RTSP_SERVER
#endif // ZM_RTSP_SERVER_ADTS_SOURCE_H

View File

@ -8,13 +8,14 @@
**
** -------------------------------------------------------------------------*/
#include <utility>
#include "zm_rtsp_server_device_source.h"
#include "zm_rtsp_server_frame.h"
#include "zm_logger.h"
#if HAVE_RTSP_SERVER
#include "zm_config.h"
#include "zm_logger.h"
#include "zm_rtsp_server_frame.h"
#include "zm_signal.h"
#if HAVE_RTSP_SERVER
ZoneMinderDeviceSource::ZoneMinderDeviceSource(
UsageEnvironment& env,
Monitor* monitor,
@ -213,4 +214,4 @@ unsigned char* ZoneMinderDeviceSource::extractFrame(unsigned char* frame, size_
size = 0;
return frame;
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -6,24 +6,19 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#ifndef ZM_RTSP_SERVER_DEVICE_SOURCE_H
#define ZM_RTSP_SERVER_DEVICE_SOURCE_H
#include "zm_config.h"
#include "zm_monitor.h"
#include <list>
#include <string>
#include <utility>
#if HAVE_RTSP_SERVER
#ifndef DEVICE_SOURCE
#define DEVICE_SOURCE
#include <string>
#include <list>
#include <iostream>
#include <liveMedia.hh>
#include "zm_monitor.h"
#include "zm_rtsp_server_frame.h"
#include "zm_packetqueue.h"
#include <linux/types.h>
class NAL_Frame;
class ZoneMinderDeviceSource: public FramedSource {
@ -77,6 +72,6 @@ class ZoneMinderDeviceSource: public FramedSource {
std::string m_auxLine;
int stop;
};
#endif // HAVE_RTSP_SERVER
#endif
#endif
#endif // ZM_RTSP_SERVER_DEVICE_SOURCE_H

View File

@ -1,11 +1,12 @@
#pragma once
#ifndef ZM_RTSP_SERVER_FRAME_H
#define ZM_RTSP_SERVER_FRAME_H
#include "zm_config.h"
#include "zm_logger.h"
#include "zm.h"
#include <cstring>
#include <sys/time.h>
#if HAVE_RTSP_SERVER
#include <sys/time.h>
#include <string.h>
// ---------------------------------
// Captured frame
// ---------------------------------
@ -60,4 +61,6 @@ class NAL_Frame {
private:
int m_ref_count;
};
#endif
#endif // HAVE_RTSP_SERVER
#endif // ZM_RTSP_SERVER_FRAME_H

View File

@ -6,18 +6,18 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#include "zm_rtsp_server_h264_device_source.h"
#include "zm_config.h"
#include "zm_logger.h"
#include "zm_rtsp_server_frame.h"
#include <iomanip>
#include <sstream>
#if HAVE_RTSP_SERVER
#include <sstream>
#include <iomanip>
// live555
#include <Base64.hh>
#include "zm_rtsp_server_h264_device_source.h"
// ---------------------------------
// H264 ZoneMinder FramedSource
// ---------------------------------
@ -226,4 +226,4 @@ unsigned char* H26X_ZoneMinderDeviceSource::extractFrame(unsigned char* frame,
return outFrame;
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -9,17 +9,16 @@
**
** -------------------------------------------------------------------------*/
#ifndef ZM_RTSP_H264_DEVICE_SOURCE_H
#define ZM_RTSP_H264_DEVICE_SOURCE_H
#ifndef H264_ZoneMinder_DEVICE_SOURCE
#define H264_ZoneMinder_DEVICE_SOURCE
#include "zm_config.h"
#include "zm_rtsp_server_device_source.h"
#include "zm_rtsp_server_frame.h"
// ---------------------------------
// H264 ZoneMinder FramedSource
// ---------------------------------
#if HAVE_RTSP_SERVER
class H26X_ZoneMinderDeviceSource : public ZoneMinderDeviceSource {
protected:
H26X_ZoneMinderDeviceSource(
@ -100,4 +99,6 @@ class H265_ZoneMinderDeviceSource : public H26X_ZoneMinderDeviceSource {
protected:
std::string m_vps;
};
#endif
#endif // HAVE_RTSP_SERVER
#endif // ZM_RTSP_H264_DEVICE_SOURCE_H

View File

@ -4,15 +4,13 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#include "zm_rtsp_server_server_media_subsession.h"
#if HAVE_RTSP_SERVER
#include "zm_config.h"
#include "zm_rtsp_server_adts_source.h"
#include <sstream>
#include "zm_rtsp_server_server_media_subsession.h"
#include "zm_rtsp_server_device_source.h"
#include "zm_rtsp_server_adts_source.h"
#if HAVE_RTSP_SERVER
// ---------------------------------
// BaseServerMediaSubsession
// ---------------------------------
@ -106,4 +104,4 @@ char const* BaseServerMediaSubsession::getAuxLine(
}
return auxLine;
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -7,19 +7,13 @@
**
** -------------------------------------------------------------------------*/
#pragma once
#ifndef ZM_RTSP_SERVER_SERVER_MEDIA_SUBSESSION_H
#define ZM_RTSP_SERVER_SERVER_MEDIA_SUBSESSION_H
#include "zm.h"
#include "zm_config.h"
#include <string>
#if HAVE_RTSP_SERVER
#include <sys/stat.h>
#include <string>
#include <iomanip>
#include <iostream>
#include <fstream>
#include <liveMedia.hh>
class ZoneMinderDeviceSource;
@ -48,4 +42,6 @@ class BaseServerMediaSubsession {
protected:
StreamReplicator* m_replicator;
};
#endif
#endif // HAVE_RTSP_SERVER
#endif // ZM_RTSP_SERVER_SERVER_MEDIA_SUBSESSION_H

View File

@ -1,12 +1,11 @@
#include "zm_rtsp_server_thread.h"
#include "zm.h"
#include "zm_config.h"
#include "zm_rtsp_server_adts_source.h"
#include "zm_rtsp_server_h264_device_source.h"
#include "zm_rtsp_server_unicast_server_media_subsession.h"
#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"
#include "zm_rtsp_server_adts_source.h"
#include "zm_rtsp_server_unicast_server_media_subsession.h"
#include <StreamReplicator.hh>
RTSPServerThread::RTSPServerThread(Monitor *p_monitor) :
@ -155,4 +154,4 @@ const std::string RTSPServerThread::getRtpFormat(AVCodecID codec_id, bool muxTS)
return "";
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -1,17 +1,16 @@
#include "zm.h"
#if HAVE_RTSP_SERVER
#ifndef ZM_RTSP_SERVER_THREAD_H
#define ZM_RTSP_SERVER_THREAD_H
#include "zm_config.h"
#include "zm_ffmpeg.h"
#include "zm_thread.h"
#include <signal.h>
#include "zm_monitor.h"
#include <list>
#if HAVE_RTSP_SERVER
#include <BasicUsageEnvironment.hh>
#include <RTSPServer.hh>
#include "zm_ffmpeg.h"
class Monitor;
class RTSPServerThread : public Thread {
private:
@ -39,6 +38,6 @@ class RTSPServerThread : public Thread {
const std::list<ServerMediaSubsession*> & subSession
);
};
#endif // HAVE_RTSP_SERVER
#endif
#endif
#endif // ZM_RTSP_SERVER_THREAD_H

View File

@ -7,11 +7,12 @@
**
** -------------------------------------------------------------------------*/
#include "zm.h"
#if HAVE_RTSP_SERVER
#include "zm_rtsp_server_unicast_server_media_subsession.h"
#include "zm_config.h"
#include "zm_rtsp_server_device_source.h"
#if HAVE_RTSP_SERVER
// -----------------------------------------
// ServerMediaSubsession for Unicast
// -----------------------------------------
@ -46,4 +47,4 @@ char const* UnicastServerMediaSubsession::getAuxSDPLine(
) {
return this->getAuxLine(dynamic_cast<ZoneMinderDeviceSource*>(m_replicator->inputSource()), rtpSink->rtpPayloadType());
}
#endif
#endif // HAVE_RTSP_SERVER

View File

@ -7,13 +7,16 @@
**
** -------------------------------------------------------------------------*/
#pragma once
#ifndef ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H
#define ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H
#include "zm_config.h"
#include "zm_rtsp_server_server_media_subsession.h"
// -----------------------------------------
// ServerMediaSubsession for Unicast
// -----------------------------------------
#if HAVE_RTSP_SERVER
class UnicastServerMediaSubsession :
public OnDemandServerMediaSubsession,
public BaseServerMediaSubsession
@ -43,3 +46,6 @@ class UnicastServerMediaSubsession :
protected:
const std::string m_format;
};
#endif // HAVE_RTSP_SERVER
#endif // ZM_RTSP_SERVER_UNICAST_SERVER_MEDIA_SUBSESSION_H

View File

@ -17,12 +17,13 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#include "zm.h"
#include "zm_sdp.h"
#include "zm_config.h"
#include "zm_logger.h"
#if HAVE_LIBAVFORMAT
#include "zm_sdp.h"
#if (LIBAVCODEC_VERSION_CHECK(52, 64, 0, 64, 0) || LIBAVUTIL_VERSION_CHECK(50, 14, 0, 14, 0))
SessionDescriptor::StaticPayloadDesc SessionDescriptor::smStaticPayloads[] = {
{ 0, "PCMU", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_MULAW, 8000, 1 },

View File

@ -20,14 +20,8 @@
#ifndef ZM_SDP_H
#define ZM_SDP_H
#include "zm.h"
#include "zm_utils.h"
#include "zm_exception.h"
#include "zm_ffmpeg.h"
#include <stdlib.h>
#include "zm_utils.h"
#include <string>
#include <vector>

Some files were not shown because too many files have changed in this diff Show More