MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Data Structures | Enumerations | Functions | Variables
TS Namespace Reference

Holds all TS processing related code. More...

Data Structures

class  Packet
 Class for reading and writing TS Streams. More...
 
class  ProgramAssociationTable
 
class  ProgramMappingEntry
 
class  ProgramMappingTable
 
class  Stream
 

Enumerations

enum  codecType {
  H264 = 0x1B, AAC = 0x0F, AC3 = 0x81, MP3 = 0x03,
  HEVC = 0x06, H265 = 0x24, ID3 = 0x15, H264 = 0x1B,
  AAC = 0x0F, AC3 = 0x81, MP3 = 0x03, HEVC = 0x06,
  H265 = 0x24, ID3 = 0x15
}
 
enum  codecType {
  H264 = 0x1B, AAC = 0x0F, AC3 = 0x81, MP3 = 0x03,
  HEVC = 0x06, H265 = 0x24, ID3 = 0x15, H264 = 0x1B,
  AAC = 0x0F, AC3 = 0x81, MP3 = 0x03, HEVC = 0x06,
  H265 = 0x24, ID3 = 0x15
}
 

Functions

const char * createPMT (std::set< unsigned long > &selectedTracks, DTSC::Meta &myMeta, int contCounter)
 Construct a PMT (special 188B ts packet) from a set of selected tracks and metadata. More...
 
unsigned long long decodePTS (const char *data)
 
void encodePESTimestamp (std::string &tmpBuf, char fixedLead, unsigned long long time)
 Appends the PES-encoded timestamp to a string. More...
 
static std::string getAudioHeader (int FrameLen, std::string initData)
 Constructs an audio header to be used on each audio frame. More...
 
static std::string getAudioHeader (int FrameLen, std::string initData)
 Constructs an audio header to be used on each audio frame. More...
 

Variables

static char PAT [188]
 A standard Program Association Table, as generated by FFMPEG. More...
 
static char PAT [188]
 A standard Program Association Table, as generated by FFMPEG. More...
 

Detailed Description

Holds all TS processing related code.

Enumeration Type Documentation

Enumerator
H264 
AAC 
AC3 
MP3 
HEVC 
H265 
ID3 
H264 
AAC 
AC3 
MP3 
HEVC 
H265 
ID3 
Enumerator
H264 
AAC 
AC3 
MP3 
HEVC 
H265 
ID3 
H264 
AAC 
AC3 
MP3 
HEVC 
H265 
ID3 

Function Documentation

const char * TS::createPMT ( std::set< unsigned long > &  selectedTracks,
DTSC::Meta myMeta,
int  contCounter 
)

Construct a PMT (special 188B ts packet) from a set of selected tracks and metadata.

This function is not part of the packet class, but it is in the TS namespace. It uses an internal static TS packet for PMT storage.

Parameters
selectedTrackstracks to include in PMT creation
myMeta
Returns
character pointer to a static 188B TS packet
unsigned long long TS::decodePTS ( const char *  data)
void TS::encodePESTimestamp ( std::string &  tmpBuf,
char  fixedLead,
unsigned long long  time 
)

Appends the PES-encoded timestamp to a string.

Parameters
strBufThe string to append to
fixedLeadThe "fixed" 4-bit lead value to use
timeThe timestamp to encode
static std::string TS::getAudioHeader ( int  FrameLen,
std::string  initData 
)
inlinestatic

Constructs an audio header to be used on each audio frame.

The length of this header will ALWAYS be 7 bytes, and has to be prepended on each audio frame.

Parameters
FrameLenthe length of the current audio frame.
initDataA string containing the initalization data for this track's codec.
static std::string TS::getAudioHeader ( int  FrameLen,
std::string  initData 
)
inlinestatic

Constructs an audio header to be used on each audio frame.

The length of this header will ALWAYS be 7 bytes, and has to be prepended on each audio frame.

Parameters
FrameLenthe length of the current audio frame.
initDataA string containing the initalization data for this track's codec.

Variable Documentation

char TS::PAT[188]
static
Initial value:
= {0x47, 0x40, 0x00, 0x10, 0x00, 0x00, 0xB0, 0x0D, 0x00, 0x01, 0xC1, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x2A, 0xB1, 0x04,
0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
}

A standard Program Association Table, as generated by FFMPEG.

Seems to be independent of the stream.

char TS::PAT[188]
static
Initial value:
= {0x47, 0x40, 0x00, 0x10, 0x00, 0x00, 0xB0, 0x0D, 0x00, 0x01, 0xC1, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x2A, 0xB1, 0x04,
0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x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