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

Method RtpSource

apps/transmitmedia.cpp:1106–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104 int bytes_to_skip = MINIMUM_RTP_HEADER_SIZE;
1105public:
1106 RtpSource(string host, int port, const map<string,string>& attr) :
1107 UdpSource { host, port, attr }
1108 {
1109 if (attr.count("rtpheadersize"))
1110 {
1111 const int header_size = stoi(attr.at("rtpheadersize"), 0, 0);
1112 if (header_size < MINIMUM_RTP_HEADER_SIZE)
1113 {
1114 cerr << "Invalid RTP header size provided: " << header_size
1115 << ", minimum allowed is " << MINIMUM_RTP_HEADER_SIZE
1116 << endl;
1117 throw invalid_argument("Invalid RTP header size");
1118 }
1119 bytes_to_skip = header_size;
1120 }
1121 }
1122
1123 int Read(size_t chunk, MediaPacket& pkt, ostream & ignored SRT_ATR_UNUSED = cout) override
1124 {

Callers

nothing calls this directly

Calls 1

countMethod · 0.45

Tested by

no test coverage detected