4#include "declarative/PropertyMacros.h"
30 template<
typename PropsT>
33 const std::map<std::string, apra::ScalarPropertyValue>& values,
34 std::vector<std::string>& missingRequired
40 auto it = values.find(
"encoderTargetKbps");
41 if (it != values.end()) {
42 if (
auto* val = std::get_if<int64_t>(&it->second)) {
43 props.encoderTargetKbps =
static_cast<uint32_t
>(*val);
49 if (propName ==
"url")
return URL;
50 if (propName ==
"title")
return title;
51 if (propName ==
"isTCP")
return isTCP;
52 if (propName ==
"encoderTargetKbps")
return static_cast<int64_t
>(
encoderTargetKbps);
53 throw std::runtime_error(
"Unknown property: " + propName);
83 bool process(frame_container &frames);
Definition FacialLandmarksCV.cpp:17
Definition RTSPPusher.h:7
std::string URL
Definition RTSPPusher.h:22
static std::vector< std::string > dynamicPropertyNames()
Definition RTSPPusher.h:60
RTSPPusherProps()
Definition RTSPPusher.h:10
~RTSPPusherProps()
Definition RTSPPusher.h:18
RTSPPusherProps(std::string _URL, std::string _title)
Definition RTSPPusher.h:14
static void applyProperties(PropsT &props, const std::map< std::string, apra::ScalarPropertyValue > &values, std::vector< std::string > &missingRequired)
Definition RTSPPusher.h:31
uint32_t encoderTargetKbps
Definition RTSPPusher.h:25
bool isTCP
Definition RTSPPusher.h:24
bool setProperty(const std::string &propName, const apra::ScalarPropertyValue &value)
Definition RTSPPusher.h:56
std::string title
Definition RTSPPusher.h:23
apra::ScalarPropertyValue getProperty(const std::string &propName) const
Definition RTSPPusher.h:48
Definition RTSPPusher.h:66
bool processEOS(string &pinId)
Definition RTSPPusher.cpp:410
bool init()
Definition RTSPPusher.cpp:305
bool shouldTriggerSOS()
Definition RTSPPusher.cpp:405
RTSPPusher(RTSPPusherProps props)
Definition RTSPPusher.cpp:292
bool process(frame_container &frames)
Definition RTSPPusher.cpp:354
bool processSOS(frame_sp &frame)
Definition RTSPPusher.cpp:381
virtual ~RTSPPusher()
Definition RTSPPusher.cpp:300
EventType
Definition RTSPPusher.h:69
@ CONNECTION_FAILED
Definition RTSPPusher.h:71
@ WRITE_FAILED
Definition RTSPPusher.h:72
@ CONNECTION_READY
Definition RTSPPusher.h:70
@ STREAM_ENDED
Definition RTSPPusher.h:73
bool validateInputPins()
Definition RTSPPusher.cpp:329
boost::shared_ptr< Detail > mDetail
Definition RTSPPusher.h:91
bool term()
Definition RTSPPusher.cpp:315
void applyProp(T &member, const char *propName, const std::map< std::string, ScalarPropertyValue > &values, bool isRequired, std::vector< std::string > &missingRequired)
Definition PropertyMacros.h:36
std::variant< int64_t, double, bool, std::string > ScalarPropertyValue
Definition ModuleRegistry.h:30