NVIDIA DeepStream SDK API Reference

8.0 Release
deepstream::SourceManager Class Reference

Detailed Description

Definition at line 46 of file source_manager.hpp.

Inheritance diagram for deepstream::SourceManager:
Collaboration diagram for deepstream::SourceManager:

Public Member Functions

 SourceManager (const std::string &name)
 Constructor. More...
 
int addSource (const std::string &source_name)
 Add a source to the manager. More...
 
void removeSource (int source_id)
 Remove a source from the manager. More...
 
void terminate ()
 Terminate the pipeline. More...
 
SignalEmitterattach (const std::string &action_name, Object &object)
 Attach the signal emitter to an object on specified action. More...
 
SignalEmitteremit (const std::string &action_name, const std::string &object_name,...)
 Emit the action by name. 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 type id assigned to signal emitter. 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

std::multimap< std::string, Objectobject_map_
 
std::unique_ptr< IActionOwnerowner_
 
std::string param_spec_
 property spec in YAML format More...
 
std::map< std::string, Object::Valueproperties_
 property map More...
 
GstObjectobject_
 

Static Protected Attributes

static int gen_number_
 
static std::mutex gen_number_mutex_
 

Constructor & Destructor Documentation

◆ SourceManager()

deepstream::SourceManager::SourceManager ( const std::string &  name)
inline

Constructor.

Create a source manager with a user implemented action owner interface

Parameters
[in]namename of the instance

Definition at line 55 of file source_manager.hpp.

Member Function Documentation

◆ addSource()

int deepstream::SourceManager::addSource ( const std::string &  source_name)

Add a source to the manager.

Parameters
[in]source_namename of the source to be added
Returns
int a unique ID for the source, -1 if failed

◆ attach()

SignalEmitter& deepstream::SignalEmitter::attach ( const std::string &  action_name,
Object object 
)
inherited

Attach the signal emitter to an object on specified action.

◆ connectSignal()

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

Connect a signal handler to the object.

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

◆ emit()

SignalEmitter& deepstream::SignalEmitter::emit ( const std::string &  action_name,
const std::string &  object_name,
  ... 
)
inherited

Emit the action by name.

Parameters
[in]action_namename of the action to be triggered
[in]object_namename of the attached object who is to trigger the action

Referenced by deepstream::SmartRecordingAction::startSmartRecord(), and deepstream::SmartRecordingAction::stopSmartRecord().

◆ emitSignal()

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

Emit a signal.

◆ get_()

virtual Value deepstream::CustomObject::get_ ( const std::string &  name)
protectedvirtualinherited

Reimplemented from deepstream::Object.

◆ getGObject()

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

Return the opaque object pointer.

Definition at line 140 of file object.hpp.

References deepstream::Object::object_.

◆ getName()

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

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 
)
inlineinherited

◆ give()

GstObject* deepstream::Object::give ( )
inherited

Give up the ownership and return the opaque pointer.

◆ listSignals()

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

List all the supported signals from the object.

◆ operator bool()

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

Check if the object is void.

Definition at line 131 of file object.hpp.

References deepstream::Object::object_.

◆ operator==()

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

Check if the two objects are the same.

Definition at line 134 of file object.hpp.

References deepstream::Object::object_.

◆ removeSource()

void deepstream::SourceManager::removeSource ( int  source_id)

Remove a source from the manager.

Parameters
[in]source_idID of the source to be removed

◆ seize()

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

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 
)
inlineinherited

Definition at line 161 of file object.hpp.

References deepstream::Object::set(), and deepstream::Object::set_().

◆ set() [2/3]

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

Definition at line 154 of file object.hpp.

References deepstream::Object::set_().

◆ set() [3/3]

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

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

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

◆ set_() [1/2]

virtual void deepstream::CustomObject::set_ ( const std::string &  name,
const Value value 
)
protectedvirtualinherited

Reimplemented from deepstream::Object.

◆ set_() [2/2]

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

Reimplemented from deepstream::Object.

◆ take()

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

Takes the ownership of a object through the opaque pointer.

◆ terminate()

void deepstream::SourceManager::terminate ( )

Terminate the pipeline.

◆ type()

static unsigned long deepstream::SignalEmitter::type ( )
staticinherited

Return the type id assigned to signal emitter.

Field Documentation

◆ gen_number_

int deepstream::SourceManager::gen_number_
staticprotected

Definition at line 79 of file source_manager.hpp.

◆ gen_number_mutex_

std::mutex deepstream::SourceManager::gen_number_mutex_
staticprotected

Definition at line 80 of file source_manager.hpp.

◆ object_

GstObject* deepstream::Object::object_
protectedinherited

◆ object_map_

std::multimap<std::string, Object> deepstream::SignalEmitter::object_map_
protectedinherited

Definition at line 103 of file signal_emitter.hpp.

◆ owner_

std::unique_ptr<IActionOwner> deepstream::SignalEmitter::owner_
protectedinherited

Definition at line 104 of file signal_emitter.hpp.

◆ param_spec_

std::string deepstream::CustomObject::param_spec_
protectedinherited

property spec in YAML format

Definition at line 51 of file custom_object.hpp.

◆ properties_

std::map<std::string, Object::Value> deepstream::CustomObject::properties_
protectedinherited

property map

Definition at line 53 of file custom_object.hpp.


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