Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2015-09-08 18:38:00 +02:00
commit 76cf297829
2 changed files with 65 additions and 54 deletions

View file

@ -132,6 +132,14 @@ namespace Mist {
parseHeader(); parseHeader();
if (!config->getString("streamname").size()){ if (!config->getString("streamname").size()){
convert();
}else{
serve();
}
return 0;
}
void Input::convert(){
//check filename for no - //check filename for no -
if (config->getString("output") != "-"){ if (config->getString("output") != "-"){
std::string filename = config->getString("output"); std::string filename = config->getString("output");
@ -160,7 +168,9 @@ namespace Mist {
}else{ }else{
DEBUG_MSG(DLVL_FAIL,"No filename specified, exiting"); DEBUG_MSG(DLVL_FAIL,"No filename specified, exiting");
} }
}else{ }
void Input::serve(){
char userPageName[NAME_BUFFER_SIZE]; char userPageName[NAME_BUFFER_SIZE];
snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str()); snprintf(userPageName, NAME_BUFFER_SIZE, SHM_USERS, streamName.c_str());
userPage.init(userPageName, PLAY_EX_SIZE, true); userPage.init(userPageName, PLAY_EX_SIZE, true);
@ -188,8 +198,6 @@ namespace Mist {
DEBUG_MSG(DLVL_DEVEL,"Input for stream %s closing clean", streamName.c_str()); DEBUG_MSG(DLVL_DEVEL,"Input for stream %s closing clean", streamName.c_str());
//end player functionality //end player functionality
} }
return 0;
}
void Input::finish(){ void Input::finish(){
for( std::map<unsigned int, std::map<unsigned int, unsigned int> >::iterator it = pageCounter.begin(); it != pageCounter.end(); it++){ for( std::map<unsigned int, std::map<unsigned int, unsigned int> >::iterator it = pageCounter.begin(); it != pageCounter.end(); it++){

View file

@ -37,6 +37,9 @@ namespace Mist {
virtual void trackSelect(std::string trackSpec){}; virtual void trackSelect(std::string trackSpec){};
virtual void userCallback(char * data, size_t len, unsigned int id); virtual void userCallback(char * data, size_t len, unsigned int id);
void serve();
void convert();
void parseHeader(); void parseHeader();
bool bufferFrame(unsigned int track, unsigned int keyNum); bool bufferFrame(unsigned int track, unsigned int keyNum);