NVIDIA DeepStream SDK API Reference

8.0 Release
deepstream::Object Class Reference

Detailed Description

Base Object class.

Definition at line 44 of file object.hpp.

Inheritance diagram for deepstream::Object:

Data Structures

class  Value
 Value wrapper for various types. More...
 

Public Member Functions

 Object ()
 Constructor of a void object. More...
 
 Object (unsigned long type_id, const std::string &name)
 Create an object from a type id. More...
 
 Object (const Object &)
 Copy constructor. More...
 
 Object (Object &&)
 Move constructor. More...
 
Objectoperator= (const Object &)
 Copy assignment. More...
 
Objectoperator= (Object &&)
 Move assignment. More...
 
virtual ~Object ()
 Destructor. More...
 
const std::string getName () const
 Return the name assigned during the construction. More...
 
 operator bool () const noexcept
 Check if the object is void. More...
 
bool operator== (const Object &other) noexcept
 Check if the two objects are the same. More...
 
GstObjectgive ()
 Give up the ownership and return the opaque pointer. More...
 
GstObjectgetGObject ()
 Return the opaque object pointer. More...
 
Objecttake (GstObject *object)
 Takes the ownership of a object through the opaque pointer. More...
 
Objectseize (GstObject *object)
 Seize a opaque object to prevent it from being destroyed somewhere. More...
 
Objectset (const YAML::Node &params)
 Set the properties from key/value pairs in the yaml format. More...
 
Objectset (const std::string &name, const Value &value)
 
template<typename T , typename... Args>
Objectset (const std::string &name, const T &value, const Args &... args)
 
template<typename T , typename... Args>
ObjectgetProperty (const std::string &name, T &value, Args &... args)
 Template for getting multiple properties. More...
 
std::vector< std::string > listSignals (bool is_action)
 List all the supported signals from the object. More...
 
bool connectSignal (const std::string &signal_name, SignalHandler &handler)
 Connect a signal handler to the object. More...
 
void emitSignal (const std::string &signal_name, va_list args)
 Emit a signal. More...
 

Static Public Member Functions

static unsigned long type ()
 Return the object's type id. More...
 

Protected Member Functions

virtual void set_ (const std::string &name, const Value &value)
 
virtual void set_ (const std::string &name, const YAML::Node &value)
 
virtual Value get_ (const std::string &name)
 

Protected Attributes

GstObjectobject_
 

Friends

class Pipeline
 
class Element
 

Constructor & Destructor Documentation

◆ Object() [1/4]

deepstream::Object::Object ( )

Constructor of a void object.

◆ Object() [2/4]

deepstream::Object::Object ( unsigned long  type_id,
const std::string &  name 
)

Create an object from a type id.

Parameters
[in]namename to be assigned to the object instance

◆ Object() [3/4]

deepstream::Object::Object ( const Object )

Copy constructor.

◆ Object() [4/4]

deepstream::Object::Object ( Object &&  )

Move constructor.

◆ ~Object()

virtual deepstream::Object::~Object ( )
virtual

Destructor.

Member Function Documentation

◆ connectSignal()

bool deepstream::Object::connectSignal ( const std::string &  signal_name,
SignalHandler handler 
)

Connect a signal handler to the object.

Parameters
[in]signal_namename of the signal to be connected
[in]handlerhandler for the signal

◆ emitSignal()

void deepstream::Object::emitSignal ( const std::string &  signal_name,
va_list  args 
)

Emit a signal.

◆ get_()

virtual Value deepstream::Object::get_ ( const std::string &  name)
protectedvirtual

Reimplemented in deepstream::CustomObject.

Referenced by getProperty().

◆ getGObject()

GstObject* deepstream::Object::getGObject ( )
inline

Return the opaque object pointer.

Definition at line 140 of file object.hpp.

References object_.

◆ getName()

const std::string deepstream::Object::getName ( ) const

Return the name assigned during the construction.

◆ getProperty()

template<typename T , typename... Args>
Object& deepstream::Object::getProperty ( const std::string &  name,
T &  value,
Args &...  args 
)
inline

◆ give()

GstObject* deepstream::Object::give ( )

Give up the ownership and return the opaque pointer.

◆ listSignals()

std::vector<std::string> deepstream::Object::listSignals ( bool  is_action)

List all the supported signals from the object.

◆ operator bool()

deepstream::Object::operator bool ( ) const
inlineexplicitnoexcept

Check if the object is void.

Definition at line 131 of file object.hpp.

References object_.

◆ operator=() [1/2]

Object& deepstream::Object::operator= ( const Object )

Copy assignment.

◆ operator=() [2/2]

Object& deepstream::Object::operator= ( Object &&  )

Move assignment.

◆ operator==()

bool deepstream::Object::operator== ( const Object other)
inlinenoexcept

Check if the two objects are the same.

Definition at line 134 of file object.hpp.

References object_.

◆ seize()

Object& deepstream::Object::seize ( GstObject object)

Seize a opaque object to prevent it from being destroyed somewhere.

◆ set() [1/3]

template<typename T , typename... Args>
Object& deepstream::Object::set ( const std::string &  name,
const T &  value,
const Args &...  args 
)
inline

Definition at line 161 of file object.hpp.

References set(), and set_().

◆ set() [2/3]

Object& deepstream::Object::set ( const std::string &  name,
const Value value 
)
inline

Definition at line 154 of file object.hpp.

References set_().

◆ set() [3/3]

Object& deepstream::Object::set ( const YAML::Node &  params)

Set the properties from key/value pairs in the yaml format.

Referenced by deepstream::Pipeline::add(), and set().

◆ set_() [1/2]

virtual void deepstream::Object::set_ ( const std::string &  name,
const Value value 
)
protectedvirtual

Reimplemented in deepstream::CustomObject.

Referenced by set().

◆ set_() [2/2]

virtual void deepstream::Object::set_ ( const std::string &  name,
const YAML::Node &  value 
)
protectedvirtual

Reimplemented in deepstream::CustomObject.

◆ take()

Object& deepstream::Object::take ( GstObject object)

Takes the ownership of a object through the opaque pointer.

◆ type()

static unsigned long deepstream::Object::type ( )
static

Return the object's type id.

Friends And Related Function Documentation

◆ Element

friend class Element
friend

Definition at line 205 of file object.hpp.

Referenced by deepstream::Pipeline::add().

◆ Pipeline

friend class Pipeline
friend

Definition at line 204 of file object.hpp.

Field Documentation

◆ object_

GstObject* deepstream::Object::object_
protected

Definition at line 198 of file object.hpp.

Referenced by getGObject(), operator bool(), and operator==().


The documentation for this class was generated from the following file: