Simplified TS-SRT input to no longer add/remove a temporary track
This commit is contained in:
parent
840a1f5f4e
commit
e73726a1c7
2 changed files with 2 additions and 9 deletions
|
@ -201,7 +201,7 @@ namespace Mist{
|
||||||
}
|
}
|
||||||
|
|
||||||
tsStream.initializeMetadata(meta);
|
tsStream.initializeMetadata(meta);
|
||||||
size_t thisIdx = M.trackIDToIndex(thisPacket.getTrackId(), getpid());
|
thisIdx = M.trackIDToIndex(thisPacket.getTrackId(), getpid());
|
||||||
if (thisIdx == INVALID_TRACK_ID){getNext(idx);}
|
if (thisIdx == INVALID_TRACK_ID){getNext(idx);}
|
||||||
|
|
||||||
uint64_t adjustTime = thisPacket.getTime() + timeStampOffset;
|
uint64_t adjustTime = thisPacket.getTime() + timeStampOffset;
|
||||||
|
@ -219,13 +219,7 @@ namespace Mist{
|
||||||
|
|
||||||
bool inputTSSRT::openStreamSource(){return true;}
|
bool inputTSSRT::openStreamSource(){return true;}
|
||||||
|
|
||||||
void inputTSSRT::parseStreamHeader(){
|
|
||||||
// Placeholder empty track to force normal code to continue despite no tracks available
|
|
||||||
tmpIdx = meta.addTrack(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void inputTSSRT::streamMainLoop(){
|
void inputTSSRT::streamMainLoop(){
|
||||||
meta.removeTrack(tmpIdx);
|
|
||||||
// If we do not have a srtConn here, we are the main thread and should start accepting pushes.
|
// If we do not have a srtConn here, we are the main thread and should start accepting pushes.
|
||||||
if (srtConn.getSocket() == -1){
|
if (srtConn.getSocket() == -1){
|
||||||
cfgPointer = config;
|
cfgPointer = config;
|
||||||
|
|
|
@ -28,9 +28,9 @@ namespace Mist{
|
||||||
virtual bool needHeader(){return false;}
|
virtual bool needHeader(){return false;}
|
||||||
virtual bool isSingular(){return singularFlag;}
|
virtual bool isSingular(){return singularFlag;}
|
||||||
virtual bool isThread(){return !singularFlag;}
|
virtual bool isThread(){return !singularFlag;}
|
||||||
|
virtual bool publishesTracks(){return false;}
|
||||||
|
|
||||||
bool openStreamSource();
|
bool openStreamSource();
|
||||||
void parseStreamHeader();
|
|
||||||
void streamMainLoop();
|
void streamMainLoop();
|
||||||
TS::Stream tsStream; ///< Used for parsing the incoming ts stream
|
TS::Stream tsStream; ///< Used for parsing the incoming ts stream
|
||||||
TS::Packet tsBuf;
|
TS::Packet tsBuf;
|
||||||
|
@ -40,7 +40,6 @@ namespace Mist{
|
||||||
|
|
||||||
Socket::SRTConnection srtConn;
|
Socket::SRTConnection srtConn;
|
||||||
bool singularFlag;
|
bool singularFlag;
|
||||||
size_t tmpIdx;
|
|
||||||
virtual void connStats(Comms::Statistics &statComm);
|
virtual void connStats(Comms::Statistics &statComm);
|
||||||
};
|
};
|
||||||
}// namespace Mist
|
}// namespace Mist
|
||||||
|
|
Loading…
Add table
Reference in a new issue