MCPcopy Create free account
hub / github.com/Haivision/srt / DirectionName

Function DirectionName

testing/testmedia.cpp:69–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67std::shared_ptr<SrtStatsWriter> transmit_stats_writer;
68
69string DirectionName(SRT_EPOLL_T direction)
70{
71 string dir_name;
72 if (direction & ~SRT_EPOLL_ERR)
73 {
74 if (direction & SRT_EPOLL_IN)
75 {
76 dir_name = "source";
77 }
78
79 if (direction & SRT_EPOLL_OUT)
80 {
81 if (!dir_name.empty())
82 dir_name = "relay";
83 else
84 dir_name = "target";
85 }
86
87 if (direction & SRT_EPOLL_ERR)
88 {
89 dir_name += "+error";
90 }
91 }
92 else
93 {
94 // stupid name for a case of IPE
95 dir_name = "stone";
96 }
97
98 return dir_name;
99}
100
101template<class FileBase> inline
102bytevector FileRead(FileBase& ifile, size_t chunk, const string& filename)

Callers 2

InitMethod · 0.85
AddPollerMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected