32-bit fixes
This commit is contained in:
		
							parent
							
								
									9e1539a2b9
								
							
						
					
					
						commit
						01d43796ad
					
				
					 28 changed files with 91 additions and 91 deletions
				
			
		|  | @ -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
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma