NVIDIA DeepStream SDK API Reference

9.2 Release
service-maker/sources/python/src/bindings/signal_emitter.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include "signalemitterdoc.h"
19 
20 void module_signal_bind(py::module &m);
21 
22 void module_signal_bind(py::module &m) {
23  py::module signal_module = m.def_submodule("signal");
24  py::class_<SignalEmitter, CustomObject>(signal_module, "Emitter", pydeepstreamdoc::signalemitter::EmitterDoc::descr)
25  .def("attach", [](SignalEmitter& self, string action, Node& node) {
26  self.attach(action, node);
28  py::class_<SourceManager, SignalEmitter>(signal_module, "SourceManager", pydeepstreamdoc::signalemitter::SourceManagerDoc::descr)
29  .def(py::init<string>())
30  .def("add_source", &SourceManager::addSource, py::call_guard<py::gil_scoped_release>(), pydeepstreamdoc::signalemitter::SourceManagerDoc::add_source)
31  .def("remove_source", &SourceManager::removeSource, py::call_guard<py::gil_scoped_release>(), pydeepstreamdoc::signalemitter::SourceManagerDoc::remove_source)
32  .def("terminate", &SourceManager::terminate, py::call_guard<py::gil_scoped_release>(), pydeepstreamdoc::signalemitter::SourceManagerDoc::terminate);
33 }
pydeepstreamdoc::signalemitter::EmitterDoc::descr
constexpr const char * descr
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:26
pydeepstreamdoc::signalemitter::SourceManagerDoc::remove_source
constexpr const char * remove_source
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:44
pydeepstreamdoc::signalemitter::SourceManagerDoc::terminate
constexpr const char * terminate
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:47
pydeepstreamdoc::signalemitter::EmitterDoc::attach
constexpr const char * attach
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:30
Node
Definition: service-maker/sources/python/src/bindings/node.h:20
module_signal_bind
void module_signal_bind(py::module &m)
Definition: service-maker/sources/python/src/bindings/signal_emitter.h:22
pydeepstreamdoc::signalemitter::SourceManagerDoc::descr
constexpr const char * descr
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:39
pydeepstreamdoc::signalemitter::SourceManagerDoc::add_source
constexpr const char * add_source
Definition: service-maker/sources/python/src/bindings/docstrings/signalemitterdoc.h:40