NVIDIA DeepStream SDK API Reference

9.2 Release
sources/gst-plugins/gst-nvtiler/INvTiler.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-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  */
36 #ifndef _INVTILER_H_
37 #define _INVTILER_H_
38 
39 #include <stdint.h>
40 #include <stdbool.h>
41 #include <vector>
42 #include <map>
43 #include <cstdint>
44 #include <cstdio>
45 #include "nvbufsurface.h"
46 #include "nvdsmeta.h"
47 #include "nvdstilerconfig.h"
48 
49 class INvTiler
50 {
51  public:
52 
60  virtual bool Init(TilerConfig config) = 0;
61 
72  virtual bool Composite(NvBufSurface* inputBuffer,
73  NvDsBatchMeta* inputBufferMeta,
74  NvBufSurface* outputBuffer,
75  NvBufSurface* tilerScratchBuffer,
76  uint32_t gpuId,
77  int32_t compute_hw,
78  int32_t interpolation_method) = 0;
86  virtual bool AdjustOutputMeta(NvDsBatchMeta* outputBatchMeta) = 0;
87 
88  virtual uint32_t GetTileWidth(uint32_t sourceId) = 0;
89 
90  virtual uint32_t GetTileHeight(uint32_t sourceId) = 0;
91 
92  virtual void SyncObjWait() = 0;
93 
97  virtual void Deinit() = 0;
98 
107  virtual bool SetSingleSourceMode(bool on, int32_t sourceId=-1) = 0;
108 
115  virtual void DeleteSource(int32_t sourceId) = 0;
116 
120  virtual bool SetSquareGridMode(bool squareGrid) = 0;
121 
125  virtual bool SetTilerMap(std::map<uint32_t, uint32_t> *tiler_map, GMutex *tiler_map_lock) = 0;
126 
127  virtual ~INvTiler(){}
128 };
129 
130 #endif
INvTiler::DeleteSource
virtual void DeleteSource(int32_t sourceId)=0
Delete a source for which a Composite() was done before This API ensure all cache'd metadata for this...
INvTiler
@dev-note: Tiler Composition Steps: 1) Extract GstNvStreamMeta from the input muxed buffer 2) loop fo...
Definition: sources/gst-plugins/gst-nvtiler/INvTiler.h:49
NvBufSurface
Holds information about batched buffers.
Definition: includes/nvbufsurface.h:602
INvTiler::GetTileHeight
virtual uint32_t GetTileHeight(uint32_t sourceId)=0
INvTiler::SyncObjWait
virtual void SyncObjWait()=0
INvTiler::Init
virtual bool Init(TilerConfig config)=0
Initialize or re-initialize the Tiler.
INvTiler::SetTilerMap
virtual bool SetTilerMap(std::map< uint32_t, uint32_t > *tiler_map, GMutex *tiler_map_lock)=0
Pass ptr to the map of <source_id, tile_index> with its lock.
INvTiler::Composite
virtual bool Composite(NvBufSurface *inputBuffer, NvDsBatchMeta *inputBufferMeta, NvBufSurface *outputBuffer, NvBufSurface *tilerScratchBuffer, uint32_t gpuId, int32_t compute_hw, int32_t interpolation_method)=0
TilerComposite helps composite an input batch onto outputBuffer.
INvTiler::~INvTiler
virtual ~INvTiler()
Definition: sources/gst-plugins/gst-nvtiler/INvTiler.h:127
TilerConfig
Holds the Tiler Canvas Configuration Note: The user cannot directly set this on nvmultistreamtiler Us...
Definition: includes/nvdstilerconfig.h:83
INvTiler::AdjustOutputMeta
virtual bool AdjustOutputMeta(NvDsBatchMeta *outputBatchMeta)=0
Scale every bounding box meta to match tile resolution.
_NvDsBatchMeta
Holds information about a formed batch containing frames from different sources.
Definition: includes/nvdsmeta.h:264
INvTiler::SetSingleSourceMode
virtual bool SetSingleSourceMode(bool on, int32_t sourceId=-1)=0
Set ON/OFF the single source mode.
INvTiler::GetTileWidth
virtual uint32_t GetTileWidth(uint32_t sourceId)=0
INvTiler::Deinit
virtual void Deinit()=0
Deinitialize the Tiler.
INvTiler::SetSquareGridMode
virtual bool SetSquareGridMode(bool squareGrid)=0
Set Tiles based on square Grid.