New upstream version 18.0.1+dfsg1

This commit is contained in:
Sebastian Ramacher 2017-04-15 21:02:06 +02:00
parent 6efda2859e
commit a03541a0f8
763 changed files with 69366 additions and 2632 deletions

View file

@ -0,0 +1,36 @@
#pragma once
#include <obs.hpp>
#include <string>
#include <QString>
static inline OBSWeakSource GetWeakSourceByName(const char *name)
{
OBSWeakSource weak;
obs_source_t *source = obs_get_source_by_name(name);
if (source) {
weak = obs_source_get_weak_source(source);
obs_weak_source_release(weak);
obs_source_release(source);
}
return weak;
}
static inline OBSWeakSource GetWeakSourceByQString(const QString &name)
{
return GetWeakSourceByName(name.toUtf8().constData());
}
static inline std::string GetWeakSourceName(obs_weak_source_t *weak_source)
{
std::string name;
obs_source_t *source = obs_weak_source_get_source(weak_source);
if (source) {
name = obs_source_get_name(source);
obs_source_release(source);
}
return name;
}