NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 Release
For Test and Development only
NvSIPLPipelineMgr.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef NVSIPLPIPELINEMGR_HPP
12 #define NVSIPLPIPELINEMGR_HPP
13 
14 #include "NvSIPLCommon.hpp"
15 #include "NvSIPLClient.hpp"
16 
17 #include "nvmedia_image.h"
18 #include "nvmedia_surface.h"
19 
20 #include <cstdint>
21 #include <vector>
22 
31 namespace nvsipl
32 {
33 
47 enum PluginType {
48  NV_PLUGIN = 0,
51 };
52 
63 {
64 public:
67  {
76 
86 
104 
107  };
108 
112  {
116  std::uint32_t uIndex;
118  std::uint64_t frameCaptureTSC;
119  };
120 
131  virtual void OnEvent(NotificationData &oNotificationData)
132  {
133  return;
134  }
135 
137  virtual ~NvSIPLPipelineNotifier(void) = default;
138 };
139 
157 {
158 public:
160  struct RawBuffer
161  {
165  std::uint32_t uIndex;
168  };
169 
181  virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer) = 0;
182 
184  virtual ~NvSIPLImageGroupWriter(void) = default;
185 };
186 
193 
195  std::vector<NvMediaSurfAllocAttr> surfaceAllocAttr;
196 };
197 
200 {
202  bool ispInputCropEnable {false};
205 
207  bool isp0OutputCropEnable {false};
210 
212  bool isp1OutputCropEnable {false};
215 
217  bool isp0DownscaleEnable {false};
219  std::uint32_t isp0DownscaleWidth;
221  std::uint32_t isp0DownscaleHeight;
222 
224  bool isp1DownscaleEnable {false};
226  std::uint32_t isp1DownscaleWidth;
228  std::uint32_t isp1DownscaleHeight;
229 };
230 
238 {
240  std::vector<INvSIPLClient::ConsumerDesc> clients;
241 
244 
247 
250 };
251 
257 {
260 
262  bool isp0OutputRequested {false};
263 
265  bool isp1OutputRequested {false};
266 
269 
272 };
273 
278 {
279 public:
280 
300  size_t timeoutUsec) = 0;
301 
307  virtual size_t GetCount() const = 0;
308 
309 protected:
310 
311  INvSIPLFrameCompletionQueue() = default;
312  virtual ~INvSIPLFrameCompletionQueue() = default;
313 
314 private:
315 
317  INvSIPLFrameCompletionQueue& operator=(INvSIPLFrameCompletionQueue const& rhs) = delete;
318 };
319 
324 {
325 public:
326 
343  size_t timeoutUsec) = 0;
344 
350  virtual size_t GetCount() const = 0;
351 
352 protected:
353 
354  INvSIPLNotificationQueue() = default;
355  virtual ~INvSIPLNotificationQueue() = default;
356 
357 private:
358 
359  INvSIPLNotificationQueue(INvSIPLNotificationQueue const& other) = delete;
360  INvSIPLNotificationQueue& operator=(INvSIPLNotificationQueue const& rhs) = delete;
361 };
362 
369 {
375 
381 
387 
390 };
391 
394 } // namespace nvsipl
395 
396 
397 #endif // NVSIPLPIPELINEMGR_HPP
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleHeight
std::uint32_t isp0DownscaleHeight
ISP0 downscale height.
Definition: NvSIPLPipelineMgr.hpp:221
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_FRAME_DISCONTINUITY
@ NOTIF_WARN_ICP_FRAME_DISCONTINUITY
Indicates a discontinuity was detected in parsed embedded data frame sequence number.
Definition: NvSIPLPipelineMgr.hpp:82
nvsipl::NvSIPLPipelineQueues::notificationQueue
INvSIPLNotificationQueue * notificationQueue
The queue for event notifications.
Definition: NvSIPLPipelineMgr.hpp:389
nvsipl::NvSIPLPipelineQueues::isp1CompletionQueue
INvSIPLFrameCompletionQueue * isp1CompletionQueue
The queue for completed frames from the second ISP output.
Definition: NvSIPLPipelineMgr.hpp:386
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
nvsipl::NvSIPLDownscaleCropCfg
Downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:199
nvsipl::INvSIPLNotificationQueue
The interface to the notification queue.
Definition: NvSIPLPipelineMgr.hpp:323
nvsipl::NvSIPLPipelineCfg::notifier
NvSIPLPipelineNotifier * notifier
Holds a pointer to an NvSIPLPipelineNotifier.
Definition: NvSIPLPipelineMgr.hpp:246
nvsipl::NvSIPLPipelineQueues::captureCompletionQueue
INvSIPLFrameCompletionQueue * captureCompletionQueue
The queue for completed capture frames.
Definition: NvSIPLPipelineMgr.hpp:374
nvsipl::NvSIPLImageGroupWriter::RawBuffer::imageGroup
NvMediaImageGroup * imageGroup
Holds a pointer to NvMediaImageGroup.
Definition: NvSIPLPipelineMgr.hpp:163
nvsipl::NvSIPLPipelineQueues::isp0CompletionQueue
INvSIPLFrameCompletionQueue * isp0CompletionQueue
The queue for completed frames from the first ISP output.
Definition: NvSIPLPipelineMgr.hpp:380
nvsipl::NvSIPLImageGroupWriter::RawBuffer::discontinuity
bool discontinuity
Holds a flag to signal discontinuity for the current raw buffer from the previous one.
Definition: NvSIPLPipelineMgr.hpp:167
nvsipl::NvSIPLImageGroupWriter::~NvSIPLImageGroupWriter
virtual ~NvSIPLImageGroupWriter(void)=default
Default destructor.
nvsipl::NvSIPLImageGroupWriter::RawBuffer::uIndex
std::uint32_t uIndex
Holds the ID of the sensor in PlatformCfg.
Definition: NvSIPLPipelineMgr.hpp:165
nvsipl::INvSIPLNotificationQueue::Get
virtual SIPLStatus Get(NvSIPLPipelineNotifier::NotificationData &item, size_t timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_DESER_LINK_FAILURE
@ NOTIF_ERROR_DESER_LINK_FAILURE
Indicates a deserializer link error.
Definition: NvSIPLPipelineMgr.hpp:103
nvsipl::NvSIPLPipelineNotifier::NotificationData::eNotifType
NotificationType eNotifType
Holds the NotificationType event type.
Definition: NvSIPLPipelineMgr.hpp:114
nvsipl::CUSTOM_PLUGIN0
@ CUSTOM_PLUGIN0
Custom plug-in 0.
Definition: NvSIPLPipelineMgr.hpp:49
nvsipl::NvSIPLPipelineCfg::clients
std::vector< INvSIPLClient::ConsumerDesc > clients
Holds a vector of INvSIPLClient::ConsumerDesc.
Definition: NvSIPLPipelineMgr.hpp:240
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleWidth
std::uint32_t isp0DownscaleWidth
ISP0 downscale width.
Definition: NvSIPLPipelineMgr.hpp:219
nvsipl::INvSIPLFrameCompletionQueue::Get
virtual SIPLStatus Get(INvSIPLClient::INvSIPLBuffer *&item, size_t timeoutUsec)=0
Retrieve the next item from the queue.
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_BAD_INPUT_STREAM
@ NOTIF_ERROR_ICP_BAD_INPUT_STREAM
Indicates ICP bad input stream.
Definition: NvSIPLPipelineMgr.hpp:89
nvsipl::INvSIPLNotificationQueue::INvSIPLNotificationQueue
INvSIPLNotificationQueue()=default
nvsipl::NvSIPLImageAttr::surfaceAllocAttr
std::vector< NvMediaSurfAllocAttr > surfaceAllocAttr
Holds a vector of NvMediaSurfAllocAttr objects.
Definition: NvSIPLPipelineMgr.hpp:195
nvsipl::NvSIPLPipelineNotifier::NotificationData
Defines the notification data.
Definition: NvSIPLPipelineMgr.hpp:111
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ISP_PROCESSING_FAILURE
@ NOTIF_ERROR_ISP_PROCESSING_FAILURE
Indicates ISP processing failure.
Definition: NvSIPLPipelineMgr.hpp:96
nvsipl::NvSIPLPipelineNotifier::NotificationData::uIndex
std::uint32_t uIndex
Holds the ID of the pipeline.
Definition: NvSIPLPipelineMgr.hpp:116
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCropEnable
bool isp1OutputCropEnable
Indicates if ISP1 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:212
nvsipl::INvSIPLClient::INvSIPLBuffer
Describes the interfaces of SIPL buffer.
Definition: NvSIPLClient.hpp:91
nvsipl::NvSIPLImageAttr::surfaceType
NvMediaSurfaceType surfaceType
Holds the surface type of the image.
Definition: NvSIPLPipelineMgr.hpp:192
nvsipl::NvSIPLPipelineConfiguration::captureOutputRequested
bool captureOutputRequested
true if the client wants capture output frames to be delivered
Definition: NvSIPLPipelineMgr.hpp:259
nvsipl::NvSIPLPipelineNotifier
Describes the interfaces of the SIPL pipeline notification handler.
Definition: NvSIPLPipelineMgr.hpp:62
nvsipl::NvSIPLImageGroupWriter::RawBuffer
Describes an unprocessed sensor output buffer.
Definition: NvSIPLPipelineMgr.hpp:160
nvsipl::NvSIPLPipelineCfg
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:237
nvsipl::NvSIPLDownscaleCropCfg::isp0DownscaleEnable
bool isp0DownscaleEnable
Indicates if ISP0 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:217
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_FRAME_DROP
@ NOTIF_WARN_ICP_FRAME_DROP
Indicates pipeline was forced to drop a frame due to a slow consumer or system issues.
Definition: NvSIPLPipelineMgr.hpp:79
nvsipl::NvSIPLDownscaleCropCfg::ispInputCropEnable
bool ispInputCropEnable
Indicates if ISP input crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:202
nvsipl::NvSIPLPipelineQueues
This is the output structure for the new version of SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:368
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE
@ NOTIF_ERROR_CDI_SET_SENSOR_CTRL_FAILURE
Indicates CDI set sensor control failure.
Definition: NvSIPLPipelineMgr.hpp:100
nvsipl::NvSIPLPipelineConfiguration::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:271
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_CAPTURE_FAILURE
@ NOTIF_ERROR_ICP_CAPTURE_FAILURE
Indicates ICP capture failure.
Definition: NvSIPLPipelineMgr.hpp:92
nvsipl::NvSIPLPipelineNotifier::NotificationData::frameCaptureTSC
std::uint64_t frameCaptureTSC
Holds the TSC timestamp of the frame capture.
Definition: NvSIPLPipelineMgr.hpp:118
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:256
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:550
nvsipl::INvSIPLNotificationQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::NvSIPLImageAttr
Describes attributes of images used in image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:190
nvsipl::NvSIPLPipelineCfg::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:243
nvsipl::NvSIPLPipelineConfiguration::isp1OutputRequested
bool isp1OutputRequested
true if the client wants frames to be delivered from the second ISP output
Definition: NvSIPLPipelineMgr.hpp:265
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:38
nvsipl::NvSIPLPipelineConfiguration::isp0OutputRequested
bool isp0OutputRequested
true if the client wants frames to be delivered from the first ISP output
Definition: NvSIPLPipelineMgr.hpp:262
nvsipl::NvSIPLPipelineNotifier::NOTIF_WARN_ICP_CAPTURE_TIMEOUT
@ NOTIF_WARN_ICP_CAPTURE_TIMEOUT
Indicates occurrence of timeout while capturing.
Definition: NvSIPLPipelineMgr.hpp:85
nvsipl::NV_PLUGIN
@ NV_PLUGIN
NVIDIA plug-in.
Definition: NvSIPLPipelineMgr.hpp:48
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ACP_PROCESSING_FAILURE
@ NOTIF_ERROR_ACP_PROCESSING_FAILURE
Indicates auto control processing failure.
Definition: NvSIPLPipelineMgr.hpp:98
nvsipl::NvSIPLImageGroupWriter
Describes the interfaces of SIPL pipeline feeder.
Definition: NvSIPLPipelineMgr.hpp:156
nvsipl::INvSIPLNotificationQueue::~INvSIPLNotificationQueue
virtual ~INvSIPLNotificationQueue()=default
NvMediaSurfaceType_Unsupported
#define NvMediaSurfaceType_Unsupported
Unsupported types.
Definition: nvmedia_surface.h:553
nvsipl::INvSIPLFrameCompletionQueue::GetCount
virtual size_t GetCount() const =0
Return the current queue length.
nvsipl::NvSIPLPipelineCfg::imageGroupWriter
NvSIPLImageGroupWriter * imageGroupWriter
Holds a pointer to an NvSIPLImageGroupWriter.
Definition: NvSIPLPipelineMgr.hpp:249
nvsipl::NvSIPLDownscaleCropCfg::ispInputCrop
NvMediaRect ispInputCrop
ISP input crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:204
nvsipl::INvSIPLFrameCompletionQueue
The interface to the frame completion queue.
Definition: NvSIPLPipelineMgr.hpp:277
nvsipl::NvSIPLDownscaleCropCfg::isp0OutputCropEnable
bool isp0OutputCropEnable
Indicates if ISP0 output crop is enabled.
Definition: NvSIPLPipelineMgr.hpp:207
nvsipl::NvSIPLPipelineNotifier::OnEvent
virtual void OnEvent(NotificationData &oNotificationData)
Handles a pipeline event.
Definition: NvSIPLPipelineMgr.hpp:131
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_CDI_PROCESSING_DONE
@ NOTIF_INFO_CDI_PROCESSING_DONE
Indicates CDI processing is finished.
Definition: NvSIPLPipelineMgr.hpp:75
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleHeight
std::uint32_t isp1DownscaleHeight
ISP1 downscale height.
Definition: NvSIPLPipelineMgr.hpp:228
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleEnable
bool isp1DownscaleEnable
Indicates if ISP1 downscale is enabled.
Definition: NvSIPLPipelineMgr.hpp:224
NvMediaImageGroup
Holds a handle representing an image group.
Definition: nvmedia_image.h:115
nvsipl::NvSIPLImageGroupWriter::FillRawBuffer
virtual SIPLStatus FillRawBuffer(RawBuffer &oRawBuffer)=0
Populates the buffer with RAW data.
nvsipl::NvSIPLDownscaleCropCfg::isp1DownscaleWidth
std::uint32_t isp1DownscaleWidth
ISP1 downscale width.
Definition: NvSIPLPipelineMgr.hpp:226
nvsipl::NvSIPLPipelineNotifier::~NvSIPLPipelineNotifier
virtual ~NvSIPLPipelineNotifier(void)=default
Default destructor.
nvsipl::INvSIPLFrameCompletionQueue::~INvSIPLFrameCompletionQueue
virtual ~INvSIPLFrameCompletionQueue()=default
nvsipl::NvSIPLDownscaleCropCfg::isp0OutputCrop
NvMediaRect isp0OutputCrop
ISP0 output crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:209
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ICP_PROCESSING_DONE
@ NOTIF_INFO_ICP_PROCESSING_DONE
Indicates ICP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:69
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSIPLPipelineMgr.hpp:47
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_INTERNAL_FAILURE
@ NOTIF_ERROR_INTERNAL_FAILURE
Indicates an unexpected internal failure.
Definition: NvSIPLPipelineMgr.hpp:106
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ACP_PROCESSING_DONE
@ NOTIF_INFO_ACP_PROCESSING_DONE
Indicates auto control processing is finished.
Definition: NvSIPLPipelineMgr.hpp:73
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::INvSIPLFrameCompletionQueue::INvSIPLFrameCompletionQueue
INvSIPLFrameCompletionQueue()=default
nvsipl::NvSIPLDownscaleCropCfg::isp1OutputCrop
NvMediaRect isp1OutputCrop
ISP1 output crop rectangle.
Definition: NvSIPLPipelineMgr.hpp:214
nvsipl::NvSIPLPipelineNotifier::NotificationType
NotificationType
Defines the events of the image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:66
nvsipl::NvSIPLPipelineConfiguration::downscaleCropCfg
NvSIPLDownscaleCropCfg downscaleCropCfg
Holds a downscale and crop configuration.
Definition: NvSIPLPipelineMgr.hpp:268
nvmedia_image.h
NVIDIA Media Interface: Image Processing
nvsipl::NvSIPLPipelineNotifier::NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE
@ NOTIF_ERROR_ICP_EMB_DATA_PARSE_FAILURE
Indicates embedded data parsing failure.
Definition: NvSIPLPipelineMgr.hpp:94
nvsipl::MAX_NUM_PLUGINS
@ MAX_NUM_PLUGINS
Maximum number of plug-ins supported.
Definition: NvSIPLPipelineMgr.hpp:50
nvsipl::NvSIPLPipelineNotifier::NOTIF_INFO_ISP_PROCESSING_DONE
@ NOTIF_INFO_ISP_PROCESSING_DONE
Indicates ISP processing is finished.
Definition: NvSIPLPipelineMgr.hpp:71