obs/tools: Remove more legacy tools

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-05-28 19:40:31 +02:00
parent 39548e760d
commit fc693e0210
2 changed files with 0 additions and 58 deletions

View file

@ -110,21 +110,3 @@ bool streamfx::obs::tools::source_find_source(::streamfx::obs::source haystack,
return false;
}
streamfx::obs::tools::child_source::child_source(obs_source_t* parent, std::shared_ptr<obs_source_t> child)
: _parent(parent), _child(child)
{
if (!obs_source_add_active_child(_parent, _child.get())) {
throw std::runtime_error("recursion detected");
}
}
streamfx::obs::tools::child_source::~child_source()
{
obs_source_remove_active_child(_parent, _child.get());
}
std::shared_ptr<obs_source_t> streamfx::obs::tools::child_source::get()
{
return _child;
}

View file

@ -24,46 +24,6 @@
namespace streamfx::obs {
namespace tools {
bool source_find_source(::streamfx::obs::source haystack, ::streamfx::obs::source needle);
class child_source {
obs_source_t* _parent;
std::shared_ptr<obs_source_t> _child;
public:
child_source(obs_source_t* parent, std::shared_ptr<obs_source_t> child);
virtual ~child_source();
std::shared_ptr<obs_source_t> get();
};
// Class to manage
class active_source {
obs_source_t* _child;
public:
active_source(obs_source_t* child) : _child(child)
{
obs_source_inc_active(_child);
}
virtual ~active_source()
{
obs_source_dec_active(_child);
}
};
class visible_source {
obs_source_t* _child;
public:
visible_source(obs_source_t* child) : _child(child)
{
obs_source_inc_showing(_child);
}
virtual ~visible_source()
{
obs_source_dec_showing(_child);
}
};
} // namespace tools
inline void obs_source_deleter(obs_source_t* v)