mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Finalizing implementation of SrtReceiverSource
Added icons, unified UI, loading and saving in XML.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "PatternSource.h"
|
||||
#include "DeviceSource.h"
|
||||
#include "NetworkSource.h"
|
||||
#include "SrtReceiverSource.h"
|
||||
#include "MultiFileSource.h"
|
||||
#include "StreamSource.h"
|
||||
#include "RenderSource.h"
|
||||
@@ -352,6 +353,9 @@ void SessionLoader::load(XMLElement *sessionNode)
|
||||
else if ( std::string(pType) == "GenericStreamSource") {
|
||||
load_source = new GenericStreamSource(id_xml_);
|
||||
}
|
||||
else if ( std::string(pType) == "SrtReceiverSource") {
|
||||
load_source = new SrtReceiverSource(id_xml_);
|
||||
}
|
||||
|
||||
// skip failed (including clones)
|
||||
if (!load_source)
|
||||
@@ -480,6 +484,9 @@ Source *SessionLoader::createSource(tinyxml2::XMLElement *sourceNode, Mode mode)
|
||||
else if ( std::string(pType) == "GenericStreamSource") {
|
||||
load_source = new GenericStreamSource(id__);
|
||||
}
|
||||
else if ( std::string(pType) == "SrtReceiverSource") {
|
||||
load_source = new SrtReceiverSource(id__);
|
||||
}
|
||||
else if ( std::string(pType) == "CloneSource") {
|
||||
// clone from given origin
|
||||
XMLElement* originNode = xmlCurrent_->FirstChildElement("origin");
|
||||
@@ -1089,6 +1096,18 @@ void SessionLoader::visit (GenericStreamSource& s)
|
||||
}
|
||||
}
|
||||
|
||||
void SessionLoader::visit (SrtReceiverSource& s)
|
||||
{
|
||||
XMLElement* ip = xmlCurrent_->FirstChildElement("ip");
|
||||
XMLElement* port = xmlCurrent_->FirstChildElement("port");
|
||||
if (ip && port) {
|
||||
const char * textip = ip->GetText();
|
||||
const char * textport = port->GetText();
|
||||
if (textip && textport)
|
||||
s.setConnection(textip, textport);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SessionLoader::visit (CloneSource& s)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user