From 7565704fdce7a7a0591107c28227202bd66c5e26 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Fri, 25 Jan 2019 22:55:32 +0100 Subject: [PATCH] Fixed 32-bit compile issues --- lib/dtsc.h | 8 ++++---- lib/dtscmeta.cpp | 16 ++++++++-------- lib/json.cpp | 14 -------------- lib/json.h | 2 -- src/analysers/analyser.cpp | 4 ++-- src/analysers/analyser_dtsc.cpp | 18 +++++++++--------- src/controller/controller_statistics.cpp | 16 ++++++++-------- src/input/input.cpp | 6 +++--- src/input/input_buffer.cpp | 12 ++++++------ src/input/input_dtsc.cpp | 6 +++--- src/input/input_ebml.cpp | 6 +++--- src/input/input_flv.cpp | 2 +- src/input/input_h264.cpp | 2 +- src/input/input_mp3.cpp | 6 +++--- src/input/input_ogg.cpp | 10 +++++----- src/input/input_ogg.h | 14 +++++++------- src/output/output.cpp | 2 +- src/output/output_ebml.cpp | 2 +- src/output/output_hds.cpp | 2 +- src/output/output_hls.cpp | 2 +- src/output/output_hss.cpp | 2 +- src/output/output_http.cpp | 4 ++-- src/output/output_http_internal.cpp | 8 ++++---- src/output/output_httpts.cpp | 2 +- src/output/output_json.cpp | 8 ++++---- src/output/output_progressive_flv.cpp | 2 +- src/output/output_progressive_mp3.cpp | 2 +- src/output/output_progressive_mp4.cpp | 2 +- src/output/output_progressive_ogg.cpp | 2 +- src/output/output_rtmp.cpp | 2 +- src/output/output_srt.cpp | 4 ++-- src/utils/util_amf.cpp | 2 +- 32 files changed, 87 insertions(+), 103 deletions(-) diff --git a/lib/dtsc.h b/lib/dtsc.h index 7055053b..b3f8afea 100644 --- a/lib/dtsc.h +++ b/lib/dtsc.h @@ -310,8 +310,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; @@ -366,8 +366,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 54718779..1cfacd7b 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; } @@ -2032,8 +2032,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) { @@ -2065,22 +2065,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 79aa02ee..a285a99c 100644 --- a/src/analysers/analyser.cpp +++ b/src/analysers/analyser.cpp @@ -62,7 +62,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)"; @@ -72,7 +72,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 2f59a932..c703335a 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -226,7 +226,7 @@ std::set Controller::getActiveStreams(const std::string & prefix){ } /// 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){ long long prevDown = getDown(); long long prevUp = getUp(); curConns[index].update(data); @@ -314,7 +314,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()); } @@ -358,7 +358,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); } @@ -375,7 +375,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 @@ -406,7 +406,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; @@ -480,7 +480,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;} @@ -891,7 +891,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 @@ -934,7 +934,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 e2abbd04..138c6b71 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -37,16 +37,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 03a69786..1d634f2c 100644 --- a/src/input/input_buffer.cpp +++ b/src/input/input_buffer.cpp @@ -26,19 +26,19 @@ 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; 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."; @@ -48,12 +48,12 @@ 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(); 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("*"); @@ -206,7 +206,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 c9e41161..1d970467 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["codecs"][0u][0u].append("H264"); @@ -33,13 +33,13 @@ 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; } bool inputDTSC::needsLock(){ diff --git a/src/input/input_ebml.cpp b/src/input/input_ebml.cpp index ae5fe267..34846251 100644 --- a/src/input/input_ebml.cpp +++ b/src/input/input_ebml.cpp @@ -17,7 +17,7 @@ namespace Mist{ capa["source_match"].append("/*.mk3d"); capa["source_match"].append("/*.mks"); capa["source_match"].append("/*.webm"); - capa["priority"] = 9ll; + capa["priority"] = 9; capa["codecs"].append("H264"); capa["codecs"].append("HEVC"); capa["codecs"].append("VP8"); @@ -341,7 +341,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 @@ -413,7 +413,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 ead3178b..8076c62e 100644 --- a/src/input/input_flv.cpp +++ b/src/input/input_flv.cpp @@ -19,7 +19,7 @@ namespace Mist { capa["name"] = "FLV"; capa["desc"] = "Allows loading FLV files for Video on Demand."; capa["source_match"] = "/*.flv"; - 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 ed6579ff..9320783c 100644 --- a/src/input/input_mp3.cpp +++ b/src/input/input_mp3.cpp @@ -16,7 +16,7 @@ namespace Mist { capa["name"] = "MP3"; capa["desc"] = "This input allows you to stream MP3 Video on Demand files."; capa["source_match"] = "/*.mp3"; - capa["priority"] = 9ll; + capa["priority"] = 9; capa["codecs"][0u][0u].append("MP3"); timestamp = 0; } @@ -155,9 +155,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 27158c25..c91590e5 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; } } } @@ -433,7 +433,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 b8c95fc9..bdbc9cb0 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -36,7 +36,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 89a6295a..943e983a 100644 --- a/src/output/output_ebml.cpp +++ b/src/output/output_ebml.cpp @@ -44,7 +44,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 9fddf35b..e6405f87 100644 --- a/src/output/output_hds.cpp +++ b/src/output/output_hds.cpp @@ -161,7 +161,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 8bf38e87..3cc90450 100644 --- a/src/output/output_hls.cpp +++ b/src/output/output_hls.cpp @@ -161,7 +161,7 @@ namespace Mist { capa["codecs"][0u][1u].append("MP3"); 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\"]]]"); } diff --git a/src/output/output_hss.cpp b/src/output/output_hss.cpp index 84acdc6d..81ee6095 100644 --- a/src/output/output_hss.cpp +++ b/src/output/output_hss.cpp @@ -57,7 +57,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 e5d1fae9..51cd8952 100644 --- a/src/output/output_http.cpp +++ b/src/output/output_http.cpp @@ -226,7 +226,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{ @@ -339,7 +339,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 1c81cd2b..9aa77b16 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -366,9 +366,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"; @@ -551,7 +551,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 += "