Spurious bugfixes for live support.
This commit is contained in:
parent
62f1e25e8b
commit
de617db74a
4 changed files with 16 additions and 13 deletions
|
@ -197,8 +197,7 @@ namespace Buffer {
|
|||
usr->curr_down = (usr->tmpStats.down - usr->lastStats.down) / secs;
|
||||
usr->lastStats = usr->tmpStats;
|
||||
thisStream->saveStats(usr->sID, usr->tmpStats);
|
||||
//TODO: Re-enable this
|
||||
//thisStream->sendMeta(usr->S);
|
||||
thisStream->sendMeta(usr->S);
|
||||
break;
|
||||
}
|
||||
case 't': {
|
||||
|
|
|
@ -61,13 +61,17 @@ namespace Buffer {
|
|||
Storage["totals"]["now"] = now;
|
||||
Storage["buffer"] = name;
|
||||
|
||||
std::map<int,DTSC::Track>::iterator it;
|
||||
for (it = metadata.tracks.begin(); it != metadata.tracks.end(); ++it){
|
||||
std::cout << it->second.getIdentifier() << ": " << it->second.firstms << "-" << it->second.lastms << " (" << it->second.keys.size() << ")" << std::endl;
|
||||
}
|
||||
|
||||
Storage["meta"] = metadata.toJSON();
|
||||
|
||||
if (Storage["meta"].isMember("tracks")){
|
||||
for (JSON::ObjIter oIt = Storage["meta"]["tracks"].ObjBegin(); oIt != Storage["meta"]["tracks"].ObjEnd(); ++oIt){
|
||||
oIt->second.removeMember("fragments");
|
||||
oIt->second.removeMember("keys");
|
||||
oIt->second.removeMember("parts");
|
||||
oIt->second.removeMember("idheader");
|
||||
oIt->second.removeMember("commentheader");
|
||||
}
|
||||
}
|
||||
|
||||
ret = Storage.toString();
|
||||
Storage["log"].null();
|
||||
return ret;
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace Connector_HTTP {
|
|||
unsigned int now = Util::epoch();
|
||||
if (now != lastStats){
|
||||
lastStats = now;
|
||||
ss.SendNow(conn.getStats("HTTP_Progressive_FLV").c_str());
|
||||
ss.SendNow(conn.getStats("HTTP_Progressive_FLV"));
|
||||
}
|
||||
if (ss.spool()){
|
||||
while (Strm.parsePacket(ss.Received())){
|
||||
|
|
|
@ -209,6 +209,7 @@ namespace Connector_HTTP {
|
|||
ready4data = false;
|
||||
continue;
|
||||
}
|
||||
ready4data = true;
|
||||
ss.setBlocking(false);
|
||||
Strm.waitForMeta(ss);
|
||||
for (std::map<int,DTSC::Track>::iterator it = Strm.metadata.tracks.begin(); it != Strm.metadata.tracks.end(); it++){
|
||||
|
@ -286,7 +287,7 @@ namespace Connector_HTTP {
|
|||
|
||||
long long mstime = 0;
|
||||
long long mslen = 0;
|
||||
for (std::deque<DTSC::Key>::iterator it = myRef.keys.end(); it != myRef.keys.end(); it++){
|
||||
for (std::deque<DTSC::Key>::iterator it = myRef.keys.begin(); it != myRef.keys.end(); it++){
|
||||
if (it->getTime() >= (requestedTime / 10000)){
|
||||
mstime = it->getTime();
|
||||
mslen = it->getLength();
|
||||
|
@ -446,7 +447,6 @@ namespace Connector_HTTP {
|
|||
HTTP_S.SendResponse("200", "OK", conn);
|
||||
}
|
||||
}
|
||||
ready4data = true;
|
||||
//Clean for any possible next requests
|
||||
HTTP_R.Clean();
|
||||
}
|
||||
|
@ -461,9 +461,9 @@ namespace Connector_HTTP {
|
|||
if (now != lastStats){
|
||||
//Send new stats.
|
||||
lastStats = now;
|
||||
ss.SendNow(conn.getStats("HTTP_Smooth").c_str());
|
||||
ss.SendNow(conn.getStats("HTTP_Smooth"));
|
||||
}
|
||||
if (/*handlingRequest &&*/ ss.spool()){
|
||||
if (ss.spool()){
|
||||
while (Strm.parsePacket(ss.Received())){
|
||||
if (Strm.lastType() == DTSC::AUDIO || Strm.lastType() == DTSC::VIDEO){
|
||||
HTTP_S.Chunkify(Strm.lastData(), conn);
|
||||
|
|
Loading…
Add table
Reference in a new issue