Merge branch 'development' into LTS_development
This commit is contained in:
commit
76cf297829
2 changed files with 65 additions and 54 deletions
|
@ -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++){
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue