From 8863fc0e0fb937e16ac31af4adef11eba8b6b10e Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 7 Sep 2020 13:27:59 -0400 Subject: [PATCH] Add FrameType to StreamBase so we can sends analysis frames --- src/zm_stream.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zm_stream.h b/src/zm_stream.h index 09bd5bd80..827908e6d 100644 --- a/src/zm_stream.h +++ b/src/zm_stream.h @@ -40,6 +40,7 @@ public: STREAM_SINGLE, STREAM_MPEG } StreamType; + typedef enum { FRAME_NORMAL, FRAME_ANALYSIS } FrameType; protected: static constexpr Seconds MAX_STREAM_DELAY = Seconds(5); @@ -97,6 +98,7 @@ protected: std::shared_ptr monitor; StreamType type; + FrameType frame_type; const char *format; int replay_rate; int scale; @@ -153,6 +155,7 @@ public: monitor_id(0), monitor(nullptr), type(DEFAULT_TYPE), + frame_type(FRAME_NORMAL), format(""), replay_rate(DEFAULT_RATE), scale(DEFAULT_SCALE), @@ -198,7 +201,9 @@ public: type = STREAM_RAW; } #endif - + } + void setStreamFrameType(FrameType p_type) { + frame_type = p_type; } void setStreamFormat(const char *p_format) { format = p_format;