H265 library improvements
This commit is contained in:
parent
5126928d0d
commit
5dce70e933
5 changed files with 543 additions and 4 deletions
19
lib/h265.h
19
lib/h265.h
|
@ -9,15 +9,31 @@
|
|||
|
||||
namespace h265 {
|
||||
std::deque<nalu::nalData> analysePackets(const char * data, unsigned long len);
|
||||
|
||||
const char * typeToStr(uint8_t type);
|
||||
bool isKeyframe(const char * data, uint32_t len);
|
||||
|
||||
void updateProfileTierLevel(Utils::bitstream & bs, MP4::HVCC & hvccBox, unsigned long maxSubLayersMinus1);
|
||||
std::string printProfileTierLevel(Utils::bitstream & bs, unsigned long maxSubLayersMinus1, size_t indent);
|
||||
|
||||
struct metaInfo {
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
double fps;
|
||||
};
|
||||
|
||||
class initData {
|
||||
public:
|
||||
initData();
|
||||
initData(const std::string & hvccData);
|
||||
void addUnit(char * data);
|
||||
void addUnit(const std::string & data);
|
||||
bool haveRequired();
|
||||
std::string generateHVCC();
|
||||
metaInfo getMeta();
|
||||
const std::set<std::string> & getVPS() const;
|
||||
const std::set<std::string> & getSPS() const;
|
||||
const std::set<std::string> & getPPS() const;
|
||||
protected:
|
||||
std::map<unsigned int, std::set<std::string> > nalUnits;
|
||||
};
|
||||
|
@ -26,6 +42,7 @@ namespace h265 {
|
|||
public:
|
||||
vpsUnit(const std::string & _data);
|
||||
void updateHVCC(MP4::HVCC & hvccBox);
|
||||
std::string toPrettyString(size_t indent);
|
||||
private:
|
||||
std::string data;
|
||||
};
|
||||
|
@ -34,6 +51,8 @@ namespace h265 {
|
|||
public:
|
||||
spsUnit(const std::string & _data);
|
||||
void updateHVCC(MP4::HVCC & hvccBox);
|
||||
std::string toPrettyString(size_t indent = 0);
|
||||
void getMeta(metaInfo & res);
|
||||
private:
|
||||
std::string data;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue