commit
0be6208839
|
@ -38,6 +38,7 @@ typedef std::vector<std::string> OBSImporterFiles;
|
||||||
|
|
||||||
class Importer {
|
class Importer {
|
||||||
public:
|
public:
|
||||||
|
virtual ~Importer() {}
|
||||||
virtual std::string Prog() { return "Null"; };
|
virtual std::string Prog() { return "Null"; };
|
||||||
virtual int ImportScenes(const std::string &path, std::string &name,
|
virtual int ImportScenes(const std::string &path, std::string &name,
|
||||||
json11::Json &res) = 0;
|
json11::Json &res) = 0;
|
||||||
|
|
|
@ -2600,12 +2600,13 @@ static inline void copy_frame_data_plane(struct obs_source_frame *dst,
|
||||||
const struct obs_source_frame *src,
|
const struct obs_source_frame *src,
|
||||||
uint32_t plane, uint32_t lines)
|
uint32_t plane, uint32_t lines)
|
||||||
{
|
{
|
||||||
if (dst->linesize[plane] != src->linesize[plane])
|
if (dst->linesize[plane] != src->linesize[plane]) {
|
||||||
for (uint32_t y = 0; y < lines; y++)
|
for (uint32_t y = 0; y < lines; y++)
|
||||||
copy_frame_data_line(dst, src, plane, y);
|
copy_frame_data_line(dst, src, plane, y);
|
||||||
else
|
} else {
|
||||||
memcpy(dst->data[plane], src->data[plane],
|
memcpy(dst->data[plane], src->data[plane],
|
||||||
dst->linesize[plane] * lines);
|
(size_t)dst->linesize[plane] * (size_t)lines);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void copy_frame_data(struct obs_source_frame *dst,
|
static void copy_frame_data(struct obs_source_frame *dst,
|
||||||
|
|
|
@ -236,7 +236,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
OBSSignal(const OBSSignal &) = delete;
|
OBSSignal(const OBSSignal &) = delete;
|
||||||
OBSSignal(OBSSignal &&other)
|
OBSSignal(OBSSignal &&other) noexcept
|
||||||
: handler(other.handler),
|
: handler(other.handler),
|
||||||
signal(other.signal),
|
signal(other.signal),
|
||||||
callback(other.callback),
|
callback(other.callback),
|
||||||
|
@ -249,7 +249,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
OBSSignal &operator=(const OBSSignal &) = delete;
|
OBSSignal &operator=(const OBSSignal &) = delete;
|
||||||
OBSSignal &operator=(OBSSignal &&other)
|
OBSSignal &operator=(OBSSignal &&other) noexcept
|
||||||
{
|
{
|
||||||
Disconnect();
|
Disconnect();
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "bmem.h"
|
#include "bmem.h"
|
||||||
#include "config-file.h"
|
#include "config-file.h"
|
||||||
|
@ -36,7 +37,7 @@ template<typename T> class BPtr {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline BPtr(T *p = nullptr) : ptr(p) {}
|
inline BPtr(T *p = nullptr) : ptr(p) {}
|
||||||
inline BPtr(BPtr &&other) : ptr(other.ptr) { other.ptr = nullptr; }
|
inline BPtr(BPtr &&other) { *this = std::move(other); }
|
||||||
inline ~BPtr() { bfree(ptr); }
|
inline ~BPtr() { bfree(ptr); }
|
||||||
|
|
||||||
inline T *operator=(T *p)
|
inline T *operator=(T *p)
|
||||||
|
@ -45,6 +46,14 @@ public:
|
||||||
ptr = p;
|
ptr = p;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline BPtr &operator=(BPtr &&other)
|
||||||
|
{
|
||||||
|
ptr = other.ptr;
|
||||||
|
other.ptr = nullptr;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
inline operator T *() { return ptr; }
|
inline operator T *() { return ptr; }
|
||||||
inline T **operator&()
|
inline T **operator&()
|
||||||
{
|
{
|
||||||
|
@ -68,7 +77,7 @@ class ConfigFile {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline ConfigFile() : config(NULL) {}
|
inline ConfigFile() : config(NULL) {}
|
||||||
inline ConfigFile(ConfigFile &&other) : config(other.config)
|
inline ConfigFile(ConfigFile &&other) noexcept : config(other.config)
|
||||||
{
|
{
|
||||||
other.config = nullptr;
|
other.config = nullptr;
|
||||||
}
|
}
|
||||||
|
@ -120,7 +129,7 @@ class TextLookup {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline TextLookup(lookup_t *lookup = nullptr) : lookup(lookup) {}
|
inline TextLookup(lookup_t *lookup = nullptr) : lookup(lookup) {}
|
||||||
inline TextLookup(TextLookup &&other) : lookup(other.lookup)
|
inline TextLookup(TextLookup &&other) noexcept : lookup(other.lookup)
|
||||||
{
|
{
|
||||||
other.lookup = nullptr;
|
other.lookup = nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@ public:
|
||||||
{
|
{
|
||||||
Clear();
|
Clear();
|
||||||
ptr = val;
|
ptr = val;
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline T **operator&()
|
inline T **operator&()
|
||||||
|
|
Loading…
Reference in New Issue