Fixed DTSC Fix, working MP4 Progressive.

This commit is contained in:
Erik Zandvliet 2013-08-26 10:40:14 +02:00
parent 4c8662143f
commit 9ae992ff35
2 changed files with 3 additions and 6 deletions

View file

@ -114,7 +114,7 @@ namespace Connector_HTTP {
std::stringstream cmd;
cmd << "t "<< (*keyPartIt).trackID;
cmd << "\ns " << (*keyPartIt).time;
cmd << "\np "<< (*keyPartIt).time + (*keyPartIt).len<<"\n";
cmd << "\no\n";
ss.SendNow(cmd.str());
}
if ( !ss.connected()){
@ -173,7 +173,7 @@ namespace Connector_HTTP {
std::stringstream cmd;
cmd << "t "<< (*keyPartIt).trackID;
cmd << "\ns " << (*keyPartIt).time;
cmd << "\np " << (*keyPartIt).time + (*keyPartIt).len<<"\n";
cmd << "\no\n";
//std::cerr << cmd.str() << std::endl;
ss.SendNow(cmd.str());
}

View file

@ -10,7 +10,7 @@
namespace Converters {
class HeaderEntryDTSC {
public:
HeaderEntryDTSC() : totalSize(0), lastKeyTime(-5000), trackID(0), firstms(0x7FFFFFFF), lastms(0), keynum(0) {}
HeaderEntryDTSC() : totalSize(0), lastKeyTime(-5001), trackID(0), firstms(0x7FFFFFFF), lastms(0), keynum(0) {}
long long int totalSize;
std::vector<long long int> parts;
long long int lastKeyTime;
@ -154,9 +154,6 @@ namespace Converters {
meta["tracks"][currentID]["keys"][newNum]["num"] = ++trackData[currentID].keynum;
meta["tracks"][currentID]["keys"][newNum]["time"] = F.getJSON()["time"];
meta["tracks"][currentID]["keys"][newNum]["bpos"] = F.getLastReadPos();
if (newNum == 0){
trackData[currentID].firstms = F.getJSON()["time"].asInt();
}
if (meta["tracks"][currentID]["keys"].size() > 1){
meta["tracks"][currentID]["keys"][newNum - 1]["len"] = F.getJSON()["time"].asInt() - meta["tracks"][currentID]["keys"][newNum - 1]["time"].asInt();
meta["tracks"][currentID]["keys"][newNum - 1]["size"] = trackData[currentID].totalSize;