|
|
NVIDIA DeepStream SDK API Reference
|
9.1 Release
|
Go to the documentation of this file.
31 #ifndef NVIDIA_DEEPSTREAM_OBJECT
32 #define NVIDIA_DEEPSTREAM_OBJECT
35 #include "yaml-cpp/yaml.h"
62 Value(
unsigned char value);
64 Value(
unsigned int value);
66 Value(
unsigned long value);
69 Value(
const std::string value);
70 Value(
const char* value);
79 operator char()
const;
80 operator unsigned char()
const;
82 operator unsigned int()
const;
83 operator long()
const;
84 operator unsigned long()
const;
85 operator float()
const;
86 operator double()
const;
87 operator std::string()
const;
88 operator const char*()
const;
89 operator bool()
const;
102 Value(
unsigned long,
int);
115 Object(
unsigned long type_id,
const std::string& name);
133 const std::
string getName() const;
136 explicit operator
bool () const noexcept {
return object_ !=
nullptr; }
160 this->
set_(name, value);
165 template<
typename T,
typename... Args>
166 Object&
set(
const std::string& name,
const T& value,
const Args&... args) {
168 if constexpr (
sizeof...(args) > 0) {
175 template<
typename T,
typename... Args>
177 value = (T)
get_(name);
178 if constexpr (
sizeof...(args) > 0) {
185 std::vector<std::string>
listSignals(
bool is_action);
197 void emitSignal(
const std::string&signal_name, va_list args);
200 static unsigned long type();
205 virtual void set_(
const std::string& name,
const Value& value);
206 virtual void set_(
const std::string& name,
const YAML::Node& value);
207 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)
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 & 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)
struct _GstObject GstObject
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.