First working implementation of Streamer, with TCP and SharedMemory.

This commit is contained in:
brunoherbelin
2020-10-18 13:13:07 +02:00
parent 59c07ceb96
commit d7893be541
13 changed files with 406 additions and 61 deletions

View File

@@ -88,6 +88,13 @@ void Settings::Save()
RecordNode->SetAttribute("timeout", application.record.timeout);
pRoot->InsertEndChild(RecordNode);
// Record
XMLElement *StreamNode = xmlDoc.NewElement( "Stream" );
StreamNode->SetAttribute("profile", application.stream.profile);
StreamNode->SetAttribute("ip", application.stream.ip.c_str());
StreamNode->SetAttribute("port", application.stream.port);
pRoot->InsertEndChild(StreamNode);
// Transition
XMLElement *TransitionNode = xmlDoc.NewElement( "Transition" );
TransitionNode->SetAttribute("auto_open", application.transition.auto_open);
@@ -251,6 +258,19 @@ void Settings::Load()
application.record.path = SystemToolkit::home_path();
}
// Stream
XMLElement * streamnode = pRoot->FirstChildElement("Stream");
if (streamnode != nullptr) {
streamnode->QueryIntAttribute("profile", &application.stream.profile);
streamnode->QueryIntAttribute("port", &application.stream.port);
const char *ip_ = recordnode->Attribute("ip");
if (ip_)
application.stream.ip = std::string(ip_);
else
application.stream.ip = "localhost";
}
// Source
XMLElement * sourceconfnode = pRoot->FirstChildElement("Source");
if (sourceconfnode != nullptr) {