Livepeer transcoding support

This commit is contained in:
Thulinma 2019-12-29 00:59:01 +01:00
parent 753da9bd3f
commit de4890ac20
12 changed files with 647 additions and 16 deletions

View file

@ -7,6 +7,10 @@
#include "ts_stream.h"
#include <stdint.h>
#include <sys/stat.h>
#include "tinythread.h"
tthread::recursive_mutex tMutex;
namespace TS{
@ -67,8 +71,7 @@ namespace TS{
uint64_t ADTSRemainder::getTodo(){return len - now;}
char *ADTSRemainder::getData(){return data;}
Stream::Stream(bool _threaded){
threaded = _threaded;
Stream::Stream(){
psCache = 0;
psCacheTid = 0;
}

View file

@ -1,6 +1,5 @@
#include "adts.h"
#include "h265.h"
#include "tinythread.h"
#include "ts_packet.h"
#include <deque>
#include <map>
@ -47,7 +46,7 @@ namespace TS{
class Stream{
public:
Stream(bool _threaded = false);
Stream();
~Stream();
void add(char *newPack, uint64_t bytePos = 0);
void add(Packet &newPack, uint64_t bytePos = 0);
@ -102,10 +101,6 @@ namespace TS{
std::map<size_t, size_t> rolloverCount;
std::map<size_t, unsigned long long> lastms;
mutable tthread::recursive_mutex tMutex;
bool threaded;
std::set<size_t> pmtTracks;
void parsePES(size_t tid, bool finished = false);

View file

@ -856,6 +856,7 @@ namespace Util{
uint32_t &recordsCount = RAXHDR_RECORDCNT;
uint64_t &recordEndPos = RAXHDR_ENDPOS;
if (recsPresent + amount > recordsCount){
BACKTRACE;
WARN_MSG("Exceeding recordCount (%d [%d + %d] > %d)", recsPresent + amount, recsPresent, amount, recordsCount);
recsPresent = 0;
}else{