5#include "declarative/PropertyMacros.h"
30 template<
typename PropsT>
33 const std::map<std::string, apra::ScalarPropertyValue>& values,
34 std::vector<std::string>& missingRequired
36 apra::applyProp(props.rtspURL,
"rtspURL", values,
true, missingRequired);
37 apra::applyProp(props.userName,
"userName", values,
false, missingRequired);
38 apra::applyProp(props.password,
"password", values,
false, missingRequired);
39 apra::applyProp(props.useTCP,
"useTCP", values,
false, missingRequired);
43 if (propName ==
"rtspURL")
return rtspURL;
44 if (propName ==
"userName")
return userName;
45 if (propName ==
"password")
return password;
46 if (propName ==
"useTCP")
return useTCP;
47 throw std::runtime_error(
"Unknown property: " + propName);
62 template<
class Archive>
63 void serialize(Archive& ar,
const unsigned int version)
65 ar& boost::serialization::base_object<ModuleProps>(*
this);
CommandType
Definition Command.h:9
virtual size_t getSerializeSize()
Definition Module.h:101
bool play(float speed, bool direction=true)
Definition Module.cpp:1140
Definition RTSPClientSrc.h:8
static void applyProperties(PropsT &props, const std::map< std::string, apra::ScalarPropertyValue > &values, std::vector< std::string > &missingRequired)
Definition RTSPClientSrc.h:31
void serialize(Archive &ar, const unsigned int version)
Definition RTSPClientSrc.h:63
RTSPClientSrcProps()
Definition RTSPClientSrc.h:15
bool useTCP
Definition RTSPClientSrc.h:25
string userName
Definition RTSPClientSrc.h:24
string password
Definition RTSPClientSrc.h:24
bool setProperty(const std::string &propName, const apra::ScalarPropertyValue &value)
Definition RTSPClientSrc.h:50
RTSPClientSrcProps(const std::string &rtspURL, const std::string &userName, const std::string &password, bool useTCP=true)
Definition RTSPClientSrc.h:10
friend class boost::serialization::access
Definition RTSPClientSrc.h:60
size_t getSerializeSize()
Definition RTSPClientSrc.h:19
string rtspURL
Definition RTSPClientSrc.h:24
apra::ScalarPropertyValue getProperty(const std::string &propName) const
Definition RTSPClientSrc.h:42
static std::vector< std::string > dynamicPropertyNames()
Definition RTSPClientSrc.h:55
Definition RTSPClientSrc.cpp:49
Definition RTSPClientSrc.h:73
bool produce()
Definition RTSPClientSrc.cpp:245
boost::shared_ptr< Detail > mDetail
Definition RTSPClientSrc.h:92
int getCurrentFps()
Definition RTSPClientSrc.cpp:262
bool handleCommand(Command::CommandType type, frame_sp &frame)
Definition RTSPClientSrc.cpp:253
bool handlePropsChange(frame_sp &frame)
Definition RTSPClientSrc.cpp:267
bool term()
Definition RTSPClientSrc.cpp:232
RTSPClientSrcProps getProps()
Definition RTSPClientSrc.cpp:241
bool init()
Definition RTSPClientSrc.cpp:225
RTSPClientSrc(RTSPClientSrcProps _props)
Definition RTSPClientSrc.cpp:219
virtual ~RTSPClientSrc()
Definition RTSPClientSrc.cpp:223
bool validateOutputPins()
Definition RTSPClientSrc.cpp:248
void setProps(RTSPClientSrcProps &props)
Definition RTSPClientSrc.cpp:236
void notifyPlay(bool play)
Definition RTSPClientSrc.cpp:252
RTSPClientSrcProps mProps
Definition RTSPClientSrc.h:90
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