| 67 | std::shared_ptr<SrtStatsWriter> transmit_stats_writer; |
| 68 | |
| 69 | string 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 | |
| 101 | template<class FileBase> inline |
| 102 | bytevector FileRead(FileBase& ifile, size_t chunk, const string& filename) |