Add FrameType to StreamBase so we can sends analysis frames

This commit is contained in:
Isaac Connor 2020-09-07 13:27:59 -04:00
parent 16964cf327
commit 8863fc0e0f
1 changed files with 6 additions and 1 deletions

View File

@ -40,6 +40,7 @@ public:
STREAM_SINGLE, STREAM_SINGLE,
STREAM_MPEG STREAM_MPEG
} StreamType; } StreamType;
typedef enum { FRAME_NORMAL, FRAME_ANALYSIS } FrameType;
protected: protected:
static constexpr Seconds MAX_STREAM_DELAY = Seconds(5); static constexpr Seconds MAX_STREAM_DELAY = Seconds(5);
@ -97,6 +98,7 @@ protected:
std::shared_ptr<Monitor> monitor; std::shared_ptr<Monitor> monitor;
StreamType type; StreamType type;
FrameType frame_type;
const char *format; const char *format;
int replay_rate; int replay_rate;
int scale; int scale;
@ -153,6 +155,7 @@ public:
monitor_id(0), monitor_id(0),
monitor(nullptr), monitor(nullptr),
type(DEFAULT_TYPE), type(DEFAULT_TYPE),
frame_type(FRAME_NORMAL),
format(""), format(""),
replay_rate(DEFAULT_RATE), replay_rate(DEFAULT_RATE),
scale(DEFAULT_SCALE), scale(DEFAULT_SCALE),
@ -198,7 +201,9 @@ public:
type = STREAM_RAW; type = STREAM_RAW;
} }
#endif #endif
}
void setStreamFrameType(FrameType p_type) {
frame_type = p_type;
} }
void setStreamFormat(const char *p_format) { void setStreamFormat(const char *p_format) {
format = p_format; format = p_format;