New ScreenCapture separate from Device, with Window selection

For now only LINUX support for window selection. New icons for Loopback and for ScreenCapture. Important BugFix on DeviceSource and Device management.
This commit is contained in:
Bruno Herbelin
2023-08-15 22:26:42 +02:00
parent bb4e81b00a
commit a033b74f7f
28 changed files with 2094 additions and 371 deletions

View File

@@ -33,6 +33,7 @@
#include "StreamSource.h"
#include "PatternSource.h"
#include "DeviceSource.h"
#include "ScreenCaptureSource.h"
#include "NetworkSource.h"
#include "SrtReceiverSource.h"
#include "MultiFileSource.h"
@@ -432,6 +433,9 @@ void SessionLoader::load(XMLElement *sessionNode)
else if ( std::string(pType) == "DeviceSource") {
load_source = new DeviceSource(id_xml_);
}
else if ( std::string(pType) == "ScreenCaptureSource") {
load_source = new ScreenCaptureSource(id_xml_);
}
else if ( std::string(pType) == "NetworkSource") {
load_source = new NetworkSource(id_xml_);
}
@@ -615,6 +619,9 @@ Source *SessionLoader::createSource(tinyxml2::XMLElement *sourceNode, Mode mode)
else if ( std::string(pType) == "DeviceSource") {
load_source = new DeviceSource(id__);
}
else if ( std::string(pType) == "ScreenCaptureSource") {
load_source = new ScreenCaptureSource(id__);
}
else if ( std::string(pType) == "NetworkSource") {
load_source = new NetworkSource(id__);
}
@@ -1212,6 +1219,16 @@ void SessionLoader::visit (DeviceSource& s)
}
void SessionLoader::visit (ScreenCaptureSource& s)
{
std::string winname = std::string ( xmlCurrent_->Attribute("window") );
// change only if different window
if ( winname != s.window() )
s.setWindow(winname);
}
void SessionLoader::visit (NetworkSource& s)
{
std::string connect = std::string ( xmlCurrent_->Attribute("connection") );