Fixes in regard to 64-bit time stamps
This commit is contained in:
parent
cfb19317f3
commit
695b4fd0bd
3 changed files with 14 additions and 14 deletions
|
@ -367,10 +367,10 @@ namespace Mist {
|
||||||
/// Returns a string with the full XML DASH manifest MPD file.
|
/// Returns a string with the full XML DASH manifest MPD file.
|
||||||
std::string OutDashMP4::buildManifest(){
|
std::string OutDashMP4::buildManifest(){
|
||||||
initialize();
|
initialize();
|
||||||
int lastVidTime = 0;
|
uint64_t lastVidTime = 0;
|
||||||
int vidInitTrack = 0;
|
uint64_t vidInitTrack = 0;
|
||||||
int lastAudTime = 0;
|
uint64_t lastAudTime = 0;
|
||||||
int audInitTrack = 0;
|
uint64_t audInitTrack = 0;
|
||||||
/// \TODO DASH pretends there is only one audio/video track, and then prints them all using the same timing information. This is obviously wrong if the tracks are not in sync.
|
/// \TODO DASH pretends there is only one audio/video track, and then prints them all using the same timing information. This is obviously wrong if the tracks are not in sync.
|
||||||
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it ++){
|
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it ++){
|
||||||
if ((it->second.codec == "H264" || it->second.codec == "HEVC") && it->second.lastms > lastVidTime){
|
if ((it->second.codec == "H264" || it->second.codec == "HEVC") && it->second.lastms > lastVidTime){
|
||||||
|
|
|
@ -525,9 +525,9 @@ namespace Mist {
|
||||||
std::set <keyPart> trunOrder;
|
std::set <keyPart> trunOrder;
|
||||||
//set with trackID, relative data offset, time and size
|
//set with trackID, relative data offset, time and size
|
||||||
for (std::map<long unsigned int, fragSet>::iterator it = currentPartSet.begin(); it != currentPartSet.end(); it++) {
|
for (std::map<long unsigned int, fragSet>::iterator it = currentPartSet.begin(); it != currentPartSet.end(); it++) {
|
||||||
long unsigned int timeStamp = it->second.firstTime;
|
uint64_t timeStamp = it->second.firstTime;
|
||||||
DTSC::Track & thisTrack = myMeta.tracks[it->first];
|
DTSC::Track & thisTrack = myMeta.tracks[it->first];
|
||||||
for (long unsigned int i = it->second.firstPart; i <= it->second.lastPart; i++) {
|
for (uint32_t i = it->second.firstPart; i <= it->second.lastPart; i++) {
|
||||||
keyPart temp;
|
keyPart temp;
|
||||||
temp.trackID = it->first;
|
temp.trackID = it->first;
|
||||||
temp.size = thisTrack.parts[i].getSize();
|
temp.size = thisTrack.parts[i].getSize();
|
||||||
|
@ -786,13 +786,13 @@ namespace Mist {
|
||||||
///\todo See if we can use something more elegant than a member variable...
|
///\todo See if we can use something more elegant than a member variable...
|
||||||
void OutProgressiveMP4::buildFragment() {
|
void OutProgressiveMP4::buildFragment() {
|
||||||
DTSC::Key & currKey = myMeta.tracks[vidTrack].getKey(getKeyForTime(vidTrack, thisPacket.getTime()));
|
DTSC::Key & currKey = myMeta.tracks[vidTrack].getKey(getKeyForTime(vidTrack, thisPacket.getTime()));
|
||||||
long long int startms = thisPacket.getTime();
|
uint64_t startms = thisPacket.getTime();
|
||||||
if (!needsLookAhead){
|
if (!needsLookAhead){
|
||||||
needsLookAhead = 1000;
|
needsLookAhead = 1000;
|
||||||
currentPartSet.clear();
|
currentPartSet.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long long int endms = startms + needsLookAhead;
|
uint64_t endms = startms + needsLookAhead;
|
||||||
bool missingSome = true;
|
bool missingSome = true;
|
||||||
|
|
||||||
while (missingSome){
|
while (missingSome){
|
||||||
|
@ -814,8 +814,8 @@ namespace Mist {
|
||||||
}
|
}
|
||||||
thisRange.lastPart = thisRange.firstPart;
|
thisRange.lastPart = thisRange.firstPart;
|
||||||
thisRange.lastTime = thisRange.firstTime;
|
thisRange.lastTime = thisRange.firstTime;
|
||||||
unsigned int curMS = thisRange.firstTime;
|
uint64_t curMS = thisRange.firstTime;
|
||||||
unsigned int nextMS = thisRange.firstTime;
|
uint64_t nextMS = thisRange.firstTime;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
size_t maxParts = thisTrack.parts.size();
|
size_t maxParts = thisTrack.parts.size();
|
||||||
for (size_t i = thisRange.firstPart; i < maxParts; i++) {
|
for (size_t i = thisRange.firstPart; i < maxParts; i++) {
|
||||||
|
|
|
@ -30,10 +30,10 @@ namespace Mist {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fragSet{
|
struct fragSet{
|
||||||
long unsigned int firstPart;
|
uint32_t firstPart;
|
||||||
long unsigned int lastPart;
|
uint32_t lastPart;
|
||||||
long long unsigned int firstTime;
|
uint64_t firstTime;
|
||||||
long long unsigned int lastTime;
|
uint64_t lastTime;
|
||||||
};
|
};
|
||||||
class OutProgressiveMP4 : public HTTPOutput {
|
class OutProgressiveMP4 : public HTTPOutput {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Add table
Reference in a new issue