Fixed all ARM-related issues/warnings/etc

This commit is contained in:
Thulinma 2021-05-21 17:54:24 +02:00
parent dae32ede11
commit 6733bf2a20
44 changed files with 123 additions and 120 deletions

View file

@ -39,7 +39,7 @@ bool AnalyserH264::parsePacket(){
FAIL_MSG("Could not read a NAL unit at position %" PRIu64, prePos);
return false;
}
HIGH_MSG("Read a %lu-byte NAL unit at position %" PRIu64, size, prePos);
HIGH_MSG("Read a %zu-byte NAL unit at position %" PRIu64, size, prePos);
if (detail >= 2){nalPtr->toPrettyString(std::cout);}
//SPS unit? Find the FPS, if any.
if (nalPtr->getType() == 7){

View file

@ -105,7 +105,7 @@ bool AnalyserHLS::parsePacket(){
if (!DL.get(part.uri)){return false;}
if (DL.getHeader("Content-Length") != ""){
if (DL.data().size() != atoi(DL.getHeader("Content-Length").c_str())){
FAIL_MSG("Expected %s bytes of data, but only received %lu.",
FAIL_MSG("Expected %s bytes of data, but only received %zu.",
DL.getHeader("Content-Length").c_str(), DL.data().size());
return false;
}

View file

@ -28,10 +28,10 @@ bool AnalyserOGG::parsePacket(){
sn2Codec[oggPage.getBitstreamSerialNumber()] = "Opus";
}
if (sn2Codec[oggPage.getBitstreamSerialNumber()] != ""){
INFO_MSG("Bitstream %" PRIu64 " recognized as %s", oggPage.getBitstreamSerialNumber(),
INFO_MSG("Bitstream %" PRIu32 " recognized as %s", oggPage.getBitstreamSerialNumber(),
sn2Codec[oggPage.getBitstreamSerialNumber()].c_str());
}else{
WARN_MSG("Bitstream %" PRIu64 " not recognized!", oggPage.getBitstreamSerialNumber());
WARN_MSG("Bitstream %" PRIu32 " not recognized!", oggPage.getBitstreamSerialNumber());
}
}

View file

@ -67,17 +67,17 @@ bool AnalyserRTMP::parsePacket(){
}
// We now know for sure that we've parsed a packet
DETAIL_HI("Chunk info: [%#2X] CS ID %u, timestamp %u, len %u, type ID %u, Stream ID %u",
DETAIL_HI("Chunk info: [%#2X] CS ID %u, timestamp %" PRIu64 ", len %u, type ID %u, Stream ID %u",
next.headertype, next.cs_id, next.timestamp, next.len, next.msg_type_id, next.msg_stream_id);
switch (next.msg_type_id){
case 0: // does not exist
DETAIL_LOW("Error chunk @ %lu - CS%i, T%i, L%i, LL%i, MID%i", read_in - strbuf.size(),
DETAIL_LOW("Error chunk @ %zu - CS%u, T%" PRIu64 ", L%i, LL%i, MID%i", read_in - strbuf.size(),
next.cs_id, next.timestamp, next.real_len, next.len_left, next.msg_stream_id);
return 0;
break; // happens when connection breaks unexpectedly
case 1: // set chunk size
RTMPStream::chunk_rec_max = ntohl(*(int *)next.data.c_str());
DETAIL_MED("CTRL: Set chunk size: %" PRIu64, RTMPStream::chunk_rec_max);
DETAIL_MED("CTRL: Set chunk size: %zu", RTMPStream::chunk_rec_max);
break;
case 2: // abort message - we ignore this one
DETAIL_MED("CTRL: Abort message: %" PRIu32, Bit::btohl(next.data.data()));
@ -85,7 +85,7 @@ bool AnalyserRTMP::parsePacket(){
break;
case 3: // ack
RTMPStream::snd_window_at = Bit::btohl(next.data.data());
DETAIL_MED("CTRL: Acknowledgement: %" PRIu64, RTMPStream::snd_window_at);
DETAIL_MED("CTRL: Acknowledgement: %zu", RTMPStream::snd_window_at);
break;
case 4:{
int16_t ucmtype = Bit::btohs(next.data.data());
@ -124,12 +124,12 @@ bool AnalyserRTMP::parsePacket(){
case 5: // window size of other end
RTMPStream::rec_window_size = Bit::btohl(next.data.data());
RTMPStream::rec_window_at = RTMPStream::rec_cnt;
DETAIL_MED("CTRL: Window size: %" PRIu64, RTMPStream::rec_window_size);
DETAIL_MED("CTRL: Window size: %zu", RTMPStream::rec_window_size);
break;
case 6:
RTMPStream::snd_window_size = Bit::btohl(next.data.data());
// 4 bytes window size, 1 byte limit type (ignored)
DETAIL_MED("CTRL: Set peer bandwidth: %" PRIu64, RTMPStream::snd_window_size);
DETAIL_MED("CTRL: Set peer bandwidth: %zu", RTMPStream::snd_window_size);
break;
case 8:
case 9:

View file

@ -670,7 +670,7 @@ void Controller::statSession::update(uint64_t index, Comms::Statistics &statComm
uint64_t currPktLost = getPktLost();
uint64_t currPktRetrans = getPktRetransmit();
if (currUp - prevUp < 0 || currDown - prevDown < 0){
INFO_MSG("Negative data usage! %lldu/%lldd (u%lld->%lld) in %s over %s, #%lu", currUp - prevUp,
INFO_MSG("Negative data usage! %lldu/%lldd (u%lld->%lld) in %s over %s, #%" PRIu64, currUp - prevUp,
currDown - prevDown, prevUp, currUp, myStream.c_str(), myConnector.c_str(), index);
}else{
if (!noBWCount){

View file

@ -529,7 +529,7 @@ namespace Mist{
if (M && M.getVod()){
meta.removeEmptyTracks();
parseHeader();
INFO_MSG("Header parsed, %lu tracks", M.getValidTracks().size());
INFO_MSG("Header parsed, %zu tracks", M.getValidTracks().size());
}
if (!streamName.size()){
@ -1121,7 +1121,7 @@ namespace Mist{
WARN_MSG("No pages for track %zu found", *it);
continue;
}
MEDIUM_MSG("Track %zu (%s) split into %zu pages", *it, M.getCodec(*it).c_str(), tPages.getEndPos());
MEDIUM_MSG("Track %zu (%s) split into %" PRIu64 " pages", *it, M.getCodec(*it).c_str(), tPages.getEndPos());
for (size_t j = tPages.getDeleted(); j < tPages.getEndPos(); j++){
size_t pageNumber = tPages.getInt("firstkey", j);
size_t pageKeys = tPages.getInt("keycount", j);

View file

@ -499,7 +499,7 @@ namespace Mist{
std::set<size_t> validTracks = M.getValidTracks();
if (validTracks != prevValidTracks){
MEDIUM_MSG("Valid tracks count changed from %lu to %lu", prevValidTracks.size(), validTracks.size());
MEDIUM_MSG("Valid tracks count changed from %zu to %zu", prevValidTracks.size(), validTracks.size());
prevValidTracks = validTracks;
if (Triggers::shouldTrigger("LIVE_TRACK_LIST")){
JSON::Value triggerPayload;
@ -566,7 +566,7 @@ namespace Mist{
if (tmpNum < meta.biggestFragment() / 2){tmpNum = meta.biggestFragment() / 2;}
segmentSize = meta.getMinimumFragmentDuration();
if (segmentSize != tmpNum){
INFO_MSG("Setting segmentSize from %" PRIu64 " to new value of %" PRIu64, segmentSize, tmpNum);
INFO_MSG("Setting segmentSize from %zu to new value of %" PRIu64, segmentSize, tmpNum);
segmentSize = tmpNum;
meta.setMinimumFragmentDuration(segmentSize);
}

View file

@ -809,7 +809,7 @@ namespace Mist{
tsStream.getEarliestPacket(thisPacket);
tid = getOriginalTrackId(currentPlaylist, thisPacket.getTrackId());
if (!tid){
INFO_MSG("Track %" PRIu64 " on PLS %" PRIu64 " -> %" PRIu32, thisPacket.getTrackId(), currentPlaylist, tid);
INFO_MSG("Track %zu on PLS %" PRIu64 " -> %" PRIu32, thisPacket.getTrackId(), currentPlaylist, tid);
continue;
}
}else{
@ -1243,7 +1243,7 @@ namespace Mist{
pListIt != listEntries.end(); pListIt++){
segCount += pListIt->second.size();
if (pListIt->second.size()){
INSANE_MSG("Playlist %u contains %lu segments, with the earliest segment starting @%zu ms", pListIt->first, pListIt->second.size(), firstTimeStamp);
INSANE_MSG("Playlist %u contains %zu segments, with the earliest segment starting @%" PRIu64 " ms", pListIt->first, pListIt->second.size(), firstTimeStamp);
if (pListIt->second.front().timestamp < firstTimeStamp || tmpId < 0){
firstTimeStamp = pListIt->second.front().timestamp;
tmpId = pListIt->first;

View file

@ -63,7 +63,7 @@ namespace Mist{
size_t id3size = (((int)header[6] & 0x7F) << 21) | (((int)header[7] & 0x7F) << 14) |
(((int)header[8] & 0x7F) << 7) |
((header[9] & 0x7F) + 10 + ((header[5] & 0x10) ? 10 : 0));
INFO_MSG("id3 size: %lu bytes", id3size);
INFO_MSG("id3 size: %zu bytes", id3size);
fseek(inFile, id3size, SEEK_SET);
}else{
fseek(inFile, 0, SEEK_SET);

View file

@ -484,7 +484,7 @@ namespace Mist{
malSize = curPart.size;
}
if (fread(data, curPart.size, 1, inFile) != 1){
FAIL_MSG("read unsuccessful at %" PRIu64, ftell(inFile));
FAIL_MSG("read unsuccessful at %ld", ftell(inFile));
thisPacket.null();
return;
}

View file

@ -430,7 +430,7 @@ namespace Mist{
}
tmpPos.segmentNo = backChrs - (loc - buffer);
tmpPos.bytepos -= tmpPos.segmentNo;
INFO_MSG("Track %zu, segment %zu found at bytepos %" PRIu64, it->first, tmpPos.segmentNo,
INFO_MSG("Track %zu, segment %" PRIu64 " found at bytepos %" PRIu64, it->first, tmpPos.segmentNo,
tmpPos.bytepos);
currentPositions.insert(tmpPos);

View file

@ -157,7 +157,7 @@ namespace Mist{
}
if (sdpState.tracks.size()){
bool atLeastOne = false;
for (std::map<size_t, SDP::Track>::iterator it = sdpState.tracks.begin();
for (std::map<uint64_t, SDP::Track>::iterator it = sdpState.tracks.begin();
it != sdpState.tracks.end(); ++it){
transportSet = false;
extraHeaders.clear();
@ -358,7 +358,7 @@ namespace Mist{
bool InputRTSP::handleUDP(){
if (TCPmode){return false;}
bool r = false;
for (std::map<size_t, SDP::Track>::iterator it = sdpState.tracks.begin();
for (std::map<uint64_t, SDP::Track>::iterator it = sdpState.tracks.begin();
it != sdpState.tracks.end(); ++it){
Socket::UDPConnection &s = it->second.data;
it->second.sorter.setCallback(it->first, insertRTP);

View file

@ -587,7 +587,7 @@ namespace Mist{
for (std::set<size_t>::iterator it = activeTracks.begin(); it != activeTracks.end(); it++){
if (!liveStream.isDataTrack(*it)){continue;}
if (threadTimer.count(*it) && ((Util::bootSecs() - threadTimer[*it]) > (2 * THREAD_TIMEOUT))){
WARN_MSG("Thread for track %" PRIu64 " timed out %" PRIu64
WARN_MSG("Thread for track %zu timed out %" PRIu64
" seconds ago without a clean shutdown.",
*it, Util::bootSecs() - threadTimer[*it]);
threadTimer.erase(*it);

View file

@ -220,7 +220,7 @@ namespace Mist{
uint64_t pageSize = tPages.getInt("size", pageIdx);
// Do nothing when there is not enough free space on the page to add the packet.
if (pageSize - pageOffset < packDataLen){
FAIL_MSG("Track %" PRIu32 "p%" PRIu32 " : Pack %" PRIu64 "ms of %" PRIu64 "b exceeds size %" PRIu64 " @ bpos %" PRIu64,
FAIL_MSG("Track %" PRIu32 "p%" PRIu32 " : Pack %" PRIu64 "ms of %zub exceeds size %" PRIu64 " @ bpos %" PRIu64,
packTrack, currPagNum, packTime, packDataLen, pageSize, pageOffset);
return;
}
@ -386,7 +386,7 @@ namespace Mist{
}
// Create the book keeping data for the new page
nextPageNum = tPages.getInt("firstkey", endPage - 1) + tPages.getInt("keycount", endPage - 1);
HIGH_MSG("Live page transition from %" PRIu32 ":%zu to %" PRIu32 ":%" PRIu32, packTrack,
HIGH_MSG("Live page transition from %" PRIu32 ":%" PRIu64 " to %" PRIu32 ":%" PRIu32, packTrack,
tPages.getInt("firstkey", endPage - 1), packTrack, nextPageNum);
tPages.setInt("firstkey", nextPageNum, endPage);
tPages.setInt("firsttime", packTime, endPage);

View file

@ -857,7 +857,7 @@ namespace Mist{
}
if (mainTrack == ti->first){continue;}// skip self
if (!M.trackValid(ti->first)){
HIGH_MSG("Skipping track %lu, not in tracks", ti->first);
HIGH_MSG("Skipping track %zu, not in tracks", ti->first);
continue;
}// ignore missing tracks
if (M.getLastms(ti->first) < seekPos + needsLookAhead + extraKeepAway + M.getMinKeepAway(ti->first)){
@ -865,7 +865,7 @@ namespace Mist{
break;
}
if (meta.getLastms(ti->first) == M.getFirstms(ti->first)){
HIGH_MSG("Skipping track %lu, last equals first", ti->first);
HIGH_MSG("Skipping track %zu, last equals first", ti->first);
continue;
}// ignore point-tracks
if (meta.getLastms(ti->first) < seekPos){
@ -881,7 +881,7 @@ namespace Mist{
/*LTS-START*/
if (isRecordingToFile){
if (M.getLive()){
MEDIUM_MSG("Stream currently contains data from %lu ms to %lu ms", startTime(), endTime());
MEDIUM_MSG("Stream currently contains data from %" PRIu64 " ms to %" PRIu64 " ms", startTime(), endTime());
}
// Overwrite recstart/recstop with recstartunix/recstopunix if set
if (M.getLive() &&
@ -952,7 +952,7 @@ namespace Mist{
INFO_MSG("Recording will start at timestamp %llu ms", atoll(targetParams["recstart"].c_str()));
}
else{
INFO_MSG("Recording will start at timestamp %lu ms", endTime());
INFO_MSG("Recording will start at timestamp %" PRIu64 " ms", endTime());
}
if (targetParams.count("recstop")){
INFO_MSG("Recording will stop at timestamp %llu ms", atoll(targetParams["recstop"].c_str()));
@ -988,12 +988,12 @@ namespace Mist{
int64_t origStartUnix = startUnix;
startUnix += Util::epoch();
if (startUnix < unixStreamBegin){
INFO_MSG("Waiting for stream to reach playback starting point. Current last ms is '%lu'", streamAvail);
INFO_MSG("Waiting for stream to reach playback starting point. Current last ms is '%" PRIu64 "'", streamAvail);
while (startUnix < Util::epoch() - (endTime() / 1000) && keepGoing()){
Util::wait(1000);
stats();
startUnix = origStartUnix + Util::epoch();
HIGH_MSG("Waiting for stream to reach playback starting point. Current last ms is '%lu'", streamAvail);
HIGH_MSG("Waiting for stream to reach playback starting point. Current last ms is '%" PRIu64 "'", streamAvail);
}
}
}
@ -1034,11 +1034,11 @@ namespace Mist{
}
int64_t streamAvail = M.getLastms(mainTrack);
int64_t lastUpdated = Util::getMS();
INFO_MSG("Waiting for stream to reach playback starting point. Current last ms is '%lu'", streamAvail);
INFO_MSG("Waiting for stream to reach playback starting point. Current last ms is '%" PRIu64 "'", streamAvail);
while (Util::getMS() - lastUpdated < 5000 && startRec > streamAvail && keepGoing()){
Util::sleep(500);
if (M.getLastms(mainTrack) > streamAvail){
HIGH_MSG("Waiting for stream to reach playback starting point. Current last ms is '%lu'", streamAvail);
HIGH_MSG("Waiting for stream to reach playback starting point. Current last ms is '%" PRIu64 "'", streamAvail);
stats();
streamAvail = M.getLastms(mainTrack);
lastUpdated = Util::getMS();
@ -1064,7 +1064,7 @@ namespace Mist{
MEDIUM_MSG("Initial seek to %" PRIu64 "ms", seekPos);
seek(seekPos);
}else{
ERROR_MSG("Aborting seek to %" PRIu64 " since stream only has available from %lu ms to %lu ms", seekPos, startTime(), endTime());
ERROR_MSG("Aborting seek to %" PRIu64 " since stream only has available from %" PRIu64 " ms to %" PRIu64 " ms", seekPos, startTime(), endTime());
}
}
@ -1116,7 +1116,7 @@ namespace Mist{
}
}
if (realTime != newSpeed){
HIGH_MSG("Changing playback speed from %" PRIu64 " to %" PRIu64 "(%" PRIu64 " ms LA, %" PRIu64 " ms mKA, %lu eKA)", realTime, newSpeed, needsLookAhead, mKa, extraKeepAway);
HIGH_MSG("Changing playback speed from %" PRIu64 " to %" PRIu64 "(%" PRIu64 " ms LA, %" PRIu64 " ms mKA, %" PRIu64 " eKA)", realTime, newSpeed, needsLookAhead, mKa, extraKeepAway);
firstTime = Util::bootMS() - (cTime * newSpeed / 1000);
realTime = newSpeed;
}
@ -1144,15 +1144,15 @@ namespace Mist{
}
if (mainTrack == ti->first){continue;}// skip self
if (meta.getLastms(ti->first) == meta.getFirstms(ti->first)){
HIGH_MSG("Skipping track %lu, last equals first", ti->first);
HIGH_MSG("Skipping track %zu, last equals first", ti->first);
continue;
}// ignore point-tracks
HIGH_MSG("Track %lu is good", ti->first);
HIGH_MSG("Track %zu is good", ti->first);
}
// if yes, seek here
if (good){
HIGH_MSG("Skipping forward %" PRIu64 "ms (%" PRIu64 " ms LA, %" PRIu64
" ms mKA, %lu eKA, > %" PRIu32 "ms, mSa %" PRIu64 " ms)",
" ms mKA, %" PRIu64 " eKA, > %" PRIu32 "ms, mSa %" PRIu64 " ms)",
seekPos - cTime, needsLookAhead, mKa, extraKeepAway, seekCount * 100, maxSkipAhead);
if (seekCount < 20){++seekCount;}
seek(seekPos);
@ -1316,7 +1316,7 @@ namespace Mist{
// delay the stream until metadata has caught up, if needed
if (needsLookAhead && M.getLive()){
// we sleep in 20ms increments, or less if the lookahead time itself is less
uint32_t sleepTime = std::min(20ul, needsLookAhead);
uint32_t sleepTime = std::min((uint64_t)20, needsLookAhead);
// wait at most double the look ahead time, plus ten seconds
uint64_t timeoutTries = (needsLookAhead / sleepTime) * 2 + (10000 / sleepTime);
uint64_t needsTime = thisTime + needsLookAhead;
@ -1346,7 +1346,7 @@ namespace Mist{
meta.reloadReplacedPagesIfNeeded();
}
if (!timeoutTries){
WARN_MSG("Waiting for lookahead (%zums in %zu tracks) timed out - resetting lookahead!", needsLookAhead, userSelect.size());
WARN_MSG("Waiting for lookahead (%" PRIu64 "ms in %zu tracks) timed out - resetting lookahead!", needsLookAhead, userSelect.size());
needsLookAhead = 0;
}
}
@ -1452,8 +1452,8 @@ namespace Mist{
// depending on whether this is probably bad and the current debug level, print a message
size_t printLevel = (probablyBad ? DLVL_WARN : DLVL_INFO);
const Comms::Users &usr = userSelect.at(trackId);
DEBUG_MSG(printLevel, "Dropping %s (%s) track %zu@k%zu (nextP=%zu, lastP=%zu): %s",
streamName.c_str(), meta.getCodec(trackId).c_str(), trackId, usr.getKeyNum() + 1,
DEBUG_MSG(printLevel, "Dropping %s track %zu@k%zu (nextP=%" PRIu64 ", lastP=%" PRIu64 "): %s",
meta.getCodec(trackId).c_str(), trackId, usr.getKeyNum() + 1,
pageNumForKey(trackId, usr.getKeyNum() + 1), pageNumMax(trackId), reason.c_str());
// now actually drop the track from the buffer
buffer.dropTrack(trackId);
@ -1651,7 +1651,7 @@ namespace Mist{
}
//every ~16 seconds, reconnect to metadata
if (emptyCount % 1600 == 0){
INFO_MSG("Reconnecting to input; track %" PRIu64 " key %" PRIu32 " is on page %" PRIu32 " and we're currently serving %" PRIu32 " from %" PRIu32, nxt.tid, thisKey+1, nextKeyPage, thisKey, currentPage[nxt.tid]);
INFO_MSG("Reconnecting to input; track %zu key %" PRIu32 " is on page %" PRIu32 " and we're currently serving %" PRIu32 " from %" PRIu32, nxt.tid, thisKey+1, nextKeyPage, thisKey, currentPage[nxt.tid]);
reconnect();
if (!meta){
onFail("Could not connect to stream data", true);
@ -1768,7 +1768,7 @@ namespace Mist{
lastStats = now;
VERYHIGH_MSG("Writing stats: %s, %s, %u, %lu, %lu", getConnectedHost().c_str(), streamName.c_str(),
VERYHIGH_MSG("Writing stats: %s, %s, %u, %" PRIu64 ", %" PRIu64, getConnectedHost().c_str(), streamName.c_str(),
crc & 0xFFFFFFFFu, myConn.dataUp(), myConn.dataDown());
/*LTS-START*/
if (statComm.getStatus() & COMM_STATUS_REQDISCONNECT){

View file

@ -348,7 +348,7 @@ namespace Mist{
EBML::sendElemHead(myConn, EBML::EID_CUES, cuesSize);
uint64_t tmpsegSize = infoSize + tracksSize + seekheadSize + cuesSize +
EBML::sizeElemHead(EBML::EID_CUES, cuesSize);
for (std::map<uint64_t, uint64_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
for (std::map<size_t, size_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
EBML::sendElemCuePoint(myConn, it->first, idx + 1, tmpsegSize, 0);
tmpsegSize += it->second;
}
@ -358,8 +358,8 @@ namespace Mist{
/// Seeks to the given byte position by doing a regular seek and remembering the byte offset from
/// that point
void OutEBML::byteSeek(uint64_t startPos){
INFO_MSG("Seeking to %" PRIu64 " bytes", startPos);
void OutEBML::byteSeek(size_t startPos){
INFO_MSG("Seeking to %zu bytes", startPos);
sentHeader = false;
newClusterTime = 0;
if (startPos == 0){
@ -377,10 +377,10 @@ namespace Mist{
}
startPos -= headerSize;
sentHeader = true; // skip the header
for (std::map<uint64_t, uint64_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
VERYHIGH_MSG("Cluster %" PRIu64 " (%" PRIu64 " bytes) -> %" PRIu64 " to go", it->first, it->second, startPos);
for (std::map<size_t, size_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
VERYHIGH_MSG("Cluster %zu (%zu bytes) -> %zu to go", it->first, it->second, startPos);
if (startPos < it->second){
HIGH_MSG("Seek to fragment at %" PRIu64 " ms", it->first);
HIGH_MSG("Seek to fragment at %zu ms", it->first);
myConn.skipBytes(startPos);
seek(it->first);
newClusterTime = it->first;
@ -413,8 +413,8 @@ namespace Mist{
totalSize = EBML::sizeElemEBML(doctype) + EBML::sizeElemHead(EBML::EID_SEGMENT, segmentSize) + segmentSize;
}
size_t byteEnd = totalSize - 1;
size_t byteStart = 0;
uint64_t byteEnd = totalSize - 1;
uint64_t byteStart = 0;
if (!M.getLive() && req.GetHeader("Range") != ""){
//Range request
if (parseRange(req.GetHeader("Range"), byteStart, byteEnd)){
@ -521,7 +521,7 @@ namespace Mist{
segmentSize = infoSize + tracksSize + seekheadSize + cuesSize +
EBML::sizeElemHead(EBML::EID_CUES, cuesSize);
uint32_t cuesInside = 0;
for (std::map<uint64_t, uint64_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
for (std::map<size_t, size_t>::iterator it = clusterSizes.begin(); it != clusterSizes.end(); ++it){
cuesInside += EBML::sizeElemCuePoint(it->first, idx + 1, segmentSize, 0);
segmentSize += it->second;
}

View file

@ -24,7 +24,7 @@ namespace Mist{
uint64_t newClusterTime;
// VoD-only
void calcVodSizes();
size_t segmentSize; // size of complete segment contents (excl. header)
uint64_t segmentSize; // size of complete segment contents (excl. header)
size_t tracksSize; // size of Tracks (incl. header)
size_t infoSize; // size of Info (incl. header)
size_t cuesSize; // size of Cues (excl. header)

View file

@ -836,7 +836,7 @@ namespace Mist{
segfaults.
*/
if (!thisPacket.getData()) {
FAIL_MSG("Current packet has no data, lookahead: %lu.", needsLookAhead);
FAIL_MSG("Current packet has no data, lookahead: %" PRIu64, needsLookAhead);
return;
}
@ -1185,7 +1185,7 @@ namespace Mist{
H.SendResponse("500", "Error generating MP4 header", myConn);
return;
}
INFO_MSG("Have %zu bytes, sending %zu bytes", headerData.size(), std::min(headerSize, byteEnd) - byteStart);
INFO_MSG("Have %zu bytes, sending %" PRIu64 " bytes", headerData.size(), std::min(headerSize, byteEnd) - byteStart);
H.Chunkify(headerData + byteStart, std::min(headerSize, byteEnd) - byteStart, myConn);
leftOver -= std::min(headerSize, byteEnd) - byteStart;
}

View file

@ -66,7 +66,7 @@ namespace Mist{
size_t index = 0;
if (initData[0] == 0x02){//"special" case, requires interpretation similar to table
if (initData.size() < 7){
FAIL_MSG("initData size too tiny (size: %lu)", initData.size());
FAIL_MSG("initData size too tiny (size: %zu)", initData.size());
return false;
}
size_t len1 = 0;
@ -94,7 +94,7 @@ namespace Mist{
output.push_back(initData.substr(index));
}else{
if (initData.size() < 7){
FAIL_MSG("initData size too tiny (size: %lu)", initData.size());
FAIL_MSG("initData size too tiny (size: %zu)", initData.size());
return false;
}
unsigned int len = 0;

View file

@ -1329,7 +1329,7 @@ namespace Mist{
break; // happens when connection breaks unexpectedly
case 1: // set chunk size
RTMPStream::chunk_rec_max = Bit::btohl(next.data.data());
MEDIUM_MSG("CTRL: Set chunk size: %" PRIu64, RTMPStream::chunk_rec_max);
MEDIUM_MSG("CTRL: Set chunk size: %zu", RTMPStream::chunk_rec_max);
break;
case 2: // abort message - we ignore this one
MEDIUM_MSG("CTRL: Abort message");
@ -1438,7 +1438,7 @@ namespace Mist{
tagTime -= (tagTime - ltt) - 1;
}
}
uint64_t idx = reTrackToID[reTrack];
size_t idx = reTrackToID[reTrack];
if (idx != INVALID_TRACK_ID && !userSelect.count(idx)){
userSelect[idx].reload(streamName, idx, COMM_STATUS_ACTIVE | COMM_STATUS_SOURCE);
}

View file

@ -506,7 +506,7 @@ namespace Mist{
/// Reads and handles RTP packets over UDP, if needed
void OutRTSP::handleUDP(){
if (!isPushing()){return;}
for (std::map<size_t, SDP::Track>::iterator it = sdpState.tracks.begin();
for (std::map<uint64_t, SDP::Track>::iterator it = sdpState.tracks.begin();
it != sdpState.tracks.end(); ++it){
Socket::UDPConnection &s = it->second.data;
it->second.sorter.setCallback(it->first, insertRTP);

View file

@ -134,7 +134,7 @@ namespace Mist{
while (i + 4 < (unsigned int)dataLen){
ThisNaluSize = Bit::btohl(dataPointer + i);
if (ThisNaluSize + i + 4 > dataLen){
WARN_MSG("Too big NALU detected (%" PRIu32 " > %" PRIu64 ") - skipping!",
WARN_MSG("Too big NALU detected (%" PRIu32 " > %zu) - skipping!",
ThisNaluSize + i + 4, dataLen);
break;
}

View file

@ -230,7 +230,7 @@ namespace Mist{
trackId = (S.ID << 16) + thisPacket.getTrackId();
size_t idx = M.trackIDToIndex(trackId, getpid());
if (idx == INVALID_TRACK_ID || !M.getCodec(idx).size()){
INFO_MSG("Initializing track %zi as %" PRIu64 " for playlist %" PRIu64, thisPacket.getTrackId(), trackId, S.ID);
INFO_MSG("Initializing track %zi as %" PRIu64 " for playlist %zu", thisPacket.getTrackId(), trackId, S.ID);
S.S.initializeMetadata(meta, thisPacket.getTrackId(), trackId);
}
}

View file

@ -99,7 +99,7 @@ int main(int argc, char **argv){
for (uint64_t j = pages.getDeleted(); j < pages.getEndPos(); j++){
char thisPageName[NAME_BUFFER_SIZE];
snprintf(thisPageName, NAME_BUFFER_SIZE, SHM_TRACK_DATA,
Util::streamName, i, pages.getInt("firstkey", j));
Util::streamName, i, (uint32_t)pages.getInt("firstkey", j));
IPC::sharedPage p(thisPageName, 0);
p.master = true;
}