| 39 | // ============================================================================= |
| 40 | |
| 41 | StreamThreadBase::StreamThreadBase(const std::string &protocol, StreamInterface &stream) : |
| 42 | ThreadBase(StringConverter::getFormattedString("Streaming%d", stream.getStreamID())), |
| 43 | _stream(stream), |
| 44 | _protocol(protocol), |
| 45 | _state(State::Paused), |
| 46 | _clientID(0), |
| 47 | _cseq(0), |
| 48 | _writeIndex(0), |
| 49 | _readIndex(0), |
| 50 | _sendInterval(100) { |
| 51 | // Initialize all TS packets |
| 52 | uint32_t ssrc = _stream.getSSRC(); |
| 53 | long timestamp = _stream.getTimestamp(); |
| 54 | for (size_t i = 0; i < MAX_BUF; ++i) { |
| 55 | _tsBuffer[i].initialize(ssrc, timestamp); |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | StreamThreadBase::~StreamThreadBase() { |
| 60 | #ifdef LIBDVBCSA |
nothing calls this directly
no test coverage detected