Started ogg support in lib
This commit is contained in:
parent
bec0c12ac6
commit
e3861f9fc6
3 changed files with 288 additions and 2 deletions
40
lib/ogg.h
Normal file
40
lib/ogg.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#include<string>
|
||||
#include<vector>
|
||||
#include<deque>
|
||||
|
||||
|
||||
namespace OGG{
|
||||
class Page{
|
||||
public:
|
||||
Page();
|
||||
bool read(std::string & newData);
|
||||
long unsigned int getMagicNumber();
|
||||
void setMagicNumber();
|
||||
char getVersion();
|
||||
void setVersion(char newVal = 0);
|
||||
char getHeaderType();
|
||||
void setHeaderType(char newVal);
|
||||
long long unsigned int getGranulePosition();
|
||||
void setGranulePosition(long long unsigned int newVal);
|
||||
long unsigned int getBitstreamSerialNumber();
|
||||
void setBitstreamSerialNumber(long unsigned int newVal);
|
||||
long unsigned int getPageSequenceNumber();
|
||||
void setPageSequenceNumber(long unsigned int newVal);
|
||||
long unsigned int getCRCChecksum();
|
||||
void setCRCChecksum(long unsigned int newVal);
|
||||
char getPageSegments();
|
||||
inline void setPageSegments(char newVal);
|
||||
char* getSegmentTable();
|
||||
std::deque<unsigned int> getSegmentTableDeque();
|
||||
bool setSegmentTable(std::vector<unsigned int> layout);
|
||||
void setSegmentTable(char* newVal, unsigned int length);
|
||||
char* getFullPayload();
|
||||
std::string toPrettyString();
|
||||
private:
|
||||
long unsigned int calcChecksum();
|
||||
char* data;
|
||||
unsigned int datasize;
|
||||
unsigned int dataSum;
|
||||
bool checkDataSize(unsigned int size);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue