32-bit fixes
This commit is contained in:
parent
9e1539a2b9
commit
01d43796ad
28 changed files with 91 additions and 91 deletions
|
@ -654,7 +654,7 @@ namespace SDP{
|
|||
if (tracks.size()){
|
||||
for (std::map<uint32_t, Track>::iterator it = tracks.begin(); it != tracks.end(); ++it){
|
||||
if (!it->second.control.size()){
|
||||
it->second.control = "/track" + JSON::Value((long long)it->first).asString();
|
||||
it->second.control = "/track" + JSON::Value(it->first).asString();
|
||||
INFO_MSG("Control track: %s", it->second.control.c_str());
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ namespace TS{
|
|||
|
||||
bool Stream::hasPacket(size_t tid) const {
|
||||
tthread::lock_guard<tthread::recursive_mutex> guard(tMutex);
|
||||
std::map<unsigned long, std::deque<Packet> >::const_iterator pesIt = pesStreams.find(tid);
|
||||
std::map<size_t, std::deque<Packet> >::const_iterator pesIt = pesStreams.find(tid);
|
||||
if (pesIt == pesStreams.end()){
|
||||
return false;
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ namespace TS{
|
|||
}
|
||||
}
|
||||
|
||||
for (std::map<unsigned long, uint32_t>::const_iterator i = seenUnitStart.begin();
|
||||
for (std::map<size_t, uint32_t>::const_iterator i = seenUnitStart.begin();
|
||||
i != seenUnitStart.end(); i++){
|
||||
if (pidToCodec.count(i->first) && i->second > 1){
|
||||
return true;
|
||||
|
@ -327,7 +327,7 @@ namespace TS{
|
|||
|
||||
// We now know we're deleting 1 UnitStart, so we can pop the pesPositions and lower the seenUnitStart counter.
|
||||
--(seenUnitStart[tid]);
|
||||
std::deque<size_t> &inPositions = pesPositions[tid];
|
||||
std::deque<uint64_t> &inPositions = pesPositions[tid];
|
||||
uint64_t bPos = inPositions.front();
|
||||
inPositions.pop_front();
|
||||
|
||||
|
@ -971,7 +971,7 @@ namespace TS{
|
|||
}
|
||||
}
|
||||
|
||||
std::set<unsigned long> Stream::getActiveTracks(){
|
||||
std::set<size_t> Stream::getActiveTracks(){
|
||||
tthread::lock_guard<tthread::recursive_mutex> guard(tMutex);
|
||||
std::set<size_t> result;
|
||||
// Track 0 is always active
|
||||
|
|
|
@ -109,7 +109,7 @@ void Analyser::init(Util::Config &conf){
|
|||
opt["long"] = "timeout";
|
||||
opt["short"] = "T";
|
||||
opt["arg"] = "num";
|
||||
opt["default"] = 0ll;
|
||||
opt["default"] = 0;
|
||||
opt["help"] = "Time out after X seconds of processing/retrieving";
|
||||
conf.addOption("timeout", opt);
|
||||
opt.null();
|
||||
|
|
|
@ -23,7 +23,7 @@ void AnalyserTS::init(Util::Config &conf){
|
|||
opt["long"] = "detail";
|
||||
opt["short"] = "D";
|
||||
opt["arg"] = "num";
|
||||
opt["default"] = 3ll;
|
||||
opt["default"] = 3;
|
||||
opt["help"] = "Detail level of analysis bitmask (default=3). 1 = PES, 2 = TS non-stream pkts, 4 "
|
||||
"= TS stream pkts, 32 = raw PES packet bytes, 64 = raw TS packet bytes";
|
||||
conf.addOption("detail", opt);
|
||||
|
@ -31,7 +31,7 @@ void AnalyserTS::init(Util::Config &conf){
|
|||
opt["long"] = "pid";
|
||||
opt["short"] = "P";
|
||||
opt["arg"] = "num";
|
||||
opt["default"] = 0ll;
|
||||
opt["default"] = 0;
|
||||
opt["help"] = "Only use the given PID, ignore others";
|
||||
conf.addOption("pid", opt);
|
||||
opt.null();
|
||||
|
|
|
@ -479,7 +479,7 @@ uint32_t Controller::statSession::invalidate(){
|
|||
uint32_t ret = 0;
|
||||
sync = 1;
|
||||
if (curConns.size() && statPointer){
|
||||
for (std::map<unsigned long, statStorage>::iterator jt = curConns.begin(); jt != curConns.end(); ++jt){
|
||||
for (std::map<uint64_t, statStorage>::iterator jt = curConns.begin(); jt != curConns.end(); ++jt){
|
||||
char * data = statPointer->getIndex(jt->first);
|
||||
if (data){
|
||||
IPC::statExchange tmpEx(data);
|
||||
|
@ -497,7 +497,7 @@ uint32_t Controller::statSession::kill(){
|
|||
uint32_t ret = 0;
|
||||
sync = 100;
|
||||
if (curConns.size() && statPointer){
|
||||
for (std::map<unsigned long, statStorage>::iterator jt = curConns.begin(); jt != curConns.end(); ++jt){
|
||||
for (std::map<uint64_t, statStorage>::iterator jt = curConns.begin(); jt != curConns.end(); ++jt){
|
||||
char * data = statPointer->getIndex(jt->first);
|
||||
if (data){
|
||||
IPC::statExchange tmpEx(data);
|
||||
|
@ -1725,9 +1725,9 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
|
|||
tthread::lock_guard<tthread::mutex> guard(statsMutex);
|
||||
//collect the data first
|
||||
std::map<std::string, uint32_t> outputs;
|
||||
unsigned long totViewers = 0, totInputs = 0, totOutputs = 0;
|
||||
unsigned int tOut = Util::epoch() - STATS_DELAY;
|
||||
unsigned int tIn = Util::epoch() - STATS_INPUT_DELAY;
|
||||
uint64_t totViewers = 0, totInputs = 0, totOutputs = 0;
|
||||
uint64_t tOut = Util::epoch() - STATS_DELAY;
|
||||
uint64_t tIn = Util::epoch() - STATS_INPUT_DELAY;
|
||||
//check all sessions
|
||||
if (sessions.size()){
|
||||
for (std::map<sessIndex, statSession>::iterator it = sessions.begin(); it != sessions.end(); it++){
|
||||
|
@ -1757,7 +1757,7 @@ void Controller::handlePrometheus(HTTP::Parser & H, Socket::Connection & conn, i
|
|||
resp["curr"].append(totViewers);
|
||||
resp["curr"].append(totInputs);
|
||||
resp["curr"].append(totOutputs);
|
||||
resp["curr"].append(sessions.size());
|
||||
resp["curr"].append((uint64_t)sessions.size());
|
||||
resp["tot"].append(servViewers);
|
||||
resp["tot"].append(servInputs);
|
||||
resp["tot"].append(servOutputs);
|
||||
|
|
|
@ -169,10 +169,10 @@ namespace Mist {
|
|||
static JSON::Value thisPack;
|
||||
thisPack.null();
|
||||
thisPack["trackid"] = srtTrack;
|
||||
thisPack["bpos"] = (long long)srtSource.tellg();
|
||||
thisPack["bpos"] = (uint64_t)srtSource.tellg();
|
||||
thisPack["data"] = data;
|
||||
thisPack["index"] = index;
|
||||
thisPack["time"] = (long long)timestamp;
|
||||
thisPack["time"] = timestamp;
|
||||
thisPack["duration"] = duration;
|
||||
|
||||
std::string tmpStr = thisPack.toNetPacked();
|
||||
|
|
|
@ -9,8 +9,8 @@ namespace Mist {
|
|||
capa["name"] = "Balancer";
|
||||
capa["desc"] = "The load balancer input restarts itself as the input a load balancer tells it it should be. The syntax is in the form 'balance:http://HOST:PORT[?fallback=FALLBACK]', where HOST and PORT are the host and port of the load balancer and the FALLBACK is the full source URL that should be used if the load balancer cannot be reached.";
|
||||
capa["source_match"] = "balance:*";
|
||||
capa["priority"] = 9ll;
|
||||
capa["morphic"] = 1ll;
|
||||
capa["priority"] = 9;
|
||||
capa["morphic"] = 1;
|
||||
}
|
||||
|
||||
int inputBalancer::boot(int argc, char * argv[]){
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace Mist {
|
|||
std::stringstream issues;
|
||||
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
|
||||
JSON::Value & track = details[it->second.getWritableIdentifier()];
|
||||
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;
|
||||
|
@ -221,19 +221,19 @@ namespace Mist {
|
|||
if ((k->getLength()/k->getParts()) > longest_prt){longest_prt = (k->getLength()/k->getParts());}
|
||||
if ((k->getLength()/k->getParts()) < shrtest_prt){shrtest_prt = (k->getLength()/k->getParts());}
|
||||
}
|
||||
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)! ";}
|
||||
if (shrtest_cnt < 6){issues << "unstable connection (" << shrtest_cnt << " " << it->second.codec << " frames in key)! ";}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ namespace Mist {
|
|||
}
|
||||
/*LTS-START*/
|
||||
if (Triggers::shouldTrigger("STREAM_TRACK_REMOVE")) {
|
||||
std::string payload = config->getString("streamname") + "\n" + JSON::Value((long long)it->first).asString() + "\n";
|
||||
std::string payload = config->getString("streamname") + "\n" + JSON::Value((uint64_t)it->first).asString() + "\n";
|
||||
Triggers::doTrigger("STREAM_TRACK_REMOVE", payload, config->getString("streamname"));
|
||||
}
|
||||
/*LTS-END*/
|
||||
|
@ -786,13 +786,13 @@ namespace Mist {
|
|||
collidesWith = -1;
|
||||
}
|
||||
/*LTS-START*/
|
||||
unsigned long finalMap = collidesWith;
|
||||
uint64_t finalMap = collidesWith;
|
||||
if (finalMap == -1) {
|
||||
//No collision has been detected, assign a new final number
|
||||
finalMap = (myMeta.tracks.size() ? myMeta.tracks.rbegin()->first : 0) + 1;
|
||||
DEBUG_MSG(DLVL_DEVEL, "No colision detected for temporary track %lu from user %u, assigning final track number %lu", value, id, finalMap);
|
||||
if (Triggers::shouldTrigger("STREAM_TRACK_ADD")) {
|
||||
std::string payload = config->getString("streamname") + "\n" + JSON::Value((long long)finalMap).asString() + "\n";
|
||||
std::string payload = config->getString("streamname") + "\n" + JSON::Value(finalMap).asString() + "\n";
|
||||
Triggers::doTrigger("STREAM_TRACK_ADD", payload, config->getString("streamname"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Mist {
|
|||
inputDTSC::inputDTSC(Util::Config * cfg) : Input(cfg) {
|
||||
capa["name"] = "DTSC";
|
||||
capa["desc"] = "Enables DTSC Input";
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["source_match"] = "/*.dtsc";
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][0u].append("H263");
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace Mist {
|
|||
capa["desc"] = "The folder input will make available all supported files in the given folder as streams under this stream name, in the format STREAMNAME+FILENAME. For example, if your stream is called 'files' and you have a file called 'movie.flv', you could access this file streamed as 'files+movie.flv'. This input does not support subdirectories. To support more complex libraries, look into the documentation for the STREAM_SOURCE trigger.";
|
||||
capa["source_match"] = "/*/";
|
||||
capa["source_file"] = "$source/$wildcard";
|
||||
capa["priority"] = 9ll;
|
||||
capa["morphic"] = 1ll;
|
||||
capa["priority"] = 9;
|
||||
capa["morphic"] = 1;
|
||||
}
|
||||
|
||||
int inputFolder::boot(int argc, char * argv[]){
|
||||
|
|
|
@ -264,7 +264,7 @@ namespace Mist{
|
|||
// All URLs can be set to always-on mode.
|
||||
capa["always_match"] = capa["source_match"];
|
||||
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][1u].append("AAC");
|
||||
capa["codecs"][0u][1u].append("AC3");
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Mist {
|
|||
capa["name"] = "ISMV";
|
||||
capa["desc"] = "This input allows you to stream ISMV Video on Demand files.";
|
||||
capa["source_match"] = "/*.ismv";
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][1u].append("AAC");
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace Mist {
|
|||
if (i) {
|
||||
lastBytePos ++;
|
||||
} else {
|
||||
lastPack["keyframe"] = 1LL;
|
||||
lastPack["keyframe"] = 1;
|
||||
lastBytePos = curBytePos;
|
||||
}
|
||||
lastPack["bpos"] = lastBytePos;
|
||||
|
@ -105,7 +105,7 @@ namespace Mist {
|
|||
lastPack["offset"] = (int)offsetConv;
|
||||
} else {
|
||||
if (i == 0) {
|
||||
lastPack["keyframe"] = 1LL;
|
||||
lastPack["keyframe"] = 1;
|
||||
lastPack["bpos"] = curBytePos;
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ namespace Mist {
|
|||
return;
|
||||
}
|
||||
int tId = buffered.begin()->trackId;
|
||||
thisPack["time"] = (long long int)(buffered.begin()->time / 10000);
|
||||
thisPack["time"] = (uint64_t)(buffered.begin()->time / 10000);
|
||||
thisPack["trackid"] = tId;
|
||||
fseek(inFile, buffered.begin()->position, SEEK_SET);
|
||||
char * tmpData = (char*)malloc(buffered.begin()->size * sizeof(char));
|
||||
|
@ -140,15 +140,15 @@ namespace Mist {
|
|||
}
|
||||
if (myMeta.tracks[tId].type == "video") {
|
||||
if (buffered.begin()->isKeyFrame) {
|
||||
thisPack["keyframe"] = 1LL;
|
||||
thisPack["keyframe"] = 1;
|
||||
}
|
||||
thisPack["offset"] = buffered.begin()->offset / 10000;
|
||||
thisPack["offset"] = (uint64_t)(buffered.begin()->offset / 10000);
|
||||
} else {
|
||||
if (buffered.begin()->isKeyFrame) {
|
||||
thisPack["keyframe"] = 1LL;
|
||||
thisPack["keyframe"] = 1;
|
||||
}
|
||||
}
|
||||
thisPack["bpos"] = buffered.begin()->position;
|
||||
thisPack["bpos"] = (uint64_t)buffered.begin()->position;
|
||||
buffered.erase(buffered.begin());
|
||||
if (buffered.size() < 2 * selectedTracks.size()){
|
||||
for (std::set<unsigned long>::iterator it = selectedTracks.begin(); it != selectedTracks.end(); it++){
|
||||
|
|
|
@ -161,7 +161,7 @@ namespace Mist{
|
|||
capa["desc"] = "This input allows streaming of MP4 files as Video on Demand.";
|
||||
capa["source_match"] = "/*.mp4";
|
||||
capa["source_file"] = "$source";
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("HEVC");
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][0u].append("H263");
|
||||
|
@ -502,12 +502,12 @@ namespace Mist{
|
|||
|
||||
static JSON::Value thisPack;
|
||||
thisPack.null();
|
||||
thisPack["trackid"] = (long long)curPart.trackID;
|
||||
thisPack["bpos"] = (long long)curPart.bpos; //(long long)fileSource.tellg();
|
||||
thisPack["trackid"] = (uint64_t)curPart.trackID;
|
||||
thisPack["bpos"] = curPart.bpos; //(long long)fileSource.tellg();
|
||||
thisPack["data"] = std::string(data+2,txtLen);
|
||||
thisPack["time"] = (long long)curPart.time;
|
||||
thisPack["time"] = curPart.time;
|
||||
if (curPart.duration){
|
||||
thisPack["duration"] = (long long)curPart.duration;
|
||||
thisPack["duration"] = curPart.duration;
|
||||
}
|
||||
thisPack["keyframe"] = true;
|
||||
// Write the json value to lastpack
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Mist{
|
|||
capa["source_match"].append("rtsp://*");
|
||||
// These can/may be set to always-on mode
|
||||
capa["always_match"].append("rtsp://*");
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][0u].append("HEVC");
|
||||
capa["codecs"][0u][0u].append("MPEG2");
|
||||
|
@ -51,7 +51,7 @@ 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 "
|
||||
|
@ -60,7 +60,7 @@ namespace Mist{
|
|||
"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.null();
|
||||
option["arg"] = "string";
|
||||
option["long"] = "transport";
|
||||
|
@ -93,7 +93,7 @@ namespace Mist{
|
|||
sndH.auth(username, password, authRequest);
|
||||
}
|
||||
sndH.SetHeader("User-Agent", "MistServer " PACKAGE_VERSION);
|
||||
sndH.SetHeader("CSeq", JSON::Value((long long)cSeq).asString());
|
||||
sndH.SetHeader("CSeq", JSON::Value(cSeq).asString());
|
||||
if (session.size()){sndH.SetHeader("Session", session);}
|
||||
if (extraHeaders && extraHeaders->size()){
|
||||
for (std::map<std::string, std::string>::const_iterator it = extraHeaders->begin();
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace Mist{
|
|||
capa["decs"] = "This input allows streaming of SRT and WebVTT subtitle files as Video on Demand.";
|
||||
capa["source_match"].append("/*.srt");
|
||||
capa["source_match"].append("/*.vtt");
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("subtitle");
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ namespace Mist{
|
|||
static JSON::Value thisPack;
|
||||
thisPack.null();
|
||||
thisPack["trackid"] = 1;
|
||||
thisPack["bpos"] = (long long)fileSource.tellg();
|
||||
thisPack["bpos"] = (uint64_t)fileSource.tellg();
|
||||
thisPack["data"] = data;
|
||||
thisPack["index"] = index;
|
||||
thisPack["time"] = timestamp;
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace Mist {
|
|||
capa["always_match"].append("http-ts://*");
|
||||
capa["incoming_push_url"] = "udp://$host:$port";
|
||||
capa["incoming_push_url_match"] = "tsudp://*";
|
||||
capa["priority"] = 9ll;
|
||||
capa["priority"] = 9;
|
||||
capa["codecs"][0u][0u].append("H264");
|
||||
capa["codecs"][0u][0u].append("HEVC");
|
||||
capa["codecs"][0u][0u].append("MPEG2");
|
||||
|
@ -143,13 +143,13 @@ 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;
|
||||
}
|
||||
|
||||
inputTS::~inputTS() {
|
||||
|
@ -522,7 +522,7 @@ namespace Mist {
|
|||
}
|
||||
nProxy.userClient.keepAlive();
|
||||
|
||||
std::set<unsigned long> activeTracks = liveStream.getActiveTracks();
|
||||
std::set<size_t> activeTracks = liveStream.getActiveTracks();
|
||||
{
|
||||
tthread::lock_guard<tthread::mutex> guard(threadClaimMutex);
|
||||
if (hasStarted && !threadTimer.size()){
|
||||
|
@ -534,7 +534,7 @@ namespace Mist {
|
|||
hasStarted = false;
|
||||
}
|
||||
}
|
||||
for (std::set<unsigned long>::iterator it = activeTracks.begin(); it != activeTracks.end(); it++) {
|
||||
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 %d timed out %d seconds ago without a clean shutdown.", *it, Util::bootSecs() - threadTimer[*it]);
|
||||
|
|
|
@ -289,7 +289,7 @@ namespace Mist{
|
|||
HIGH_MSG("USER_NEW sync achieved: %u", (unsigned int)tmpEx.getSync());
|
||||
//1 = check requested (connection is new)
|
||||
if (tmpEx.getSync() == 1){
|
||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value((long long)crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl+"\n"+tmpEx.getSessId();
|
||||
std::string payload = streamName+"\n" + getConnectedHost() +"\n" + JSON::Value(crc).asString() + "\n"+capa["name"].asStringRef()+"\n"+reqUrl+"\n"+tmpEx.getSessId();
|
||||
if (!Triggers::doTrigger("USER_NEW", payload, streamName)){
|
||||
onFail("Not allowed to play (USER_NEW)");
|
||||
tmpEx.setSync(100);//100 = denied
|
||||
|
@ -428,7 +428,7 @@ namespace Mist{
|
|||
while (std::getline(ss, item, ',')){selectTrack(trackType, item);}
|
||||
return;
|
||||
}
|
||||
long long trackNo = JSON::Value(trackVal).asInt();
|
||||
uint64_t trackNo = JSON::Value(trackVal).asInt();
|
||||
if (trackVal == JSON::Value(trackNo).asString()){
|
||||
//It's an integer number
|
||||
if (!myMeta.tracks.count(trackNo)){
|
||||
|
@ -1010,7 +1010,7 @@ namespace Mist{
|
|||
WARN_MSG("Recording start time is earlier than stream begin - starting earliest possible");
|
||||
targetParams["recstart"] = "-1";
|
||||
}else{
|
||||
targetParams["recstart"] = JSON::Value((long long)((startUnix - unixStreamBegin)*1000)).asString();
|
||||
targetParams["recstart"] = JSON::Value((int64_t)((startUnix - unixStreamBegin)*1000)).asString();
|
||||
}
|
||||
}
|
||||
if (targetParams.count("recstopunix")){
|
||||
|
@ -1019,7 +1019,7 @@ namespace Mist{
|
|||
onFail("Recording stop time is earlier than stream begin - aborting", true);
|
||||
return;
|
||||
}else{
|
||||
targetParams["recstop"] = JSON::Value((long long)((stopUnix - unixStreamBegin)*1000)).asString();
|
||||
targetParams["recstop"] = JSON::Value((int64_t)((stopUnix - unixStreamBegin)*1000)).asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1069,7 +1069,7 @@ namespace Mist{
|
|||
WARN_MSG("Start time is earlier than stream begin - starting earliest possible");
|
||||
targetParams["start"] = "-1";
|
||||
}else{
|
||||
targetParams["start"] = JSON::Value((long long)((startUnix - unixStreamBegin)*1000)).asString();
|
||||
targetParams["start"] = JSON::Value((int64_t)((startUnix - unixStreamBegin)*1000)).asString();
|
||||
}
|
||||
}
|
||||
if (targetParams.count("stopunix")){
|
||||
|
@ -1079,7 +1079,7 @@ namespace Mist{
|
|||
onFail("Stop time is earlier than stream begin - aborting", true);
|
||||
return;
|
||||
}else{
|
||||
targetParams["stop"] = JSON::Value((long long)((stopUnix - unixStreamBegin)*1000)).asString();
|
||||
targetParams["stop"] = JSON::Value((int64_t)((stopUnix - unixStreamBegin)*1000)).asString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1531,9 +1531,9 @@ namespace Mist{
|
|||
loadPageForKey(nxt.tid, ++nxtKeyNum[nxt.tid]);
|
||||
nxt.offset = 0;
|
||||
if (nProxy.curPage.count(nxt.tid) && nProxy.curPage[nxt.tid].mapped){
|
||||
unsigned long long nextTime = getDTSCTime(nProxy.curPage[nxt.tid].mapped, nxt.offset);
|
||||
uint64_t nextTime = getDTSCTime(nProxy.curPage[nxt.tid].mapped, nxt.offset);
|
||||
if (nextTime && nextTime < nxt.time){
|
||||
dropTrack(nxt.tid, "EOP: time going backwards ("+JSON::Value((long long)nextTime).asString()+" < "+JSON::Value((long long)nxt.time).asString()+")");
|
||||
dropTrack(nxt.tid, "EOP: time going backwards ("+JSON::Value(nextTime).asString()+" < "+JSON::Value(nxt.time).asString()+")");
|
||||
}else{
|
||||
if (nextTime){
|
||||
nxt.time = nextTime;
|
||||
|
|
|
@ -22,9 +22,9 @@ namespace Mist {
|
|||
}
|
||||
return (time == rhs.time && tid < rhs.tid);
|
||||
}
|
||||
unsigned int tid;
|
||||
long long unsigned int time;
|
||||
unsigned int offset;
|
||||
uint64_t tid;
|
||||
uint64_t time;
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
/// The output class is intended to be inherited by MistOut process classes.
|
||||
|
|
|
@ -502,7 +502,7 @@ namespace Mist{
|
|||
|
||||
//MP3 does not work in browsers
|
||||
capa["exceptions"]["codec:MP3"] = JSON::fromString("[[\"blacklist\",[\"Mozilla/\"]]]");
|
||||
capa["methods"][0u]["priority"] = 8ll;
|
||||
capa["methods"][0u]["priority"] = 8;
|
||||
|
||||
cfg->addOption("nonchunked", JSON::fromString("{\"short\":\"C\",\"long\":\"nonchunked\",\"help\":\"Do not send chunked, but buffer whole segments.\"}"));
|
||||
capa["optional"]["nonchunked"]["name"] = "Send whole segments";
|
||||
|
|
|
@ -14,8 +14,8 @@ namespace Mist {
|
|||
JSON::Value prep;
|
||||
prep["cmd"] = "hi";
|
||||
prep["version"] = "MistServer " PACKAGE_VERSION;
|
||||
prep["pack_method"] = 2ll;
|
||||
salt = Secure::md5("mehstuff"+JSON::Value((long long)time(0)).asString());
|
||||
prep["pack_method"] = 2;
|
||||
salt = Secure::md5("mehstuff"+JSON::Value((uint64_t)time(0)).asString());
|
||||
prep["salt"] = salt;
|
||||
/// \todo Make this securererer.
|
||||
sendCmd(prep);
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace Mist{
|
|||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target filename to store EBML file as, or - for stdout.";
|
||||
cfg->addOption("target", opt);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Mist{
|
|||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target filename to store H264 file as, or - for stdout.";
|
||||
cfg->addOption("target", opt);
|
||||
}
|
||||
|
|
|
@ -314,9 +314,9 @@ namespace Mist {
|
|||
//Skip the current last fragment if we are live
|
||||
continue;
|
||||
}
|
||||
long long int starttime = myMeta.tracks[*it].getKey(it3->getNumber()).getTime();
|
||||
uint64_t starttime = myMeta.tracks[*it].getKey(it3->getNumber()).getTime();
|
||||
std::stringstream line;
|
||||
long long duration = it3->getDuration();
|
||||
uint64_t duration = it3->getDuration();
|
||||
if (duration <= 0) {
|
||||
duration = myMeta.tracks[*it].lastms - starttime;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ namespace Mist {
|
|||
//segment["url"] = segmenturl.str();
|
||||
segment["time"] = starttime;
|
||||
segment["duration"] = duration;
|
||||
segment["number"] = (unsigned int)it3->getNumber();
|
||||
segment["number"] = (uint64_t)it3->getNumber();
|
||||
quality["segments"].append(segment);
|
||||
}
|
||||
result["qualities"].append(quality);
|
||||
|
@ -371,7 +371,7 @@ namespace Mist {
|
|||
cfg->addOption("listlimit", JSON::fromString("{\"arg\":\"integer\",\"default\":0,\"short\":\"y\",\"long\":\"list-limit\",\"help\":\"Maximum number of parts in live playlists (0 = infinite).\"}"));
|
||||
capa["optional"]["listlimit"]["name"] = "Live playlist limit";
|
||||
capa["optional"]["listlimit"]["help"] = "Maximum number of parts in live playlists. (0 = infinite)";
|
||||
capa["optional"]["listlimit"]["default"] = 0ll;
|
||||
capa["optional"]["listlimit"]["default"] = 0;
|
||||
capa["optional"]["listlimit"]["type"] = "uint";
|
||||
capa["optional"]["listlimit"]["option"] = "--list-limit";
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace Mist {
|
|||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target filename to store FLV file as, or - for stdout.";
|
||||
cfg->addOption("target", opt);
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace Mist{
|
|||
amfReply.getContentP(2)->addContent(AMF::Object("type", "nonprivate"));
|
||||
amfReply.getContentP(2)->addContent(AMF::Object("flashVer", "FMLE/3.0 (compatible; MistServer/" PACKAGE_VERSION "/" RELEASE ")"));
|
||||
if (port != 1935){
|
||||
amfReply.getContentP(2)->addContent(AMF::Object("tcUrl", "rtmp://" + host + ":" + JSON::Value((long long)port).asString() + "/" + app));
|
||||
amfReply.getContentP(2)->addContent(AMF::Object("tcUrl", "rtmp://" + host + ":" + JSON::Value(port).asString() + "/" + app));
|
||||
}else{
|
||||
amfReply.getContentP(2)->addContent(AMF::Object("tcUrl", "rtmp://" + host + "/" + app));
|
||||
}
|
||||
|
@ -200,19 +200,19 @@ namespace Mist{
|
|||
capa["optional"]["acceptable"]["help"] = "Whether to allow only incoming pushes (2), only outgoing pulls (1), or both (0, default)";
|
||||
capa["optional"]["acceptable"]["option"] = "--acceptable";
|
||||
capa["optional"]["acceptable"]["short"] = "T";
|
||||
capa["optional"]["acceptable"]["default"] = (long long)0;
|
||||
capa["optional"]["acceptable"]["default"] = 0;
|
||||
capa["optional"]["acceptable"]["type"] = "select";
|
||||
capa["optional"]["acceptable"]["select"][0u][0u] = 0ll;
|
||||
capa["optional"]["acceptable"]["select"][0u][0u] = 0;
|
||||
capa["optional"]["acceptable"]["select"][0u][1u] = "Allow both incoming and outgoing connections";
|
||||
capa["optional"]["acceptable"]["select"][1u][0u] = 1ll;
|
||||
capa["optional"]["acceptable"]["select"][1u][0u] = 1;
|
||||
capa["optional"]["acceptable"]["select"][1u][1u] = "Allow only outgoing connections";
|
||||
capa["optional"]["acceptable"]["select"][2u][0u] = 2ll;
|
||||
capa["optional"]["acceptable"]["select"][2u][0u] = 2;
|
||||
capa["optional"]["acceptable"]["select"][2u][1u] = "Allow only incoming connections";
|
||||
capa["optional"]["maxkbps"]["name"] = "Max. kbps";
|
||||
capa["optional"]["maxkbps"]["help"] = "Maximum bitrate to allow in the ingest direction, in kilobits per second.";
|
||||
capa["optional"]["maxkbps"]["option"] = "--maxkbps";
|
||||
capa["optional"]["maxkbps"]["short"] = "K";
|
||||
capa["optional"]["maxkbps"]["default"] = (long long)0;
|
||||
capa["optional"]["maxkbps"]["default"] = 0;
|
||||
capa["optional"]["maxkbps"]["type"] = "uint";
|
||||
cfg->addConnectorOptions(1935, capa);
|
||||
config = cfg;
|
||||
|
@ -221,7 +221,7 @@ namespace Mist{
|
|||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target rtmp:// URL to push out towards.";
|
||||
cfg->addOption("target", opt);
|
||||
cfg->addOption("streamname", JSON::fromString("{\"arg\":\"string\",\"short\":\"s\",\"long\":\"stream\",\"help\":\"The name of the stream to push out, when pushing out.\"}"));
|
||||
|
|
|
@ -102,11 +102,11 @@ namespace Mist{
|
|||
|
||||
capa["methods"][0u]["handler"] = "rtsp";
|
||||
capa["methods"][0u]["type"] = "rtsp";
|
||||
capa["methods"][0u]["priority"] = 2ll;
|
||||
capa["methods"][0u]["priority"] = 2;
|
||||
|
||||
capa["optional"]["maxsend"]["name"] = "Max RTP packet size";
|
||||
capa["optional"]["maxsend"]["help"] = "Maximum size of RTP packets in bytes";
|
||||
capa["optional"]["maxsend"]["default"] = (long long)RTP::MAX_SEND;
|
||||
capa["optional"]["maxsend"]["default"] = RTP::MAX_SEND;
|
||||
capa["optional"]["maxsend"]["type"] = "uint";
|
||||
capa["optional"]["maxsend"]["option"] = "--max-packet-size";
|
||||
capa["optional"]["maxsend"]["short"] = "m";
|
||||
|
|
|
@ -94,7 +94,7 @@ namespace Mist {
|
|||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target tsudp:// URL to push out towards.";
|
||||
cfg->addOption("target", opt);
|
||||
}
|
||||
|
|
|
@ -19,13 +19,13 @@ namespace Mist{
|
|||
capa["codecs"][0u][0u].append("FLOAT");
|
||||
capa["methods"][0u]["handler"] = "http";
|
||||
capa["methods"][0u]["type"] = "html5/audio/wav";
|
||||
capa["methods"][0u]["priority"] = 1ll;
|
||||
capa["methods"][0u]["priority"] = 1;
|
||||
capa["push_urls"].append("/*.wav");
|
||||
|
||||
JSON::Value opt;
|
||||
opt["arg"] = "string";
|
||||
opt["default"] = "";
|
||||
opt["arg_num"] = 1ll;
|
||||
opt["arg_num"] = 1;
|
||||
opt["help"] = "Target filename to store WAV file as, or - for stdout.";
|
||||
cfg->addOption("target", opt);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue