BugFix DeviceSource: shared access to stream vis Device::manager

Creation of multiple DeviceSources is possible (also for multiple sessions and transitions) through centralized management of gst streams. Creation and deletion of a shared stream accross DeviceSources is handled.
This commit is contained in:
Bruno Herbelin
2022-01-20 01:28:30 +01:00
parent 625e2305ba
commit b82c83de5e
6 changed files with 208 additions and 139 deletions

View File

@@ -346,7 +346,8 @@ Source * Mixer::createSourcePattern(uint pattern, glm::ivec2 res)
Source * Mixer::createSourceDevice(const std::string &namedevice)
{
// ready to create a source
Source *s = Device::manager().createSource(namedevice);
DeviceSource *s = new DeviceSource;
s->setDevice(namedevice);
// propose a new name based on pattern name
s->setName( namedevice.substr(0, namedevice.find(" ")) );