mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-17 13:19:59 +01:00
New Generalize option to restart on deactivation to any StreamSource
StreamSource now have the option 'restart on deactivation' like MediaPlayer. This option is saved in XML (added Visitors for Stream and StreamSource). The GUI is added as sub-menu in play bar (like for MediaPlayer). Some StreamSource subclasses needed to be fixed to allow this feature (e.g. MultiFileSource).
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
#include "NetworkSource.h"
|
||||
#include "SrtReceiverSource.h"
|
||||
#include "MultiFileSource.h"
|
||||
#include "StreamSource.h"
|
||||
#include "RenderSource.h"
|
||||
#include "Session.h"
|
||||
#include "ImageShader.h"
|
||||
@@ -1169,6 +1168,24 @@ void SessionLoader::visit (RenderSource& s)
|
||||
s.setSession( session_ );
|
||||
}
|
||||
|
||||
void SessionLoader::visit(Stream &n)
|
||||
{
|
||||
XMLElement* streamNode = xmlCurrent_->FirstChildElement("Stream");
|
||||
|
||||
if (streamNode) {
|
||||
bool rewind_on_disabled = false;
|
||||
streamNode->QueryBoolAttribute("rewind_on_disabled", &rewind_on_disabled);
|
||||
n.setRewindOnDisabled(rewind_on_disabled);
|
||||
}
|
||||
}
|
||||
|
||||
void SessionLoader::visit (StreamSource& s)
|
||||
{
|
||||
// set config stream
|
||||
if (s.stream() != nullptr)
|
||||
s.stream()->accept(*this);
|
||||
}
|
||||
|
||||
void SessionLoader::visit (PatternSource& s)
|
||||
{
|
||||
uint t = xmlCurrent_->UnsignedAttribute("pattern");
|
||||
|
||||
Reference in New Issue
Block a user