| 54 | } |
| 55 | |
| 56 | bool StreamThreadTSWriter::writeDataToOutputDevice(mpegts::PacketBuffer &buffer, StreamClient &UNUSED(client)) { |
| 57 | const unsigned char *tsBuffer = buffer.getTSReadBufferPtr(); |
| 58 | |
| 59 | static constexpr size_t dataSize = buffer.getBufferSize(); |
| 60 | |
| 61 | const long timestamp = base::TimeCounter::getTicks() * 90; |
| 62 | |
| 63 | // RTP packet octet count (Bytes) |
| 64 | _stream.addRtpData(dataSize, timestamp); |
| 65 | |
| 66 | // write TS packets to file |
| 67 | if (_file.is_open()) { |
| 68 | _file.write(reinterpret_cast<const char *>(tsBuffer), dataSize); |
| 69 | } |
| 70 | return true; |
| 71 | } |
| 72 | |
| 73 | } // namespace output |
nothing calls this directly
no test coverage detected