diff --git a/lib/dtsc.h b/lib/dtsc.h index eaed8f0b..e24f04ea 100644 --- a/lib/dtsc.h +++ b/lib/dtsc.h @@ -334,8 +334,8 @@ namespace DTSC { std::string getIdentifier(); std::string getWritableIdentifier(); unsigned int trackID; - unsigned long long firstms; - unsigned long long lastms; + uint64_t firstms; + uint64_t lastms; int bps; int max_bps; int missedFrags; @@ -393,8 +393,8 @@ namespace DTSC { bool live; bool merged; uint16_t version; - long long int moreheader; - long long int bufferWindow; + int64_t moreheader; + int64_t bufferWindow; int64_t bootMsOffset;///< Millis to add to packet timestamps to get millis since system boot. std::string sourceURI; JSON::Value inputLocalVars; diff --git a/lib/dtscmeta.cpp b/lib/dtscmeta.cpp index 5bf2f23e..671447e1 100644 --- a/lib/dtscmeta.cpp +++ b/lib/dtscmeta.cpp @@ -502,7 +502,7 @@ namespace DTSC { ///\brief Returns the size of this packet. ///\return The size of this packet. - uint64_t Packet::getDataLen() const { + size_t Packet::getDataLen() const { return dataLen; } @@ -2125,8 +2125,8 @@ namespace DTSC { result["lang"] = lang; } result["trackid"] = trackID; - result["firstms"] = (long long)firstms; - result["lastms"] = (long long)lastms; + result["firstms"] = firstms; + result["lastms"] = lastms; result["bps"] = bps; result["maxbps"] = max_bps; if (missedFrags) { @@ -2158,22 +2158,22 @@ namespace DTSC { result["tracks"][it->second.getWritableIdentifier()] = it->second.toJSON(); } if (vod) { - result["vod"] = 1ll; + result["vod"] = 1; } if (live) { - result["live"] = 1ll; + result["live"] = 1; } if (merged) { - result["merged"] = 1ll; + result["merged"] = 1; } if (bufferWindow) { result["buffer_window"] = bufferWindow; } if (version) { - result["version"] = (long long)version; + result["version"] = version; } if (bootMsOffset){ - result["bootoffset"] = (long long)bootMsOffset; + result["bootoffset"] = bootMsOffset; } if (sourceURI.size()){ result["source"] = sourceURI; diff --git a/lib/json.cpp b/lib/json.cpp index fec76804..3a90d1bf 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -469,12 +469,6 @@ JSON::Value::Value(const char *val){ intVal = 0; } -/// Sets this JSON::Value to the given integer. -JSON::Value::Value(long long int val){ - myType = INTEGER; - intVal = val; -} - /// Sets this JSON::Value to the given integer. JSON::Value::Value(uint32_t val){ myType = INTEGER; @@ -654,14 +648,6 @@ JSON::Value &JSON::Value::operator=(const char *rhs){ return ((*this) = (std::string)rhs); } -/// Sets this JSON::Value to the given integer. -JSON::Value &JSON::Value::operator=(const long long int &rhs){ - null(); - myType = INTEGER; - intVal = rhs; - return *this; -} - /// Sets this JSON::Value to the given integer. JSON::Value &JSON::Value::operator=(const int64_t &rhs){ null(); diff --git a/lib/json.h b/lib/json.h index c1d984ba..9238457e 100644 --- a/lib/json.h +++ b/lib/json.h @@ -41,7 +41,6 @@ namespace JSON{ Value(std::istream &fromstream); Value(const std::string &val); Value(const char *val); - Value(long long int val); Value(int32_t val); Value(int64_t val); Value(uint32_t val); @@ -58,7 +57,6 @@ namespace JSON{ Value &operator=(const Value &rhs); Value &operator=(const std::string &rhs); Value &operator=(const char *rhs); - Value &operator=(const long long int &rhs); Value &operator=(const int64_t &rhs); Value &operator=(const int32_t &rhs); Value &operator=(const uint64_t &rhs); diff --git a/src/analysers/analyser.cpp b/src/analysers/analyser.cpp index 5c07ea59..0cf6c198 100644 --- a/src/analysers/analyser.cpp +++ b/src/analysers/analyser.cpp @@ -93,7 +93,7 @@ int Analyser::run(Util::Config &conf){ void Analyser::init(Util::Config &conf){ JSON::Value opt; - opt["arg_num"] = 1ll; + opt["arg_num"] = 1; opt["arg"] = "string"; opt["default"] = "-"; opt["help"] = "Filename to analyse, or - for standard input (default)"; @@ -117,7 +117,7 @@ void Analyser::init(Util::Config &conf){ opt["long"] = "detail"; opt["short"] = "D"; opt["arg"] = "num"; - opt["default"] = 2ll; + opt["default"] = 2; opt["help"] = "Detail level for analysis (0 = none, 2 = default, 10 = max)"; conf.addOption("detail", opt); opt.null(); diff --git a/src/analysers/analyser_dtsc.cpp b/src/analysers/analyser_dtsc.cpp index 2c4dd140..044660be 100644 --- a/src/analysers/analyser_dtsc.cpp +++ b/src/analysers/analyser_dtsc.cpp @@ -82,7 +82,7 @@ bool AnalyserDTSC::parsePacket(){ for (std::map::iterator it = M.tracks.begin(); it != M.tracks.end(); it++){ JSON::Value track; - track["kbits"] = (long long)((double)it->second.bps * 8 / 1024); + track["kbits"] = (uint64_t)((double)it->second.bps * 8 / 1024); track["codec"] = it->second.codec; uint32_t shrtest_key = 0xFFFFFFFFul; uint32_t longest_key = 0; @@ -106,12 +106,12 @@ bool AnalyserDTSC::parsePacket(){ } } } - track["keys"]["ms_min"] = (long long)shrtest_key; - track["keys"]["ms_max"] = (long long)longest_key; - track["keys"]["frame_ms_min"] = (long long)shrtest_prt; - track["keys"]["frame_ms_max"] = (long long)longest_prt; - track["keys"]["frames_min"] = (long long)shrtest_cnt; - track["keys"]["frames_max"] = (long long)longest_cnt; + track["keys"]["ms_min"] = shrtest_key; + track["keys"]["ms_max"] = longest_key; + track["keys"]["frame_ms_min"] = shrtest_prt; + track["keys"]["frame_ms_max"] = longest_prt; + track["keys"]["frames_min"] = shrtest_cnt; + track["keys"]["frames_max"] = longest_cnt; if (longest_prt > 500){ issues << "unstable connection (" << longest_prt << "ms " << it->second.codec << " frame)! "; @@ -123,8 +123,8 @@ bool AnalyserDTSC::parsePacket(){ if (it->second.codec == "AAC"){hasAAC = true;} if (it->second.codec == "H264"){hasH264 = true;} if (it->second.type == "video"){ - track["width"] = (long long)it->second.width; - track["height"] = (long long)it->second.height; + track["width"] = it->second.width; + track["height"] = it->second.height; track["fpks"] = it->second.fpks; if (it->second.codec == "H264"){ h264::sequenceParameterSet sps; diff --git a/src/controller/controller_statistics.cpp b/src/controller/controller_statistics.cpp index 0d7df85e..00611942 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -515,7 +515,7 @@ uint32_t Controller::statSession::kill(){ } /// Updates the given active connection with new stats data. -void Controller::statSession::update(unsigned long index, IPC::statExchange & data){ +void Controller::statSession::update(uint64_t index, IPC::statExchange & data){ //update the sync byte: 0 = requesting fill, 2 = requesting refill, 1 = needs checking, > 2 = state known (100=denied, 10=accepted) if (!data.getSync()){ sessIndex tmpidx(data); @@ -665,7 +665,7 @@ void Controller::statSession::wipeOld(uint64_t cutOff){ } } if (curConns.size()){ - for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ + for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ while (it->second.log.size() > 1 && it->second.log.begin()->first < cutOff){ it->second.log.erase(it->second.log.begin()); } @@ -747,7 +747,7 @@ void Controller::statSession::ping(const Controller::sessIndex & index, uint64_t } /// Archives the given connection. -void Controller::statSession::finish(unsigned long index){ +void Controller::statSession::finish(uint64_t index){ oldConns.push_back(curConns[index]); curConns.erase(index); } @@ -766,7 +766,7 @@ Controller::statSession::statSession(){ } /// Moves the given connection to the given session -void Controller::statSession::switchOverTo(statSession & newSess, unsigned long index){ +void Controller::statSession::switchOverTo(statSession & newSess, uint64_t index){ //add to the given session first newSess.curConns[index] = curConns[index]; //if this connection has data, update firstSec/lastSec if needed @@ -797,7 +797,7 @@ void Controller::statSession::switchOverTo(statSession & newSess, unsigned long } } if (curConns.size()){ - for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ + for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ if (it->second.log.size()){ if (firstSec > it->second.log.begin()->first){ firstSec = it->second.log.begin()->first; @@ -871,7 +871,7 @@ bool Controller::statSession::isViewer(){ } } if (curConns.size()){ - for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ + for (std::map::iterator it = curConns.begin(); it != curConns.end(); ++it){ if (it->second.log.size()){ upTotal += it->second.log.rbegin()->second.up + it->second.log.rbegin()->second.down; if (upTotal > COUNTABLE_BYTES){return true;} @@ -1282,7 +1282,7 @@ void Controller::fillClients(JSON::Value & req, JSON::Value & rep){ void Controller::fillActive(JSON::Value & req, JSON::Value & rep, bool onlyNow){ //collect the data first std::set streams; - std::map clients; + std::map clients; unsigned int tOut = Util::epoch() - STATS_DELAY; unsigned int tIn = Util::epoch() - STATS_INPUT_DELAY; //check all sessions @@ -1325,7 +1325,7 @@ void Controller::fillActive(JSON::Value & req, JSON::Value & rep, bool onlyNow){ IPC::semaphore metaLocker(liveSemName, O_CREAT | O_RDWR, (S_IRWXU|S_IRWXG|S_IRWXO), 1); metaLocker.wait(); DTSC::Scan strm = DTSC::Packet(streamIndex.mapped, streamIndex.len, true).getScan(); - long long lms = 0; + uint64_t lms = 0; DTSC::Scan trcks = strm.getMember("tracks"); unsigned int trcks_ctr = trcks.getSize(); for (unsigned int i = 0; i < trcks_ctr; ++i){ diff --git a/src/input/input.cpp b/src/input/input.cpp index a641c7d7..1f860728 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -38,16 +38,16 @@ namespace Mist { option["long"] = "json"; option["short"] = "j"; option["help"] = "Output MistIn info in JSON format, then exit"; - option["value"].append(0ll); + option["value"].append(0); config->addOption("json", option); option.null(); - option["arg_num"] = 1ll; + option["arg_num"] = 1; option["arg"] = "string"; option["help"] = "Name of the input file or - for stdin"; option["value"].append("-"); config->addOption("input", option); option.null(); - option["arg_num"] = 2ll; + option["arg_num"] = 2; option["arg"] = "string"; option["help"] = "Name of the output file or - for stdout"; option["value"].append("-"); diff --git a/src/input/input_buffer.cpp b/src/input/input_buffer.cpp index 1006acd8..6d2b1806 100644 --- a/src/input/input_buffer.cpp +++ b/src/input/input_buffer.cpp @@ -32,33 +32,33 @@ namespace Mist { option["long"] = "buffer"; option["short"] = "b"; option["help"] = "DVR buffer time in ms"; - option["value"].append(50000LL); + option["value"].append(50000); config->addOption("bufferTime", option); capa["optional"]["DVR"]["name"] = "Buffer time (ms)"; capa["optional"]["DVR"]["help"] = "The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback."; capa["optional"]["DVR"]["option"] = "--buffer"; capa["optional"]["DVR"]["type"] = "uint"; - capa["optional"]["DVR"]["default"] = 50000LL; + capa["optional"]["DVR"]["default"] = 50000; /*LTS-start*/ option.null(); option["arg"] = "integer"; option["long"] = "cut"; option["short"] = "c"; option["help"] = "Any timestamps before this will be cut from the live buffer"; - option["value"].append(0LL); + option["value"].append(0); config->addOption("cut", option); capa["optional"]["cut"]["name"] = "Cut time (ms)"; capa["optional"]["cut"]["help"] = "Any timestamps before this will be cut from the live buffer."; capa["optional"]["cut"]["option"] = "--cut"; capa["optional"]["cut"]["type"] = "uint"; - capa["optional"]["cut"]["default"] = 0LL; + capa["optional"]["cut"]["default"] = 0; option.null(); option["arg"] = "integer"; option["long"] = "resume"; option["short"] = "R"; option["help"] = "Enable resuming support (1) or disable resuming support (0, default)"; - option["value"].append(0LL); + option["value"].append(0); config->addOption("resume", option); capa["optional"]["resume"]["name"] = "Resume support"; capa["optional"]["resume"]["help"] = "If enabled, the buffer will linger after source disconnect to allow resuming the stream later. If disabled, the buffer will instantly close on source disconnect."; @@ -68,26 +68,26 @@ namespace Mist { capa["optional"]["resume"]["select"][0u][1u] = "Disabled"; capa["optional"]["resume"]["select"][1u][0u] = "1"; capa["optional"]["resume"]["select"][1u][1u] = "Enabled"; - capa["optional"]["resume"]["default"] = 0LL; + capa["optional"]["resume"]["default"] = 0; option.null(); option["arg"] = "integer"; option["long"] = "segment-size"; option["short"] = "S"; option["help"] = "Target time duration in milliseconds for segments"; - option["value"].append(5000LL); + option["value"].append(5000); config->addOption("segmentsize", option); capa["optional"]["segmentsize"]["name"] = "Segment size (ms)"; capa["optional"]["segmentsize"]["help"] = "Target time duration in milliseconds for segments."; capa["optional"]["segmentsize"]["option"] = "--segment-size"; capa["optional"]["segmentsize"]["type"] = "uint"; - capa["optional"]["segmentsize"]["default"] = 5000LL; + capa["optional"]["segmentsize"]["default"] = 5000; option.null(); /*LTS-end*/ capa["source_match"] = "push://*"; capa["non-provider"] = true;//Indicates we don't provide data, only collect it - capa["priority"] = 9ll; + capa["priority"] = 9; capa["desc"] = "This input type is both used for push- and pull-based streams. It provides a buffer for live media data. The push://[host][@password] style source allows all enabled protocols that support push input to accept a push into MistServer, where you can accept incoming streams from everyone, based on a set password, and/or use hostname/IP whitelisting."; capa["codecs"][0u][0u].append("*"); capa["codecs"][0u][1u].append("*"); @@ -344,7 +344,7 @@ namespace Mist { nProxy.metaPages[0].master = false; } myMeta.writeTo(nProxy.metaPages[0].mapped); - memset(nProxy.metaPages[0].mapped + myMeta.getSendLen(), 0, (nProxy.metaPages[0].len > myMeta.getSendLen() ? std::min(nProxy.metaPages[0].len - myMeta.getSendLen(), 4ll) : 0)); + memset(nProxy.metaPages[0].mapped + myMeta.getSendLen(), 0, (nProxy.metaPages[0].len > myMeta.getSendLen() ? std::min((size_t)(nProxy.metaPages[0].len - myMeta.getSendLen()), (size_t)4) : 0)); liveMeta->post(); } diff --git a/src/input/input_dtsc.cpp b/src/input/input_dtsc.cpp index f5ac66ae..58b94e1e 100644 --- a/src/input/input_dtsc.cpp +++ b/src/input/input_dtsc.cpp @@ -16,7 +16,7 @@ namespace Mist { inputDTSC::inputDTSC(Util::Config * cfg) : Input(cfg) { capa["name"] = "DTSC"; capa["desc"] = "Load DTSC files as Video on Demand sources, or dtsc:// URLs from other MistServer instances for live sources. This is the optimal method to pull live sources from other MistServer (or compatible) instances."; - capa["priority"] = 9ll; + capa["priority"] = 9; capa["source_match"].append("/*.dtsc"); capa["source_match"].append("dtsc://*"); capa["source_file"] = "$source"; @@ -34,26 +34,26 @@ namespace Mist { option["long"] = "buffer"; option["short"] = "b"; option["help"] = "Live stream DVR buffer time in ms"; - option["value"].append(50000LL); + option["value"].append(50000); config->addOption("bufferTime", option); capa["optional"]["DVR"]["name"] = "Buffer time (ms)"; capa["optional"]["DVR"]["help"] = "The target available buffer time for this live stream, in milliseconds. This is the time available to seek around in, and will automatically be extended to fit whole keyframes as well as the minimum duration needed for stable playback."; capa["optional"]["DVR"]["option"] = "--buffer"; capa["optional"]["DVR"]["type"] = "uint"; - capa["optional"]["DVR"]["default"] = 50000LL; + capa["optional"]["DVR"]["default"] = 50000; /*LTS-START*/ option.null(); option["arg"] = "integer"; option["long"] = "segment-size"; option["short"] = "S"; option["help"] = "Target time duration in milliseconds for segments"; - option["value"].append(5000LL); + option["value"].append(5000); config->addOption("segmentsize", option); capa["optional"]["segmentsize"]["name"] = "Segment size (ms)"; capa["optional"]["segmentsize"]["help"] = "Target time duration in milliseconds for segments."; capa["optional"]["segmentsize"]["option"] = "--segment-size"; capa["optional"]["segmentsize"]["type"] = "uint"; - capa["optional"]["segmentsize"]["default"] = 5000LL; + capa["optional"]["segmentsize"]["default"] = 5000; /*LTS-END*/ } diff --git a/src/input/input_ebml.cpp b/src/input/input_ebml.cpp index 04527493..1b3d592d 100644 --- a/src/input/input_ebml.cpp +++ b/src/input/input_ebml.cpp @@ -18,7 +18,7 @@ namespace Mist{ capa["source_match"].append("/*.mks"); capa["source_match"].append("/*.webm"); capa["source_file"] = "$source"; - capa["priority"] = 9ll; + capa["priority"] = 9; capa["codecs"].append("H264"); capa["codecs"].append("HEVC"); capa["codecs"].append("VP8"); @@ -342,7 +342,7 @@ namespace Mist{ } if (E.getID() == EBML::EID_TIMECODESCALE){ uint64_t timeScaleVal = E.getValUInt(); - myMeta.inputLocalVars["timescale"] = (long long)timeScaleVal; + myMeta.inputLocalVars["timescale"] = timeScaleVal; timeScale = ((double)timeScaleVal) / 1000000.0; } //Live streams stop parsing the header as soon as the first Cluster is encountered @@ -414,7 +414,7 @@ namespace Mist{ } } - myMeta.inputLocalVars["maxframeoffset"] = (long long)maxEBMLFrameOffset; + myMeta.inputLocalVars["maxframeoffset"] = maxEBMLFrameOffset; bench = Util::getMicros(bench); INFO_MSG("Header generated in %llu ms", bench / 1000); diff --git a/src/input/input_flv.cpp b/src/input/input_flv.cpp index 9ea0fe26..00069d6a 100644 --- a/src/input/input_flv.cpp +++ b/src/input/input_flv.cpp @@ -20,7 +20,7 @@ namespace Mist { capa["desc"] = "Allows loading FLV files for Video on Demand."; capa["source_match"] = "/*.flv"; capa["source_file"] = "$source"; - capa["priority"] = 9ll; + capa["priority"] = 9; capa["codecs"][0u][0u].append("H264"); capa["codecs"][0u][0u].append("H263"); capa["codecs"][0u][0u].append("VP6"); diff --git a/src/input/input_h264.cpp b/src/input/input_h264.cpp index 2825e84a..f2af2d6d 100644 --- a/src/input/input_h264.cpp +++ b/src/input/input_h264.cpp @@ -9,7 +9,7 @@ namespace Mist{ capa["source_match"] = "h264-exec:*"; //May be set to always-on mode capa["always_match"].append("h264-exec:*"); - capa["priority"] = 0ll; + capa["priority"] = 0; capa["codecs"][0u][0u].append("H264"); frameCount = 0; startTime = Util::bootMS(); diff --git a/src/input/input_mp3.cpp b/src/input/input_mp3.cpp index 31c66bd3..2fd3b2de 100644 --- a/src/input/input_mp3.cpp +++ b/src/input/input_mp3.cpp @@ -18,7 +18,7 @@ namespace Mist { capa["desc"] = "This input allows you to stream MP3 Video on Demand files."; capa["source_match"] = "/*.mp3"; capa["source_file"] = "$source"; - capa["priority"] = 9ll; + capa["priority"] = 9; capa["codecs"][0u][0u].append("MP3"); timestamp = 0; } @@ -153,9 +153,9 @@ namespace Mist { static JSON::Value thisPack; thisPack.null(); thisPack["trackid"] = 1; - thisPack["bpos"] = (long long)filePos; + thisPack["bpos"] = (uint64_t)filePos; thisPack["data"] = std::string(packHeader, dataSize); - thisPack["time"] = (long long)timestamp; + thisPack["time"] = timestamp; //Write the json value to lastpack std::string tmpStr = thisPack.toNetPacked(); thisPacket.reInit(tmpStr.data(), tmpStr.size()); diff --git a/src/input/input_ogg.cpp b/src/input/input_ogg.cpp index ef897deb..c1f15fa0 100644 --- a/src/input/input_ogg.cpp +++ b/src/input/input_ogg.cpp @@ -18,20 +18,20 @@ namespace Mist { JSON::Value segment::toJSON(OGG::oggCodec myCodec){ JSON::Value retval; - retval["time"] = (long long int)time; - retval["trackid"] = (long long int)tid; + retval["time"] = time; + retval["trackid"] = tid; std::string tmpString = ""; for (unsigned int i = 0; i < parts.size(); i++){ tmpString += parts[i]; } retval["data"] = tmpString; // INFO_MSG("Setting bpos for packet on track %llu, time %llu, to %llu", tid, time, bytepos); - retval["bpos"] = (long long int)bytepos; + retval["bpos"] = bytepos; if (myCodec == OGG::THEORA){ if (!theora::isHeader(tmpString.data(), tmpString.size())){ theora::header tmpHeader((char*)tmpString.data(), tmpString.size()); if (tmpHeader.getFTYPE() == 0){ - retval["keyframe"] = 1LL; + retval["keyframe"] = 1; } } } @@ -434,7 +434,7 @@ namespace Mist { } } INFO_MSG("Found %dms for track %lu at %llu bytepos %llu", seekTime, *it, tmpPos.time, tmpPos.bytepos); - int backChrs=std::min(280ull, tmpPos.bytepos - 1); + int backChrs=std::min((uint64_t)280, tmpPos.bytepos - 1); fseek(inFile, tmpPos.bytepos - backChrs, SEEK_SET); char buffer[300]; fread(buffer, 300, 1, inFile); diff --git a/src/input/input_ogg.h b/src/input/input_ogg.h index c03b11b0..84a35ab8 100644 --- a/src/input/input_ogg.h +++ b/src/input/input_ogg.h @@ -16,9 +16,9 @@ namespace Mist { return time < rhs.time || (time == rhs.time && tid < rhs.tid); } std::vector parts; - unsigned long long int time; - unsigned long long int tid; - long long unsigned int bytepos; + uint64_t time; + uint64_t tid; + uint64_t bytepos; bool keyframe; JSON::Value toJSON(OGG::oggCodec myCodec); }; @@ -36,10 +36,10 @@ namespace Mist { } return false; } - long unsigned int trackID; - long long unsigned int time; - long long unsigned int bytepos; - long long unsigned int segmentNo; + uint64_t trackID; + uint64_t time; + uint64_t bytepos; + uint64_t segmentNo; }; /* class oggTrack { diff --git a/src/output/output.cpp b/src/output/output.cpp index fba8c7a8..650d0be1 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -45,7 +45,7 @@ namespace Mist{ option["long"] = "noinput"; option["short"] = "N"; option["help"] = "Do not start input if not already started"; - option["value"].append(0ll); + option["value"].append(0); cfg->addOption("noinput", option); } diff --git a/src/output/output_ebml.cpp b/src/output/output_ebml.cpp index 5ff17d19..c391ad69 100644 --- a/src/output/output_ebml.cpp +++ b/src/output/output_ebml.cpp @@ -75,7 +75,7 @@ namespace Mist{ capa["codecs"][0u][2u].append("+JSON"); capa["methods"][0u]["handler"] = "http"; capa["methods"][0u]["type"] = "html5/video/webm"; - capa["methods"][0u]["priority"] = 11ll; + capa["methods"][0u]["priority"] = 11; //EBML will only work with VP8/VP9/Opus except on Chrome JSON::Value blacklistNonChrome = JSON::fromString("[[\"blacklist\"], [\"whitelist\",[\"Chrome\",\"Chromium\"]], [\"blacklist\",[\"Edge\",\"OPR/\"]]]"); capa["exceptions"]["codec:H264"] = blacklistNonChrome; diff --git a/src/output/output_hds.cpp b/src/output/output_hds.cpp index f663f828..aa2e5632 100644 --- a/src/output/output_hds.cpp +++ b/src/output/output_hds.cpp @@ -163,7 +163,7 @@ namespace Mist { capa["codecs"][0u][1u].append("ULAW"); capa["methods"][0u]["handler"] = "http"; capa["methods"][0u]["type"] = "flash/11"; - capa["methods"][0u]["priority"] = 6ll; + capa["methods"][0u]["priority"] = 6; capa["methods"][0u]["player_url"] = "/flashplayer.swf"; } diff --git a/src/output/output_hls.cpp b/src/output/output_hls.cpp index 02943016..ee53c251 100644 --- a/src/output/output_hls.cpp +++ b/src/output/output_hls.cpp @@ -363,7 +363,7 @@ namespace Mist { capa["codecs"][0u][1u].append("MP2"); capa["methods"][0u]["handler"] = "http"; capa["methods"][0u]["type"] = "html5/application/vnd.apple.mpegurl"; - capa["methods"][0u]["priority"] = 9ll; + capa["methods"][0u]["priority"] = 9; //MP3 only works on Edge/Apple capa["exceptions"]["codec:MP3"] = JSON::fromString("[[\"blacklist\"],[\"whitelist\",[\"iPad\",\"iPhone\",\"iPod\",\"MacIntel\",\"Edge\"]]]"); capa["exceptions"]["codec:HEVC"] = JSON::fromString("[[\"blacklist\"],[\"whitelist\",[\"iPad\",\"iPhone\",\"iPod\",\"MacIntel\"]]]"); diff --git a/src/output/output_hss.cpp b/src/output/output_hss.cpp index 83142745..f2095cfc 100644 --- a/src/output/output_hss.cpp +++ b/src/output/output_hss.cpp @@ -63,7 +63,7 @@ namespace Mist { capa["codecs"][0u][1u].append("AAC"); capa["methods"][0u]["handler"] = "http"; capa["methods"][0u]["type"] = "silverlight"; - capa["methods"][0u]["priority"] = 1ll; + capa["methods"][0u]["priority"] = 1; } void OutHSS::sendNext() { diff --git a/src/output/output_http.cpp b/src/output/output_http.cpp index 90e5ce0f..02ee1451 100644 --- a/src/output/output_http.cpp +++ b/src/output/output_http.cpp @@ -231,7 +231,7 @@ namespace Mist { std::string ua = H.GetVar("sessId"); crc = checksum::crc32(0, ua.data(), ua.size()); }else{ - std::string ua = JSON::Value((long long)getpid()).asString(); + std::string ua = JSON::Value(getpid()).asString(); crc = checksum::crc32(0, ua.data(), ua.size()); } }else{ @@ -379,7 +379,7 @@ namespace Mist { int argnum = 0; argarr[argnum++] = (char*)tmparg.c_str(); std::string temphost=getConnectedHost(); - std::string debuglevel = JSON::Value((long long)Util::Config::printDebugLevel).asString(); + std::string debuglevel = JSON::Value(Util::Config::printDebugLevel).asString(); argarr[argnum++] = (char*)"--ip"; argarr[argnum++] = (char*)(temphost.c_str()); argarr[argnum++] = (char*)"--stream"; diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index 24f7d628..ddaeb223 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -401,9 +401,9 @@ namespace Mist { } } if (json_resp["width"].asInt() < 1 || json_resp["height"].asInt() < 1){ - json_resp["width"] = 640ll; - json_resp["height"] = 480ll; - if (!hasVideo){json_resp["height"] = 20ll;} + json_resp["width"] = 640; + json_resp["height"] = 480; + if (!hasVideo){json_resp["height"] = 20;} } if (myMeta.vod){ json_resp["type"] = "vod"; @@ -596,7 +596,7 @@ namespace Mist { if (!myConn){return;} for (std::map::iterator trit = myMeta.tracks.begin(); trit != myMeta.tracks.end(); trit++){ if (trit->second.type == "video"){ - trackSources += "