mistserver/src/input/input_ts.h
Thulinma 0bd5d742f6 SRT improvements:
- Made SRT support optional
- Make build options visible in cmake-gui
- Improved generic connection stats for outputs
- Added streamid handling configuration for MistInTSSRT
- Push input support over SRT
- Fixed support for SRT settings in push outputs
- Fix parsing of SRT-passed stream names
- Fixed hostnames in MistOutTSSRT, fixed PUSH_REWRITE trigger payload
- Opus support in TS-SRT
- Fixed SRT socket stats, fixed SRT socket address logic, improved SRT socket rolling restart support
- Fixed SRT push deny
2021-10-19 22:29:41 +02:00

47 lines
1.2 KiB
C++

#include "input.h"
#include <mist/dtsc.h>
#include <mist/nal.h>
#include <mist/ts_packet.h>
#include <mist/ts_stream.h>
#include <set>
#include <string>
namespace Mist{
/// This class contains all functions needed to implement TS Input
class inputTS : public Input{
public:
inputTS(Util::Config *cfg);
~inputTS();
virtual bool needsLock();
virtual std::string getConnectedBinHost(){
if (tcpCon){return tcpCon.getBinHost();}
/// \TODO Handle UDP
return Input::getConnectedBinHost();
}
protected:
// Private Functions
bool checkArguments();
bool preRun();
bool readHeader();
virtual bool needHeader();
virtual void getNext(size_t idx = INVALID_TRACK_ID);
void seek(uint64_t seekTime, size_t idx = INVALID_TRACK_ID);
void readPMT();
bool openStreamSource();
void parseStreamHeader();
void streamMainLoop();
void finish();
FILE *inFile; ///< The input file with ts data
TS::Assembler assembler;
TS::Stream tsStream; ///< Used for parsing the incoming ts stream
Socket::UDPConnection udpCon;
Socket::Connection tcpCon;
TS::Packet tsBuf;
pid_t inputProcess;
size_t tmpIdx;
bool isFinished;
};
}// namespace Mist
typedef Mist::inputTS mistIn;