Code editor for Custom pattern gstreamer

Bugfix in Streamsource and UI
This commit is contained in:
Bruno Herbelin
2022-01-01 23:59:30 +01:00
parent f0ca13150f
commit 4426f70de7
8 changed files with 109 additions and 116 deletions

View File

@@ -45,7 +45,7 @@ GenericStreamSource::GenericStreamSource(uint64_t id) : StreamSource(id)
void GenericStreamSource::setDescription(const std::string &desc)
{
gst_description_ = BaseToolkit::unwrapped(desc);
gst_description_ = desc;
gst_elements_ = BaseToolkit::splitted(desc, '!');
Log::Notify("Creating Source with Stream description '%s'", gst_description_.c_str());
@@ -82,6 +82,8 @@ glm::ivec2 GenericStreamSource::icon() const
std::string GenericStreamSource::info() const
{
if (gst_elements_.empty())
return "Gstreamer custom pipeline without source";
std::string src_element = gst_elements_.front();
src_element = src_element.substr(0, src_element.find(" "));
return std::string("Gstreamer custom pipeline with source '")+src_element+"'";