Merge branch 'development' into LTS_development
This commit is contained in:
commit
3b92a56707
2 changed files with 22 additions and 24 deletions
|
@ -2141,8 +2141,8 @@ namespace MP4 {
|
||||||
initialize();
|
initialize();
|
||||||
setTrackID(trackId);
|
setTrackID(trackId);
|
||||||
setDuration(duration);
|
setDuration(duration);
|
||||||
setWidth(width << 16);
|
setWidth(width);
|
||||||
setHeight(height << 16);
|
setHeight(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
TKHD::TKHD(DTSC::Track & track, bool fragmented) {
|
TKHD::TKHD(DTSC::Track & track, bool fragmented) {
|
||||||
|
@ -2153,8 +2153,8 @@ namespace MP4 {
|
||||||
setDuration(track.lastms - track.firstms);
|
setDuration(track.lastms - track.firstms);
|
||||||
}
|
}
|
||||||
if (track.type == "video") {
|
if (track.type == "video") {
|
||||||
setWidth(track.width << 16);
|
setWidth(track.width);
|
||||||
setHeight(track.height << 16);
|
setHeight(track.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2309,35 +2309,35 @@ namespace MP4 {
|
||||||
return getInt32(offset + index * 4);
|
return getInt32(offset + index * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TKHD::setWidth(uint32_t newWidth) {
|
void TKHD::setWidth(double newWidth) {
|
||||||
if (getVersion() == 0) {
|
if (getVersion() == 0) {
|
||||||
setInt32(newWidth, 76);
|
setInt32(newWidth * 65536.0, 76);
|
||||||
} else {
|
} else {
|
||||||
setInt32(newWidth, 88);
|
setInt32(newWidth * 65536.0, 88);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t TKHD::getWidth() {
|
double TKHD::getWidth() {
|
||||||
if (getVersion() == 0) {
|
if (getVersion() == 0) {
|
||||||
return getInt32(76);
|
return getInt32(76) / 65536.0;
|
||||||
} else {
|
} else {
|
||||||
return getInt32(88);
|
return getInt32(88) / 65536.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TKHD::setHeight(uint32_t newHeight) {
|
void TKHD::setHeight(double newHeight) {
|
||||||
if (getVersion() == 0) {
|
if (getVersion() == 0) {
|
||||||
setInt32(newHeight, 80);
|
setInt32(newHeight * 65536.0, 80);
|
||||||
} else {
|
} else {
|
||||||
setInt32(newHeight, 92);
|
setInt32(newHeight * 65536.0, 92);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t TKHD::getHeight() {
|
double TKHD::getHeight() {
|
||||||
if (getVersion() == 0) {
|
if (getVersion() == 0) {
|
||||||
return getInt32(80);
|
return getInt32(80) / 65536.0;
|
||||||
} else {
|
} else {
|
||||||
return getInt32(92);
|
return getInt32(92) / 65536.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2360,8 +2360,8 @@ namespace MP4 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r << std::endl;
|
r << std::endl;
|
||||||
r << std::string(indent + 1, ' ') << "Width: " << (getWidth() >> 16) << "." << (getWidth() & 0xFFFF) << std::endl;
|
r << std::string(indent + 1, ' ') << "Width: " << getWidth() << std::endl;
|
||||||
r << std::string(indent + 1, ' ') << "Height: " << (getHeight() >> 16) << "." << (getHeight() & 0xFFFF) << std::endl;
|
r << std::string(indent + 1, ' ') << "Height: " << getHeight() << std::endl;
|
||||||
return r.str();
|
return r.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2953,8 +2953,6 @@ namespace MP4 {
|
||||||
setCLAP(hvccBox);
|
setCLAP(hvccBox);
|
||||||
}
|
}
|
||||||
/*LTS-END*/
|
/*LTS-END*/
|
||||||
MP4::PASP paspBox;
|
|
||||||
setPASP(paspBox);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualSampleEntry::initialize(){
|
void VisualSampleEntry::initialize(){
|
||||||
|
|
|
@ -494,10 +494,10 @@ namespace MP4 {
|
||||||
void setMatrix(int32_t newMatrix, size_t index);
|
void setMatrix(int32_t newMatrix, size_t index);
|
||||||
int32_t getMatrix(size_t index);
|
int32_t getMatrix(size_t index);
|
||||||
|
|
||||||
void setWidth(uint32_t newWidth);
|
void setWidth(double newWidth);
|
||||||
uint32_t getWidth();
|
double getWidth();
|
||||||
void setHeight(uint32_t newHeight);
|
void setHeight(double newHeight);
|
||||||
uint32_t getHeight();
|
double getHeight();
|
||||||
std::string toPrettyString(uint32_t indent = 0);
|
std::string toPrettyString(uint32_t indent = 0);
|
||||||
protected:
|
protected:
|
||||||
void initialize();
|
void initialize();
|
||||||
|
|
Loading…
Add table
Reference in a new issue