Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
RTSPClientSrc.h
1#pragma once
2#include <chrono>
3#include <string>
4#include "Module.h"
5
7{
8public:
9 RTSPClientSrcProps(const std::string& rtspURL, const std::string& userName, const std::string& password, bool useTCP=true) : ModuleProps(),
11 {
12 }
13
15 {
16 }
17
19 {
20 return ModuleProps::getSerializeSize() + sizeof(rtspURL) + sizeof(userName) + sizeof(password), sizeof(useTCP);
21 }
22
24 bool useTCP;
25private:
27
28 template<class Archive>
29 void serialize(Archive& ar, const unsigned int version)
30 {
31 ar& boost::serialization::base_object<ModuleProps>(*this);
32 ar& rtspURL;
33 ar& userName;
34 ar& password;
35 ar& useTCP;
36 }
37};
38
39class RTSPClientSrc : public Module {
40public:
42 virtual ~RTSPClientSrc();
43 bool init();
44 bool term();
45 void setProps(RTSPClientSrcProps& props);
46 int getCurrentFps();
48
49protected:
50 bool produce();
51 bool validateOutputPins();
52 void notifyPlay(bool play);
53 bool handleCommand(Command::CommandType type, frame_sp& frame);
54 bool handlePropsChange(frame_sp& frame);
55private:
57 class Detail;
58 boost::shared_ptr<Detail> mDetail;
59};
CommandType
Definition Command.h:9
Definition Module.h:33
virtual size_t getSerializeSize()
Definition Module.h:101
Definition Module.h:151
bool play(float speed, bool direction=true)
Definition Module.cpp:1139
Definition RTSPClientSrc.h:7
void serialize(Archive &ar, const unsigned int version)
Definition RTSPClientSrc.h:29
RTSPClientSrcProps()
Definition RTSPClientSrc.h:14
bool useTCP
Definition RTSPClientSrc.h:24
string userName
Definition RTSPClientSrc.h:23
string password
Definition RTSPClientSrc.h:23
RTSPClientSrcProps(const std::string &rtspURL, const std::string &userName, const std::string &password, bool useTCP=true)
Definition RTSPClientSrc.h:9
friend class boost::serialization::access
Definition RTSPClientSrc.h:26
size_t getSerializeSize()
Definition RTSPClientSrc.h:18
string rtspURL
Definition RTSPClientSrc.h:23
Definition RTSPClientSrc.cpp:49
Definition RTSPClientSrc.h:39
bool produce()
Definition RTSPClientSrc.cpp:245
boost::shared_ptr< Detail > mDetail
Definition RTSPClientSrc.h:58
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:56