mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-19 06:09:59 +01:00
New Text source
Initial implementation of Text Source, displaying free text or subtitle file. support for Pango font description and formatting tags via gstreamer textoverlay plugin. Saving and loading in XML, GUI for creation (in patterns) and for editing.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include <tinyxml2.h>
|
||||
|
||||
#include "ImageShader.h"
|
||||
#include "TextSource.h"
|
||||
#include "defines.h"
|
||||
#include "Settings.h"
|
||||
#include "Log.h"
|
||||
@@ -436,6 +437,22 @@ Source * Mixer::createSourceSrt(const std::string &ip, const std::string &port)
|
||||
return s;
|
||||
}
|
||||
|
||||
Source *Mixer::createSourceText(const std::string &contents, glm::ivec2 res)
|
||||
{
|
||||
// ready to create a source
|
||||
TextSource *s = new TextSource;
|
||||
s->setContents(contents, res);
|
||||
|
||||
// propose a new name based on contents
|
||||
std::string basestring = BaseToolkit::transliterate(contents);
|
||||
basestring = BaseToolkit::splitted(basestring, '\n').front();
|
||||
if (SystemToolkit::file_exists(basestring))
|
||||
basestring = SystemToolkit::base_filename(basestring);
|
||||
s->setName( basestring );
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
Source * Mixer::createSourceGroup()
|
||||
{
|
||||
SessionGroupSource *s = new SessionGroupSource;
|
||||
|
||||
Reference in New Issue
Block a user