Tweaked output log message verbosity

This commit is contained in:
Thulinma 2016-05-24 11:07:01 +02:00
parent 69eea675eb
commit aac1fcc351
2 changed files with 18 additions and 13 deletions

View file

@ -462,8 +462,7 @@ namespace Mist {
currKeyOpen.erase(trackId); currKeyOpen.erase(trackId);
return; return;
} }
DEBUG_MSG(DLVL_VERYHIGH, "Loading track %lu, containing key %lld", trackId, keyNum); VERYHIGH_MSG("Loading track %lu, containing key %lld", trackId, keyNum);
INFO_MSG("Loading track %lu, containing key %lld", trackId, keyNum);
unsigned int timeout = 0; unsigned int timeout = 0;
unsigned long pageNum = pageNumForKey(trackId, keyNum); unsigned long pageNum = pageNumForKey(trackId, keyNum);
while (pageNum == -1){ while (pageNum == -1){
@ -477,7 +476,7 @@ namespace Mist {
reconnect(); reconnect();
} }
if (timeout > 100){ if (timeout > 100){
DEBUG_MSG(DLVL_FAIL, "Timeout while waiting for requested page %lld for track %lu. Aborting.", keyNum, trackId); FAIL_MSG("Timeout while waiting for requested page %lld for track %lu. Aborting.", keyNum, trackId);
nProxy.curPage.erase(trackId); nProxy.curPage.erase(trackId);
currKeyOpen.erase(trackId); currKeyOpen.erase(trackId);
return; return;
@ -511,7 +510,7 @@ namespace Mist {
return; return;
} }
currKeyOpen[trackId] = pageNum; currKeyOpen[trackId] = pageNum;
INFO_MSG("page %s loaded", id); VERYHIGH_MSG("Page %s loaded for %s", id, streamName.c_str());
} }
/// Prepares all tracks from selectedTracks for seeking to the specified ms position. /// Prepares all tracks from selectedTracks for seeking to the specified ms position.
@ -526,7 +525,7 @@ namespace Mist {
if (myMeta.live){ if (myMeta.live){
updateMeta(); updateMeta();
} }
DEBUG_MSG(DLVL_MEDIUM, "Seeking to %llums", pos); MEDIUM_MSG("Seeking to %llums", pos);
for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){ for (std::set<long unsigned int>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
seek(*it, pos); seek(*it, pos);
} }
@ -534,7 +533,7 @@ namespace Mist {
bool Output::seek(unsigned int tid, unsigned long long pos, bool getNextKey){ bool Output::seek(unsigned int tid, unsigned long long pos, bool getNextKey){
if (myMeta.tracks[tid].lastms < pos){ if (myMeta.tracks[tid].lastms < pos){
INFO_MSG("Aborting seek to %llums in track %u: past end of track.", pos, tid); INFO_MSG("Aborting seek to %llums in track %u: past end of track (= %llums).", pos, tid, myMeta.tracks[tid].lastms);
return false; return false;
} }
unsigned int keyNum = getKeyForTime(tid, pos); unsigned int keyNum = getKeyForTime(tid, pos);
@ -561,8 +560,8 @@ namespace Mist {
tmpPack.reInit(mpd + tmp.offset, 0, true); tmpPack.reInit(mpd + tmp.offset, 0, true);
tmp.time = tmpPack.getTime(); tmp.time = tmpPack.getTime();
} }
INFO_MSG("Found time %d", tmp.time);
if (tmpPack){ if (tmpPack){
HIGH_MSG("Sought to time %d in %s@%u", tmp.time, streamName.c_str(), tid);
buffer.insert(tmp); buffer.insert(tmp);
return true; return true;
}else{ }else{
@ -1059,7 +1058,13 @@ namespace Mist {
thisPacket.reInit(nProxy.curPage[nxt.tid].mapped + nxt.offset, 0, true); thisPacket.reInit(nProxy.curPage[nxt.tid].mapped + nxt.offset, 0, true);
if (thisPacket){ if (thisPacket){
if (thisPacket.getTime() != nxt.time && nxt.time){ if (thisPacket.getTime() != nxt.time && nxt.time){
WARN_MSG("Loaded track %ld@%llu instead of %ld@%llu", thisPacket.getTrackId(), thisPacket.getTime(), nxt.tid, nxt.time); static bool warned = false;
if (!warned){
WARN_MSG("Loaded track %ld@%llu instead of %ld@%llu for %s - further warnings at HIGH level", thisPacket.getTrackId(), thisPacket.getTime(), nxt.tid, nxt.time, streamName.c_str());
warned = true;
}else{
HIGH_MSG("Loaded track %ld@%llu instead of %ld@%llu for %s", thisPacket.getTrackId(), thisPacket.getTime(), nxt.tid, nxt.time, streamName.c_str());
}
} }
bool isVideoTrack = (myMeta.tracks[nxt.tid].type == "video"); bool isVideoTrack = (myMeta.tracks[nxt.tid].type == "video");
if ((isVideoTrack && thisPacket.getFlag("keyframe")) || (!isVideoTrack && (++nonVideoCount % 30 == 0))){ if ((isVideoTrack && thisPacket.getFlag("keyframe")) || (!isVideoTrack && (++nonVideoCount % 30 == 0))){

View file

@ -70,7 +70,7 @@ namespace Mist {
RTMPStream::rec_cnt += 3073; RTMPStream::rec_cnt += 3073;
RTMPStream::snd_cnt += 3073; RTMPStream::snd_cnt += 3073;
setBlocking(false); setBlocking(false);
INFO_MSG("Push out handshake completed"); VERYHIGH_MSG("Push out handshake completed");
{ {
AMF::Object amfReply("container", AMF::AMF0_DDV_CONTAINER); AMF::Object amfReply("container", AMF::AMF0_DDV_CONTAINER);
@ -117,7 +117,7 @@ namespace Mist {
amfReply.addContent(AMF::Object("", "live")); //stream name amfReply.addContent(AMF::Object("", "live")); //stream name
sendCommand(amfReply, 20, 1); sendCommand(amfReply, 20, 1);
} }
INFO_MSG("Publish starting"); HIGH_MSG("Publish starting");
parseData = true; parseData = true;
}else{ }else{
setBlocking(true); setBlocking(true);
@ -137,9 +137,9 @@ namespace Mist {
} }
conn.Received().remove(1536); conn.Received().remove(1536);
RTMPStream::rec_cnt += 1536; RTMPStream::rec_cnt += 1536;
HIGH_MSG("Handshake success!"); HIGH_MSG("Handshake success");
} else { } else {
MEDIUM_MSG("Handshake fail!"); MEDIUM_MSG("Handshake fail (this is not a problem, usually)");
} }
setBlocking(false); setBlocking(false);
} }