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

Method readFullTSPacket

src/input/file/TSReader.cpp:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 7

getWriteBufferPtrMethod · 0.80
trySyncingMethod · 0.80
fullMethod · 0.80
addFilterDataMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected