Library code style update + some minor backports from Pro edition
This commit is contained in:
		
							parent
							
								
									593b291e85
								
							
						
					
					
						commit
						2607113727
					
				
					 68 changed files with 4538 additions and 4665 deletions
				
			
		|  | @ -361,30 +361,6 @@ namespace Mist{ | |||
|     uint64_t byteEnd = totalSize-1; | ||||
|     uint64_t byteStart = 0; | ||||
|      | ||||
|     /*LTS-START*/ | ||||
|     // allow setting of max lead time through buffer variable.
 | ||||
|     // max lead time is set in MS, but the variable is in integer seconds for simplicity.
 | ||||
|     if (H.GetVar("buffer") != ""){maxSkipAhead = JSON::Value(H.GetVar("buffer")).asInt() * 1000;} | ||||
|     //allow setting of play back rate through buffer variable.
 | ||||
|     //play back rate is set in MS per second, but the variable is a simple multiplier.
 | ||||
|     if (H.GetVar("rate") != ""){ | ||||
|       long long int multiplier = JSON::Value(H.GetVar("rate")).asInt(); | ||||
|       if (multiplier){ | ||||
|         realTime = 1000 / multiplier; | ||||
|       }else{ | ||||
|         realTime = 0; | ||||
|       } | ||||
|     } | ||||
|     if (H.GetHeader("X-Mist-Rate") != ""){ | ||||
|       long long int multiplier = JSON::Value(H.GetHeader("X-Mist-Rate")).asInt(); | ||||
|       if (multiplier){ | ||||
|         realTime = 1000 / multiplier; | ||||
|       }else{ | ||||
|         realTime = 0; | ||||
|       } | ||||
|     } | ||||
|     /*LTS-END*/ | ||||
| 
 | ||||
|     char rangeType = ' '; | ||||
|     if (!myMeta.live){ | ||||
|       if (H.GetHeader("Range") != ""){ | ||||
|  |  | |||
|  | @ -68,7 +68,7 @@ namespace Mist { | |||
|       return; | ||||
|     } | ||||
|     char * dataPointer = 0; | ||||
|     unsigned int len = 0; | ||||
|     size_t len = 0; | ||||
|     thisPacket.getString("data", dataPointer, len); | ||||
|     H.Chunkify(dataPointer, len, myConn); | ||||
|   } | ||||
|  |  | |||
|  | @ -37,7 +37,7 @@ namespace Mist { | |||
|     JSON::Value jPack; | ||||
|     if (myMeta.tracks[thisPacket.getTrackId()].codec == "JSON"){ | ||||
|       char * dPtr; | ||||
|       unsigned int dLen; | ||||
|       size_t dLen; | ||||
|       thisPacket.getString("data", dPtr, dLen); | ||||
|       jPack["data"] = JSON::fromString(dPtr, dLen); | ||||
|       jPack["time"] = (long long)thisPacket.getTime(); | ||||
|  |  | |||
|  | @ -17,7 +17,7 @@ namespace Mist { | |||
|    | ||||
|   void OutProgressiveMP3::sendNext(){ | ||||
|     char * dataPointer = 0; | ||||
|     unsigned int len = 0; | ||||
|     size_t len = 0; | ||||
|     thisPacket.getString("data", dataPointer, len); | ||||
|     myConn.SendNow(dataPointer, len); | ||||
|   } | ||||
|  |  | |||
|  | @ -59,7 +59,7 @@ namespace Mist { | |||
|         + 32 //MDHD Box
 | ||||
|         + 33 + thisTrack.getIdentifier().size() // HDLR Box
 | ||||
|         + 8 //MINF Box
 | ||||
|         + 36 //DINF Box
 | ||||
|         + 44 //DINF Box
 | ||||
|         + 8; // STBL Box
 | ||||
|       if (thisTrack.firstms != firstms){ | ||||
|         tmpRes += 12;// EDTS entry extra
 | ||||
|  | @ -75,6 +75,7 @@ namespace Mist { | |||
|         tmpRes += 20//VMHD Box 
 | ||||
|           + 16 //STSD
 | ||||
|           + 86 //AVC1
 | ||||
|           + 16 //PASP
 | ||||
|           + 8 + thisTrack.init.size();//avcC
 | ||||
|         tmpRes += 16 + (thisTrack.keys.size() * 4); | ||||
|       } | ||||
|  | @ -550,7 +551,7 @@ namespace Mist { | |||
|      | ||||
|     //Obtain a pointer to the data of this packet
 | ||||
|     char * dataPointer = 0; | ||||
|     unsigned int len = 0; | ||||
|     size_t len = 0; | ||||
|     thisPacket.getString("data", dataPointer, len); | ||||
| 
 | ||||
|     keyPart thisPart = *sortSet.begin(); | ||||
|  |  | |||
|  | @ -129,7 +129,7 @@ namespace Mist { | |||
|     unsigned int dheader_len = 1; | ||||
|     static Util::ResizeablePointer swappy; | ||||
|     char * tmpData = 0;//pointer to raw media data
 | ||||
|     unsigned int data_len = 0;//length of processed media data
 | ||||
|     size_t data_len = 0;//length of processed media data
 | ||||
|     thisPacket.getString("data", tmpData, data_len); | ||||
|     DTSC::Track & track = myMeta.tracks[thisPacket.getTrackId()]; | ||||
|      | ||||
|  |  | |||
|  | @ -28,7 +28,7 @@ namespace Mist { | |||
|    | ||||
|   void OutProgressiveSRT::sendNext(){ | ||||
|     char * dataPointer = 0; | ||||
|     unsigned int len = 0; | ||||
|     size_t len = 0; | ||||
|     thisPacket.getString("data", dataPointer, len); | ||||
|     //ignore empty subs
 | ||||
|     if (len == 0 || (len == 1 && dataPointer[0] == ' ')){ | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ namespace Mist { | |||
|     firstPack = true; | ||||
| 
 | ||||
|     char * dataPointer = 0; | ||||
|     unsigned int tmpDataLen = 0; | ||||
|     size_t tmpDataLen = 0; | ||||
|     thisPacket.getString("data", dataPointer, tmpDataLen); //data
 | ||||
|     uint64_t dataLen = tmpDataLen; | ||||
|     //apple compatibility timestamp correction
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Erik Zandvliet
						Erik Zandvliet