mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 20:29:58 +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:
@@ -40,6 +40,7 @@
|
||||
#include "NetworkSource.h"
|
||||
#include "SrtReceiverSource.h"
|
||||
#include "MultiFileSource.h"
|
||||
#include "TextSource.h"
|
||||
#include "Session.h"
|
||||
#include "BaseToolkit.h"
|
||||
#include "SystemToolkit.h"
|
||||
@@ -499,3 +500,32 @@ void InfoVisitor::visit (SrtReceiverSource& s)
|
||||
information_ = oss.str();
|
||||
current_id_ = s.id();
|
||||
}
|
||||
|
||||
void InfoVisitor::visit (TextSource& s)
|
||||
{
|
||||
if (current_id_ == s.id())
|
||||
return;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
TextContents *ptn = s.contents();
|
||||
if (ptn) {
|
||||
if (ptn->failed())
|
||||
oss << ptn->description() << std::endl << ptn->log();
|
||||
else {
|
||||
if (brief_) {
|
||||
oss << "RGBA, " << ptn->width() << " x " << ptn->height();
|
||||
}
|
||||
else {
|
||||
oss << (ptn->isSubtitle() ? "Subtitle " : "Free text") << std::endl;
|
||||
oss << "RGBA" << std::endl;
|
||||
oss << ptn->width() << " x " << ptn->height();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
oss << "Undefined";
|
||||
|
||||
information_ = oss.str();
|
||||
current_id_ = s.id();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user