NVIDIA DeepStream SDK API Reference
9.2 Release
service-maker/sources/python/src/bindings/object.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 "objectdoc.h"
19
20
class
CommonFactoryWrapper
{
21
public
:
22
static
unique_ptr<CustomObject>
create
(
const
string
&
plugin
,
const
string
& name) {
23
return
CommonFactory::getInstance().createObject(
plugin
, name);
24
}
25
};
26
27
void
module_object_bind
(py::module &m);
28
29
void
module_object_bind
(py::module &m) {
30
py::class_<CustomObject>(m,
"Object"
,
pydeepstreamdoc::object::ObjectDoc::descr
)
31
.def(
"set"
, [](CustomObject&
self
, py::dict args){
32
for
(
auto
item : args) {
33
string
key = item.first.cast<
string
>();
34
Object::Value value = item.second.cast<Object::Value>();
35
self
.set(key, value);
36
}
37
},
pydeepstreamdoc::object::ObjectDoc::set
);
38
py::class_<CommonFactoryWrapper>(m,
"CommonFactory"
,
pydeepstreamdoc::object::CommonFactoryDoc::descr
)
39
.def(
"create"
, &
CommonFactoryWrapper::create
,
pydeepstreamdoc::object::CommonFactoryDoc::create
);
40
}
CommonFactoryWrapper::create
static unique_ptr< CustomObject > create(const string &plugin, const string &name)
Definition:
service-maker/sources/python/src/bindings/object.h:22
pydeepstreamdoc::object::ObjectDoc::set
constexpr const char * set
Definition:
service-maker/sources/python/src/bindings/docstrings/objectdoc.h:27
pydeepstreamdoc::object::ObjectDoc::descr
constexpr const char * descr
Definition:
service-maker/sources/python/src/bindings/docstrings/objectdoc.h:26
plugin
Definition:
includes/opentelemetry/plugin/dynamic_load.h:19
pydeepstreamdoc::object::CommonFactoryDoc::create
constexpr const char * create
Definition:
service-maker/sources/python/src/bindings/docstrings/objectdoc.h:33
CommonFactoryWrapper
Definition:
service-maker/sources/python/src/bindings/object.h:20
pydeepstreamdoc::object::CommonFactoryDoc::descr
constexpr const char * descr
Definition:
service-maker/sources/python/src/bindings/docstrings/objectdoc.h:32
module_object_bind
void module_object_bind(py::module &m)
Definition:
service-maker/sources/python/src/bindings/object.h:29
Privacy Policy
|
Your Privacy Choices
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
NVIDIA Confidential | Subject to Change | For test and development only.
Wed Oct 28 2026 12:02:33 | PR-09318-R32