|
NVIDIA DeepStream SDK API Reference
|
8.0 Release
|
Go to the documentation of this file.
92 inline const std::string&
getUri()
const {
return uri_; }
122 Pipeline(
const char* name,
const std::string& config_file);
128 template<
typename... Args>
129 Pipeline&
add(
const std::string& element_type,
const std::string& element_name,
const Args&... args) {
131 if constexpr (
sizeof...(args) > 0) {
132 element.
set(args...);
134 return this->
add(element);
147 throw std::runtime_error(name +
" Not found");
159 std::pair<std::string, std::string> route,
160 std::pair<std::string, std::string> tips
164 template <
typename... Args>
165 Pipeline &
link(
const std::string &arg1,
const std::string arg2,
const Args &...args)
167 link(std::make_pair(arg1, arg2), std::make_pair(
"",
""));
168 if constexpr (
sizeof...(args) > 0) {
169 return this->
link(arg2, args...);
199 const std::string& element_name,
200 const std::string& plugin_name,
201 const std::string& object_name,
202 const std::string tip=
"");
205 template<
typename... Args>
207 const std::string& element_name,
208 const std::string& plugin_name,
209 const std::string& object_name,
210 const std::string tip,
211 const Args&... args) {
212 attach(element_name, plugin_name, object_name, tip);
213 if (
sizeof...(args) > 0) {
214 auto& element = (*this)[element_name];
215 if (
auto handler = element.getSignalHandler(object_name)) {
216 handler->set(args...);
217 }
else if (
auto probe = element.getProbe(object_name)) {
233 int prepare(std::function<
void(
Pipeline &,
const Message &)> listener);
257 uint32_t
startRTSP(uint16_t rtsp_port, uint16_t udp_port, uint32_t buffer_size=0);
Pipeline message on state transition.
Base class for all the custom objects.
const std::string & getName() const
Object & set(const YAML::Node ¶ms)
Set the properties from key/value pairs in the yaml format.
Element class definition.
std::function< void(Pipeline &, int key)> keyboard_listener_
int prepare()
Intialize the pipeline.
Pipeline & add(const std::string &element_type, const std::string &element_name, const Args &... args)
Template function for creating and adding element with properties.
StateTransitionMessage(void *)
const std::string & getSensorName() const
Pipeline class definition.
Pipeline & install(std::function< void(Pipeline &, int key)> keyboard_listener)
install a callback to capture keyboard events
const std::string & getSensorId() const
std::map< std::string, std::unique_ptr< SignalEmitter > > action_owners_
void getState(State &old_state, State &new_state) const
Pipeline & link(std::pair< std::string, std::string > route, std::pair< std::string, std::string > tips)
Link two elements within the pipeline.
Pipeline & attach(const std::string &elmenent_name, CustomObject *object, const std::string tip="")
Attach a custom object to an element within the pipeline.
uint32_t getSourceId() const
Element & operator[](const std::string &name)
Operator for accessing elements in a pipeline.
base class for pipeline message
Element * find(const ::std::string &name)
Find an element within the pipeline by name.
Pipeline & wait()
Wait until the pipeline ends.
uint32_t startRTSP(uint16_t rtsp_port, uint16_t udp_port, uint32_t buffer_size=0)
Start an RTSP server.
virtual ~Pipeline()
Destructor.
Pipeline & start()
Start the pipeline.
Pipeline & resume()
Resume the pipeline.
Pipeline & activate()
Start the pipeline after it is already intialized.
Pipeline & pause()
Pause the pipeline.
std::map< std::string, Element > elements_
DynamicSourceMessage(void *)
Pipeline & seek(uint64_t timestamp)
Seek to a specified position for processing data within the pipeline.
Pipeline & stop()
Stop the pipeline.
Pipeline & link(const std::string &arg1, const std::string arg2, const Args &...args)
Template function for linking elements in the simplest way.
Pipeline message on source add/remove.
const std::string & getUri() const
bool isSourceAdded() const
Pipeline & attach(const std::string &element_name, const std::string &plugin_name, const std::string &object_name, const std::string tip, const Args &... args)
Template function for creating and attaching custom object with properties.