MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
theora.h
Go to the documentation of this file.
1 #pragma once
2 #include<sys/types.h>
3 #include<stdint.h>
4 #include<string>
5 
6 namespace theora {
7 
8  bool isHeader(const char * newData, unsigned int length);
9  class header {
10  public:
11  ~header();
12  header(char * newData, unsigned int length); // if managed is true, this class manages the data pointer
13  int getHeaderType();
14  char getVMAJ();
15  char getVMIN();
16  char getVREV();
17  short getFMBW();
18  short getFMBH();
19  long unsigned int getPICW();//movie width
20  long unsigned int getPICH();//movie height
21  char getPICX();
22  char getPICY();
23  long unsigned int getFRN();//frame rate numerator
24  long unsigned int getFRD();//frame rate denominator
25  long unsigned int getPARN();
26  long unsigned int getPARD();
27  char getCS();
28  long unsigned int getNOMBR();
29  char getQUAL();
30  char getPF();
31  char getKFGShift();
32  std::string getVendor();
33  long unsigned int getNComments();
34  std::string getUserComment(size_t index);
35  char getLFLIMS(size_t index);
36  std::string toPrettyString(size_t indent = 0); //update this, it should check (header) type and output relevant stuff only.
37  //long long unsigned int parseGranuleUpper(long long unsigned int granPos);
38  //long long unsigned int parseGranuleLower(long long unsigned int granPos);
40  unsigned int datasize;
41  bool isHeader();
42  char getFTYPE();//for frames
43  protected:
44  uint32_t getInt32(size_t index);
45  uint32_t getInt24(size_t index);
46  uint16_t getInt16(size_t index);
47  uint32_t commentLen(size_t index);
48  private:
49  char * data;
50  bool checkDataSize(unsigned int size);
51  };
52  /*
53  class frame{ // we don't need this. I hope.
54  public:
55  frame();
56  ~frame();
57  bool read(const char* newData, unsigned int length);
58  char getFTYPE();
59  char getNQIS();
60  char getQIS(size_t index);
61  std::string toPrettyString(size_t indent = 0);
62  private:
63  char * data;
64  unsigned int datasize;
65  bool checkDataSize(unsigned int size);
66  };*/
67 }
68 
char getVMIN()
Definition: theora.cpp:85
long unsigned int getPICH()
Definition: theora.cpp:141
header(char *newData, unsigned int length)
Definition: theora.cpp:52
bool isHeader()
Definition: theora.cpp:245
char getKFGShift()
Definition: theora.cpp:127
long unsigned int getFRD()
Definition: theora.cpp:155
long unsigned int getFRN()
Definition: theora.cpp:134
std::string toPrettyString(size_t indent=0)
Definition: theora.cpp:249
long unsigned int getNComments()
Definition: theora.cpp:211
char getVREV()
Definition: theora.cpp:92
bool checkDataSize(unsigned int size)
Definition: theora.cpp:9
char getVMAJ()
Definition: theora.cpp:78
char getLFLIMS(size_t index)
Definition: theora.cpp:219
uint32_t getInt24(size_t index)
Definition: theora.cpp:31
uint32_t commentLen(size_t index)
Definition: theora.cpp:45
uint16_t getInt16(size_t index)
Definition: theora.cpp:38
char * data
Definition: theora.h:49
long unsigned int getPARN()
Definition: theora.cpp:162
bool isHeader(const char *newData, unsigned int length)
Definition: theora.cpp:60
short getFMBH()
Definition: theora.cpp:106
uint32_t getInt32(size_t index)
Definition: theora.cpp:24
unsigned int datasize
Definition: theora.h:40
std::string getVendor()
Definition: theora.cpp:204
char getCS()
Definition: theora.cpp:176
char getQUAL()
Definition: theora.cpp:190
Definition: theora.h:9
long unsigned int getPICW()
Definition: theora.cpp:148
char getPICY()
Definition: theora.cpp:120
char getFTYPE()
Definition: theora.cpp:241
std::string getUserComment(size_t index)
Definition: theora.cpp:230
char getPICX()
Definition: theora.cpp:113
~header()
Definition: theora.cpp:57
int getHeaderType()
Definition: theora.cpp:74
char getPF()
Definition: theora.cpp:197
long unsigned int getPARD()
Definition: theora.cpp:169
short getFMBW()
Definition: theora.cpp:99
Definition: theora.cpp:8
long unsigned int getNOMBR()
Definition: theora.cpp:183