Fixed continuity counters for HLS
This commit is contained in:
parent
701b421d9c
commit
7bf5b4093b
2 changed files with 19 additions and 2 deletions
|
@ -50,7 +50,7 @@ namespace TS {
|
||||||
///the first 188 characters of a char array
|
///the first 188 characters of a char array
|
||||||
///\param Data The char array that contains the data to be read into the packet
|
///\param Data The char array that contains the data to be read into the packet
|
||||||
///\return true if successful (which always happens, or else a segmentation fault should occur)
|
///\return true if successful (which always happens, or else a segmentation fault should occur)
|
||||||
bool Packet::FromPointer(char * Data) {
|
bool Packet::FromPointer(const char * Data) {
|
||||||
strBuf = std::string(Data, 188);
|
strBuf = std::string(Data, 188);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace TS {
|
||||||
Packet();
|
Packet();
|
||||||
~Packet();
|
~Packet();
|
||||||
bool FromString(std::string & Data);
|
bool FromString(std::string & Data);
|
||||||
bool FromPointer(char * Data);
|
bool FromPointer(const char * Data);
|
||||||
bool FromFile(FILE * data);
|
bool FromFile(FILE * data);
|
||||||
void PID(int NewPID);
|
void PID(int NewPID);
|
||||||
unsigned int PID();
|
unsigned int PID();
|
||||||
|
@ -108,6 +108,22 @@ namespace TS {
|
||||||
std::string toPrettyString(size_t indent);
|
std::string toPrettyString(size_t indent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ProgramMappingEntry {
|
||||||
|
public:
|
||||||
|
ProgramMappingEntry(char * begin, char * end);
|
||||||
|
|
||||||
|
operator bool() const;
|
||||||
|
|
||||||
|
int streamType();
|
||||||
|
int elementaryPid();
|
||||||
|
int ESInfoLength();
|
||||||
|
char * ESInfo();
|
||||||
|
void advance();
|
||||||
|
private:
|
||||||
|
char* data;
|
||||||
|
char* boundary;
|
||||||
|
};
|
||||||
|
|
||||||
class ProgramMappingTable : public Packet {
|
class ProgramMappingTable : public Packet {
|
||||||
public:
|
public:
|
||||||
ProgramMappingTable();
|
ProgramMappingTable();
|
||||||
|
@ -133,6 +149,7 @@ namespace TS {
|
||||||
void setProgramInfoLength(short newVal);
|
void setProgramInfoLength(short newVal);
|
||||||
short getProgramCount();
|
short getProgramCount();
|
||||||
void setProgramCount(short newVal);
|
void setProgramCount(short newVal);
|
||||||
|
ProgramMappingEntry getEntry(int index);
|
||||||
char getStreamType(short index);
|
char getStreamType(short index);
|
||||||
void setStreamType(char newVal, short index);
|
void setStreamType(char newVal, short index);
|
||||||
short getElementaryPID(short index);
|
short getElementaryPID(short index);
|
||||||
|
|
Loading…
Add table
Reference in a new issue