|
NVIDIA DeepStream SDK API Reference
|
8.0 Release
|
Go to the documentation of this file.
26 #ifndef NVIDIA_DEEPSTREAM_OBJECT
27 #define NVIDIA_DEEPSTREAM_OBJECT
30 #include "yaml-cpp/yaml.h"
57 Value(
unsigned char value);
59 Value(
unsigned int value);
61 Value(
unsigned long value);
64 Value(
const std::string value);
65 Value(
const char* value);
74 operator char()
const;
75 operator unsigned char()
const;
77 operator unsigned int()
const;
78 operator long()
const;
79 operator unsigned long()
const;
80 operator float()
const;
81 operator double()
const;
82 operator std::string()
const;
83 operator const char*()
const;
84 operator bool()
const;
97 Value(
unsigned long,
int);
110 Object(
unsigned long type_id,
const std::string& name);
128 const std::string
getName()
const;
131 explicit operator bool () const noexcept {
return object_ !=
nullptr; }
155 this->
set_(name, value);
160 template<
typename T,
typename... Args>
161 Object&
set(
const std::string& name,
const T& value,
const Args&... args) {
163 if constexpr (
sizeof...(args) > 0) {
170 template<
typename T,
typename... Args>
172 value = (T)
get_(name);
173 if constexpr (
sizeof...(args) > 0) {
180 std::vector<std::string>
listSignals(
bool is_action);
192 void emitSignal(
const std::string&signal_name, va_list args);
195 static unsigned long type();
200 virtual void set_(
const std::string& name,
const Value& value);
201 virtual void set_(
const std::string& name,
const YAML::Node& value);
202 virtual Value get_(
const std::string&name);
Object & set(const std::string &name, const T &value, const Args &... args)
bool isUnsignedInteger() const
bool isUnsignedChar() const
Value wrapper for various types.
Object & set(const YAML::Node ¶ms)
Set the properties from key/value pairs in the yaml format.
Element class definition.
virtual void set_(const std::string &name, const Value &value)
struct _GstObject GstObject
Pipeline class definition.
static unsigned long type()
Return the object's type id.
bool connectSignal(const std::string &signal_name, SignalHandler &handler)
Connect a signal handler to the object.
Object & operator=(const Object &)
Copy assignment.
Object & set(const std::string &name, const Value &value)
Object & seize(GstObject *object)
Seize a opaque object to prevent it from being destroyed somewhere.
Object & take(GstObject *object)
Takes the ownership of a object through the opaque pointer.
GstObject * getGObject()
Return the opaque object pointer.
Value & operator=(const Value &other)
Object()
Constructor of a void object.
const std::string getName() const
Return the name assigned during the construction.
GstObject * give()
Give up the ownership and return the opaque pointer.
void emitSignal(const std::string &signal_name, va_list args)
Emit a signal.
bool operator==(const Object &other) noexcept
Check if the two objects are the same.
virtual Value get_(const std::string &name)
virtual ~Object()
Destructor.
std::vector< std::string > listSignals(bool is_action)
List all the supported signals from the object.
Object & getProperty(const std::string &name, T &value, Args &... args)
Template for getting multiple properties.