LTS commit of OS edition Input edits
This commit is contained in:
		
							parent
							
								
									29c05bda3f
								
							
						
					
					
						commit
						fc5adc6ac0
					
				
					 15 changed files with 30 additions and 17 deletions
				
			
		|  | @ -41,7 +41,7 @@ namespace Mist { | |||
|     } | ||||
|   } | ||||
|    | ||||
|   bool inputAV::setup() { | ||||
|   bool inputAV::checkArguments() { | ||||
|     if (config->getString("input") == "-") { | ||||
|       std::cerr << "Input from stdin not yet supported" << std::endl; | ||||
|       return false; | ||||
|  | @ -57,9 +57,12 @@ namespace Mist { | |||
|         return false; | ||||
|       } | ||||
|     } | ||||
|     return true; | ||||
|   } | ||||
| 
 | ||||
|   bool inputAV::preRun(){ | ||||
|     //make sure all av inputs are registered properly, just in case
 | ||||
|     //setup() already does this, but under windows it doesn't remember that it has.
 | ||||
|     //the constructor already does this, but under windows it doesn't remember that it has.
 | ||||
|     //Very sad, that. We may need to get windows some medication for it.
 | ||||
|     av_register_all(); | ||||
|      | ||||
|  | @ -204,7 +207,7 @@ namespace Mist { | |||
|       return;//success!
 | ||||
|     } | ||||
|     thisPacket.null(); | ||||
|     setup(); | ||||
|     preRun(); | ||||
|     //failure :-(
 | ||||
|     DEBUG_MSG(DLVL_FAIL, "getNext failed"); | ||||
|   } | ||||
|  |  | |||
|  | @ -19,7 +19,8 @@ namespace Mist { | |||
|       ~inputAV(); | ||||
|     protected: | ||||
|       //Private Functions
 | ||||
|       bool setup(); | ||||
|       bool checkArguments(); | ||||
|       bool preRun(); | ||||
|       bool readHeader(); | ||||
|       void getNext(bool smart = true); | ||||
|       void seek(int seekTime); | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ namespace Mist { | |||
|       inputBalancer(Util::Config * cfg); | ||||
|       int boot(int argc, char * argv[]); | ||||
|     protected: | ||||
|       bool setup(){return false;}; | ||||
|       bool checkArguments(){return false;}; | ||||
|       bool readHeader(){return false;}; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -596,7 +596,7 @@ namespace Mist { | |||
|     /*LTS-START*/ | ||||
|     //Reload the configuration to make sure we stay up to date with changes through the api
 | ||||
|     if (Util::epoch() - lastReTime > 4) { | ||||
|       setup(); | ||||
|       preRun(); | ||||
|     } | ||||
|     /*LTS-END*/ | ||||
|     //Static variable keeping track of the next temporary mapping to use for a track.
 | ||||
|  |  | |||
|  | @ -52,7 +52,7 @@ namespace Mist { | |||
|     srand(time(NULL)); | ||||
|   } | ||||
| 
 | ||||
|   bool inputDTSC::setup() { | ||||
|   bool inputDTSC::checkArguments() { | ||||
|     key = Encodings::Base64::decode(config->getString("key")); | ||||
|     if (key == ""){ | ||||
|       if (config->getString("keyseed") == "" || config->getString("keyid") == ""){ | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ namespace Mist { | |||
|       inputDTSC(Util::Config * cfg); | ||||
|     protected: | ||||
|       //Private Functions
 | ||||
|       bool setup(); | ||||
|       bool checkArguments(); | ||||
|       bool readHeader(); | ||||
|       void getNext(bool smart = true); | ||||
|       void seek(int seekTime); | ||||
|  |  | |||
|  | @ -7,7 +7,7 @@ namespace Mist { | |||
|       inputFolder(Util::Config * cfg); | ||||
|       int boot(int argc, char * argv[]); | ||||
|     protected: | ||||
|       bool setup(){return false;}; | ||||
|       bool checkArguments(){return false;}; | ||||
|       bool readHeader(){return false;}; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -286,7 +286,7 @@ namespace Mist{ | |||
|     if (inFile){fclose(inFile);} | ||||
|   } | ||||
| 
 | ||||
|   bool inputHLS::setup(){ | ||||
|   bool inputHLS::checkArguments(){ | ||||
|     if (config->getString("input") == "-"){return false;} | ||||
| 
 | ||||
|     if (!initPlaylist(config->getString("input"))){return false;} | ||||
|  |  | |||
|  | @ -101,7 +101,7 @@ namespace Mist{ | |||
|     int firstSegment(); | ||||
|     void waitForNextSegment(); | ||||
|     void readPMT(); | ||||
|     bool setup(); | ||||
|     bool checkArguments(); | ||||
|     bool preSetup(); | ||||
|     bool readHeader(); | ||||
|     void getNext(bool smart = true); | ||||
|  |  | |||
|  | @ -22,7 +22,7 @@ namespace Mist { | |||
|     inFile = 0; | ||||
|   } | ||||
| 
 | ||||
|   bool inputISMV::setup() { | ||||
|   bool inputISMV::checkArguments() { | ||||
|     if (config->getString("input") == "-") { | ||||
|       std::cerr << "Input from stdin not yet supported" << std::endl; | ||||
|       return false; | ||||
|  | @ -38,6 +38,9 @@ namespace Mist { | |||
|         return false; | ||||
|       } | ||||
|     } | ||||
|     return true; | ||||
|   } | ||||
|   bool inputISMV::preRun() { | ||||
|     //open File
 | ||||
|     inFile = fopen(config->getString("input").c_str(), "r"); | ||||
|     if (!inFile) { | ||||
|  |  | |||
|  | @ -29,7 +29,8 @@ namespace Mist { | |||
|       inputISMV(Util::Config * cfg); | ||||
|     protected: | ||||
|       //Private Functions
 | ||||
|       bool setup(); | ||||
|       bool checkArguments(); | ||||
|       bool preRun(); | ||||
|       bool readHeader(); | ||||
|       void getNext(bool smart = true); | ||||
|       void seek(int seekTime); | ||||
|  |  | |||
|  | @ -156,7 +156,7 @@ namespace Mist { | |||
|     free(data); | ||||
|   } | ||||
|    | ||||
|   bool inputMP4::setup() { | ||||
|   bool inputMP4::checkArguments() { | ||||
|     if (config->getString("input") == "-") { | ||||
|       std::cerr << "Input from stdin not yet supported" << std::endl; | ||||
|       return false; | ||||
|  | @ -173,7 +173,10 @@ namespace Mist { | |||
|       } | ||||
|       streamName = config->getString("streamname"); | ||||
|     } | ||||
|     return true; | ||||
|   } | ||||
|      | ||||
|   bool inputMP4::preRun() { | ||||
|     //open File
 | ||||
|     inFile = fopen(config->getString("input").c_str(), "r"); | ||||
|     if (!inFile) { | ||||
|  |  | |||
|  | @ -84,7 +84,8 @@ namespace Mist { | |||
|       ~inputMP4(); | ||||
|     protected: | ||||
|       //Private Functions
 | ||||
|       bool setup(); | ||||
|       bool checkArguments(); | ||||
|       bool preRun(); | ||||
|       bool readHeader(); | ||||
|       void getNext(bool smart = true); | ||||
|       void seek(int seekTime); | ||||
|  |  | |||
|  | @ -141,7 +141,7 @@ namespace Mist { | |||
|   } | ||||
| 
 | ||||
|   ///Live Setup of TS Input
 | ||||
|   bool inputTS::setup() { | ||||
|   bool inputTS::preRun() { | ||||
|     const std::string & inpt = config->getString("input"); | ||||
|     //streamed standard input
 | ||||
|     if (inpt == "-") { | ||||
|  |  | |||
|  | @ -16,7 +16,8 @@ namespace Mist { | |||
|       bool needsLock(); | ||||
|     protected: | ||||
|       //Private Functions
 | ||||
|       bool setup(); | ||||
|       bool checkArguments(){return true;} | ||||
|       bool preRun(); | ||||
|       bool readHeader(); | ||||
|       void getNext(bool smart = true); | ||||
|       void seek(int seekTime); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma