MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / writeDataToOutputDevice

Method writeDataToOutputDevice

src/output/StreamThreadHttp.cpp:70–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70bool StreamThreadHttp::writeDataToOutputDevice(mpegts::PacketBuffer &buffer, StreamClient &client) {
71 static constexpr unsigned int dataSize = buffer.getBufferSize();
72 const long timestamp = base::TimeCounter::getTicks() * 90;
73
74 // RTP packet octet count (Bytes)
75 _stream.addRtpData(dataSize, timestamp);
76
77 iovec iov[1];
78 iov[0].iov_base = buffer.getTSReadBufferPtr();
79 iov[0].iov_len = dataSize;
80
81 // send the HTTP packet
82 if (!client.writeHttpData(iov, 1)) {
83 if (!client.isSelfDestructing()) {
84 SI_LOG_ERROR("Stream: %d, Error sending HTTP Stream Data to %s", _stream.getStreamID(),
85 client.getIPAddressOfStream().c_str());
86 client.selfDestruct();
87 }
88 }
89 return true;
90}
91
92} // namespace output

Callers

nothing calls this directly

Calls 8

getBufferSizeMethod · 0.80
addRtpDataMethod · 0.80
getTSReadBufferPtrMethod · 0.80
writeHttpDataMethod · 0.80
isSelfDestructingMethod · 0.80
getIPAddressOfStreamMethod · 0.80
selfDestructMethod · 0.80
getStreamIDMethod · 0.45

Tested by

no test coverage detected