MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
input_ts.h
Go to the documentation of this file.
1 #include "input.h"
2 #include <mist/nal.h>
3 #include <mist/dtsc.h>
4 #include <mist/ts_packet.h>
5 #include <mist/ts_stream.h>
6 #include <string>
7 #include <set>
8 
9 
10 namespace Mist {
12  class inputTS : public Input {
13  public:
14  inputTS(Util::Config * cfg);
15  ~inputTS();
16  protected:
17  //Private Functions
18  bool setup();
19  bool readHeader();
20  void getNext(bool smart = true);
21  void seek(int seekTime);
22  void trackSelect(std::string trackSpec);
23  void readPMT();
24 
25 #ifdef TSLIVE_INPUT
26  //Live tsinput does not have a header, so parseheader should do nothing
27  void parseHeader() { }
28  //In case of live TS Input, we override the default serve function
29  void serve();
30  void finish();
31 #endif
32 
33 
34 
35 
36  FILE * inFile;
38 
39  bool pushing;
41  std::string udpDataBuffer;
42 
44  };
45 }
46 
48 
inputTS(Util::Config *cfg)
Constructor of TS Input.
Definition: input_ts.cpp:115
void getNext(bool smart=true)
Gets the next packet that is to be sent At the moment, the logic of sending the last packet that was ...
Definition: input_ts.cpp:273
virtual void parseHeader()
Definition: input.cpp:283
Definition: ts_stream.h:21
void seek(int seekTime)
Seeks to a specific time.
Definition: input_ts.cpp:346
Socket::UDPConnection udpCon
Definition: input_ts.h:40
Definition: socket.h:123
void readPMT()
Definition: input_ts.cpp:321
virtual void finish()
Definition: input.cpp:243
This class contains all functions needed to implement TS Input.
Definition: input_ts.h:12
Definition: input.h:19
Recording to file.
Definition: input.cpp:13
TS::Packet tsBuf
Definition: input_ts.h:43
TS::Stream tsStream
Used for parsing the incoming ts stream.
Definition: input_ts.h:37
Deals with parsing configuration from commandline options.
Definition: config.h:18
Class for reading and writing TS Streams.
Definition: ts_packet.h:21
~inputTS()
Definition: input_ts.cpp:149
Mist::inputTS mistIn
Definition: input_ts.h:47
bool readHeader()
Reads headers from a TS stream, and saves them into metadata It works by going through the entire TS ...
Definition: input_ts.cpp:231
FILE * inFile
The input file with ts data.
Definition: input_ts.h:36
virtual void serve()
The main loop for inputs in stream serving mode.
Definition: input.cpp:193
bool setup()
Setup of TS Input.
Definition: input_ts.cpp:188
std::string udpDataBuffer
Definition: input_ts.h:41
bool pushing
Definition: input_ts.h:39
void trackSelect(std::string trackSpec)
Track selector of TS Input.
Definition: input_ts.cpp:203