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_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> 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;