Convert AAC and EBML outputs to properly use generic fileTarget functionality

Change-Id: I2eff10361d11de0639f8d0e97e4379ebc050155b
This commit is contained in:
Marco 2022-12-26 15:57:49 +01:00 committed by Thulinma
parent 00d9b66602
commit e55038bc46
4 changed files with 6 additions and 24 deletions

View file

@ -16,6 +16,7 @@ namespace Mist{
capa["methods"][0u]["type"] = "html5/audio/aac";
capa["methods"][0u]["hrn"] = "AAC progressive";
capa["methods"][0u]["priority"] = 8;
capa["push_urls"].append("/*.aac");
JSON::Value opt;
opt["arg"] = "string";

View file

@ -10,6 +10,7 @@ namespace Mist{
void initialSeek();
private:
virtual bool inlineRestartCapable() const{return true;}
bool isFileTarget(){return isRecording();}
};
}// namespace Mist

View file

@ -48,30 +48,6 @@ namespace Mist{
if (config->getString("target").find(".webm") != std::string::npos){doctype = "webm";}
initialize();
if (!M.getLive()){calcVodSizes();}
if (!streamName.size()){
WARN_MSG("Recording unconnected EBML output to file! Cancelled.");
conn.close();
return;
}
if (config->getString("target") == "-"){
parseData = true;
wantRequest = false;
INFO_MSG("Outputting %s to stdout in EBML format", streamName.c_str());
return;
}
if (!M.getValidTracks().size()){
INFO_MSG("Stream not available - aborting");
conn.close();
return;
}
if (connectToFile(config->getString("target"))){
parseData = true;
wantRequest = false;
INFO_MSG("Recording %s to %s in EBML format", streamName.c_str(),
config->getString("target").c_str());
return;
}
conn.close();
}
}

View file

@ -13,6 +13,10 @@ namespace Mist{
protected:
virtual bool inlineRestartCapable() const{return true;}
bool isFileTarget(){
if (config->getString("target").substr(0, 9) != "mkv-exec:"){return true;}
return false;
}
private:
bool isRecording();