Merge pull request #120 from cgutman/nvenc_linux

Add basic NVENC support on Linux
This commit is contained in:
loki-47-6F-64
2021-07-10 17:30:51 +02:00
committed by GitHub
5 changed files with 40 additions and 10 deletions

View File

@@ -511,11 +511,14 @@ std::vector<uint8_t> replace(const std::string_view &original, const std::string
std::vector<uint8_t> replaced;
auto begin = std::begin(original);
auto next = std::search(begin, std::end(original), std::begin(old), std::end(old));
auto end = std::end(original);
auto next = std::search(begin, end, std::begin(old), std::end(old));
std::copy(begin, next, std::back_inserter(replaced));
std::copy(std::begin(_new), std::end(_new), std::back_inserter(replaced));
std::copy(next + old.size(), std::end(original), std::back_inserter(replaced));
if(next != end) {
std::copy(std::begin(_new), std::end(_new), std::back_inserter(replaced));
std::copy(next + old.size(), end, std::back_inserter(replaced));
}
return replaced;
}
@@ -866,7 +869,7 @@ void videoBroadcastThread(udp::socket &sock) {
video_packet->packet.flags |= FLAG_EOF;
}
video_packet->rtp.header = FLAG_EXTENSION;
video_packet->rtp.header = 0x80 | FLAG_EXTENSION;
video_packet->rtp.sequenceNumber = util::endian::big<uint16_t>(lowseq + fecIndex);
});
@@ -883,7 +886,7 @@ void videoBroadcastThread(udp::socket &sock) {
inspect->packet.frameIndex = packet->pts;
inspect->rtp.header = FLAG_EXTENSION;
inspect->rtp.header = 0x80 | FLAG_EXTENSION;
inspect->rtp.sequenceNumber = util::endian::big<uint16_t>(lowseq + x);
}