mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
First working implementation of Streamer, with TCP and SharedMemory.
This commit is contained in:
20
Settings.cpp
20
Settings.cpp
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user