| 110 | } |
| 111 | |
| 112 | bool TSReader::readFullTSPacket(mpegts::PacketBuffer &buffer) { |
| 113 | if (!_file.is_open()) { |
| 114 | return false; |
| 115 | } |
| 116 | _file.read(reinterpret_cast<char *>(buffer.getWriteBufferPtr()), |
| 117 | buffer.getAmountOfBytesToWrite()); |
| 118 | buffer.addAmountOfBytesWritten(_file.gcount()); |
| 119 | buffer.trySyncing(); |
| 120 | if (!buffer.full()) { |
| 121 | return false; |
| 122 | } |
| 123 | // Add data to Filter |
| 124 | _deviceData.addFilterData(_streamID, buffer); |
| 125 | return true; |
| 126 | } |
| 127 | |
| 128 | bool TSReader::capableOf(const input::InputSystem system) const { |
| 129 | return system == input::InputSystem::FILE; |
nothing calls this directly
no test coverage detected