Fixed continuity counters for HLS

This commit is contained in:
Erik Zandvliet 2014-11-14 14:53:16 +01:00
parent 701b421d9c
commit 7bf5b4093b
2 changed files with 19 additions and 2 deletions

View file

@ -50,7 +50,7 @@ namespace TS {
///the first 188 characters of a char array
///\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)
bool Packet::FromPointer(char * Data) {
bool Packet::FromPointer(const char * Data) {
strBuf = std::string(Data, 188);
return true;
}

View file

@ -34,7 +34,7 @@ namespace TS {
Packet();
~Packet();
bool FromString(std::string & Data);
bool FromPointer(char * Data);
bool FromPointer(const char * Data);
bool FromFile(FILE * data);
void PID(int NewPID);
unsigned int PID();
@ -108,6 +108,22 @@ namespace TS {
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 {
public:
ProgramMappingTable();
@ -133,6 +149,7 @@ namespace TS {
void setProgramInfoLength(short newVal);
short getProgramCount();
void setProgramCount(short newVal);
ProgramMappingEntry getEntry(int index);
char getStreamType(short index);
void setStreamType(char newVal, short index);
short getElementaryPID(short index);