Various fixes, among which:

- Fixed segfault when attempting to initialseek on disconnected streams
- Fix 100% CPU bug in controller's stats code
- WebRTC UDP bind socket improvements
- Several segfault fixes
- Increased packet reordering buffer size from 30 to 150 packets
- Tweaks to default output/buffer behaviour for incoming pushes
- Added message for load balancer checks
- Fixed HLS content type
- Stats fixes
- Exit reason fixes
- Fixed socket IP address detection
- Fixed non-string arguments for stream settings
- Added caching for getConnectedBinHost()
- Added WebRTC playback rate control
- Added/completed VP8/VP9 support to WebRTC/RTSP
- Added live seek option to WebRTC
- Fixed seek to exactly newest timestamp
- Fixed HLS input

# Conflicts:
#	lib/defines.h
#	src/input/input.cpp
This commit is contained in:
Thulinma 2021-04-21 18:11:46 +02:00
parent 2b99f2f5ea
commit 0af992d405
75 changed files with 1512 additions and 790 deletions

View file

@ -9,6 +9,10 @@ void AnalyserDTSC::init(Util::Config &conf){
opt["short"] = "H";
opt["help"] = "Parse entire file or streams as a single headless DTSC packet";
conf.addOption("headless", opt);
opt["long"] = "sizeprepended";
opt["short"] = "s";
opt["help"] = "If set, data of packets is considered to be size-prepended";
conf.addOption("sizeprepended", opt);
opt.null();
}
@ -21,6 +25,7 @@ bool AnalyserDTSC::open(const std::string &filename){
AnalyserDTSC::AnalyserDTSC(Util::Config &conf) : Analyser(conf){
headLess = conf.getBool("headless");
sizePrepended = conf.getBool("sizeprepended");
}
bool AnalyserDTSC::parsePacket(){
@ -60,10 +65,19 @@ bool AnalyserDTSC::parsePacket(){
char *payDat;
size_t payLen;
P.getString("data", payDat, payLen);
uint32_t currLen = 0;
uint64_t byteCounter = 0;
for (uint64_t i = 0; i < payLen; ++i){
if ((i % 32) == 0){std::cout << std::endl;}
if (sizePrepended && !currLen){
currLen = 4+Bit::btohl(payDat+i);
byteCounter = 0;
}
if ((byteCounter % 32) == 0){std::cout << std::endl;}
std::cout << std::hex << std::setw(2) << std::setfill('0') << (unsigned int)payDat[i];
++byteCounter;
--currLen;
}
std::cout << std::dec << std::endl;
}
break;
}

View file

@ -10,6 +10,7 @@ public:
private:
bool headLess;
bool sizePrepended;
DTSC::Packet P;
Socket::Connection conn;
uint64_t totalBytes;

View file

@ -16,6 +16,11 @@ void AnalyserRTMP::init(Util::Config &conf){
opt.null();
}
/// Checks if standard input is still valid.
bool AnalyserRTMP::isOpen(){
return (*isActive) && (std::cin.good() || strbuf.size());
}
AnalyserRTMP::AnalyserRTMP(Util::Config &conf) : Analyser(conf){
if (conf.getString("reconstruct") != ""){
reconstruct.open(conf.getString("reconstruct").c_str());
@ -43,7 +48,10 @@ bool AnalyserRTMP::parsePacket(){
// While we can't parse a packet,
while (!next.Parse(strbuf)){
// fill our internal buffer "strbuf" in (up to) 1024 byte chunks
if (!std::cin.good()){return false;}
if (!std::cin.good()){
strbuf.clear();
return false;
}
size_t charCount = 0;
std::string tmpbuffer;
tmpbuffer.reserve(1024);

View file

@ -18,4 +18,5 @@ public:
static void init(Util::Config &conf);
bool parsePacket();
virtual bool open(const std::string &filename);
virtual bool isOpen();
};