NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only
NvSIPLCamera.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 #ifndef NVSIPLCAMERA_HPP
11 #define NVSIPLCAMERA_HPP
12 
13 #include "NvSIPLCommon.hpp"
14 #include "NvSIPLPlatformCfg.hpp"
15 #include "NvSIPLPipelineMgr.hpp"
17 #include "NvSIPLClient.hpp"
18 
19 #include "nvmedia_image.h"
20 
21 #include "nvmedia_isc.h"
22 
23 #ifdef NVMEDIA_NVSCI_ENABLE
24 #include "nvscisync.h"
25 #include "nvscistream.h"
26 #endif // NVMEDIA_NVSCI_ENABLE
27 
28 #include <cstdint>
29 #include <memory>
30 #include <vector>
31 
46 namespace nvsipl
47 {
48 
58 {
59  public:
67  static std::unique_ptr<INvSIPLCamera> GetInstance(void);
68 
80  virtual SIPLStatus SetPlatformCfg(const PlatformCfg* platformCfg) = 0;
81 
91  virtual SIPLStatus SetPipelineCfg(std::uint32_t index, const NvSIPLPipelineCfg &pipelineCfg) = 0;
92 
103  virtual SIPLStatus RegisterAutoControlPlugin(std::uint32_t index,
105  INvSIPLAutoControl* autoControl,
106  const std::vector<std::uint8_t>& blob) = 0;
107 
117  virtual SIPLStatus Init(void) = 0;
118 
128  virtual SIPLStatus SetISPConfig(std::uint32_t index,
129  INvSIPLAutoControl::PluginType autoPluginType) = 0;
130 
145  virtual SIPLStatus GetImageAttributes(std::uint32_t index,
147  NvSIPLImageAttr &imageAttr) = 0;
148 
156  virtual NvMediaISCDevice* GetE2PHandle(std::uint32_t index) = 0;
157 
158 #ifdef NVMEDIA_NVSCI_ENABLE
159 
160  typedef struct {
164  std::vector<NvSciStreamCookie> cookies;
165  } PoolCookies;
166 #endif // NVMEDIA_NVSCI_ENABLE
167 
183  virtual SIPLStatus RegisterImageGroups(std::uint32_t index,
184  const std::vector<NvMediaImageGroup*> &imageGroups
185 #ifdef NVMEDIA_NVSCI_ENABLE
186  ,PoolCookies *poolCookies = nullptr
187 #endif // NVMEDIA_NVSCI_ENABLE
188  ) = 0;
189 
206  virtual SIPLStatus RegisterImages(std::uint32_t index,
208  const std::vector<NvMediaImage*> &images
209 #ifdef NVMEDIA_NVSCI_ENABLE
210  ,PoolCookies *poolCookies = nullptr
211 #endif // NVMEDIA_NVSCI_ENABLE
212  ) = 0;
213 
224  virtual SIPLStatus Start(void) = 0;
225 
234  virtual SIPLStatus Stop(void) = 0;
235 
247  virtual SIPLStatus Deinit(void) = 0;
248 
260  virtual SIPLStatus RecoverLink(std::uint32_t index) = 0;
261 
263  virtual ~INvSIPLCamera(void) = default;
264 
265 #ifdef NVMEDIA_NVSCI_ENABLE
266 
280  virtual SIPLStatus FillNvSciSyncAttrList(std::uint32_t index,
282  NvSciSyncAttrList attrList,
283  NvMediaNvSciSyncClientType clientType) = 0;
284 
296  virtual SIPLStatus RegisterNvSciSyncObj(std::uint32_t index,
298  NvMediaNvSciSyncObjType syncobjtype,
299  NvSciSyncObj syncobj) = 0;
300 
313  virtual SIPLStatus SetNvSciSyncObjForEOF(std::uint32_t index,
315  NvSciSyncObj syncobj) = 0;
316 #endif // NVMEDIA_NVSCI_ENABLE
317 
318 }; // INvSIPLCamera
319 
321 } // namespace nvsipl
322 
323 
324 
325 #endif // NVSIPLCAMERA_HPP
NvSIPLClient.hpp
nvsipl::INvSIPLCamera::PoolCookies
Vector of buffer cookies and associated producer NvSciStreamBlock.
Definition: NvSIPLCamera.hpp:160
nvsipl::INvSIPLCamera::RegisterAutoControlPlugin
virtual SIPLStatus RegisterAutoControlPlugin(std::uint32_t index, INvSIPLAutoControl::PluginType type, INvSIPLAutoControl *autoControl, const std::vector< std::uint8_t > &blob)=0
Register Auto Control plugin to be used for specific pipeline.
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:271
INvSIPLAutoControl
Definition: NvSIPLAutoControlPlugin.hpp:34
nvsipl::INvSIPLCamera::Init
virtual SIPLStatus Init(void)=0
Initializes NvSIPL Camera (libnvsipl.so) for the selected platform configuration.
NvSIPLCommon.hpp
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:295
nvsipl::INvSIPLCamera::RegisterNvSciSyncObj
virtual SIPLStatus RegisterNvSciSyncObj(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj syncobj)=0
Register an NvSciSyncObj.
NvSIPLPlatformCfg.hpp
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
nvsipl::INvSIPLCamera::GetImageAttributes
virtual SIPLStatus GetImageAttributes(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvSIPLImageAttr &imageAttr)=0
Gets Image Attributes.
nvsipl::INvSIPLCamera::Deinit
virtual SIPLStatus Deinit(void)=0
De-initializes NvSIPL Camera (libnvsipl.so) for the selected platform configuration.
nvsipl::INvSIPLCamera::SetPipelineCfg
virtual SIPLStatus SetPipelineCfg(std::uint32_t index, const NvSIPLPipelineCfg &pipelineCfg)=0
Sets a pipeline configuration.
nvsipl::INvSIPLCamera::SetNvSciSyncObjForEOF
virtual SIPLStatus SetNvSciSyncObjForEOF(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvSciSyncObj syncobj)=0
Set the EOF NvSciSyncObj.
nvsipl::INvSIPLClient::ConsumerDesc::OutputType
OutputType
Defines the types of the SIPL pipeline output.
Definition: NvSIPLClient.hpp:184
nvsipl::NvSIPLPipelineCfg
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:222
type
int const char int type
Definition: drm-nvdc-docs.h:1479
nvsipl::PlatformCfg
Defines the camera platform configuration.
Definition: NvSIPLPlatformCfg.hpp:52
nvmedia_isc.h
NVIDIA Media Interface: Image Sensor Control (ISC)
INvSIPLAutoControl::PluginType
PluginType
Defines types of Auto Control plug-ins.
Definition: NvSIPLAutoControlPlugin.hpp:41
nvsipl::INvSIPLCamera::RegisterImageGroups
virtual SIPLStatus RegisterImageGroups(std::uint32_t index, const std::vector< NvMediaImageGroup * > &imageGroups, PoolCookies *poolCookies=nullptr)=0
Registers image groups.
nvsipl::INvSIPLCamera::SetPlatformCfg
virtual SIPLStatus SetPlatformCfg(const PlatformCfg *platformCfg)=0
Sets a platform configuration.
nvsipl::NvSIPLImageAttr
Describes attributes of images used in image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:180
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in Sensor Input Processing Library (SIPL) modules.
Definition: NvSIPLCommon.hpp:38
NvSIPLPipelineMgr.hpp
nvsipl::INvSIPLCamera::FillNvSciSyncAttrList
virtual SIPLStatus FillNvSciSyncAttrList(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvSciSyncAttrList attrList, NvMediaNvSciSyncClientType clientType)=0
Fills an NvSciSyncAttrList.
nvsipl::INvSIPLCamera::Start
virtual SIPLStatus Start(void)=0
Starts NvSIPL Camera (libnvsipl.so) for the selected platform configuration.
nvsipl::INvSIPLCamera::~INvSIPLCamera
virtual ~INvSIPLCamera(void)=default
Default destructor.
nvsipl::INvSIPLCamera
Defines public data structures and describes the interfaces for NvSIPLCamera.
Definition: NvSIPLCamera.hpp:57
nvsipl::INvSIPLCamera::Stop
virtual SIPLStatus Stop(void)=0
Stops NvSIPL Camera (libnvsipl.so) for the selected platform configuration.
nvsipl::INvSIPLCamera::SetISPConfig
virtual SIPLStatus SetISPConfig(std::uint32_t index, INvSIPLAutoControl::PluginType autoPluginType)=0
Set ISP configuration for a pipeline.
nvscistream.h
NVIDIA Software Communications Interface (SCI) : NvSciStream
nvsipl::INvSIPLCamera::RegisterImages
virtual SIPLStatus RegisterImages(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, const std::vector< NvMediaImage * > &images, PoolCookies *poolCookies=nullptr)=0
Registers images.
NvMediaISCDevice
Holds the handle for an NvMediaISCDevice object.
Definition: nvmedia_isc.h:180
NvSciStreamBlock
uintptr_t NvSciStreamBlock
Handle to a stream component.
Definition: nvscistream.h:52
nvsipl
Contains the classes and variables for implementation of Sensor Input Processing Library (SIPL).
Definition: NvSIPLDeviceBlock.hpp:32
NvSIPLAutoControlPlugin.hpp
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:282
nvsipl::INvSIPLCamera::RecoverLink
virtual SIPLStatus RecoverLink(std::uint32_t index)=0
Attempts to recover a given link.
nvmedia_image.h
NVIDIA Media Interface: Image Processing
nvsipl::INvSIPLCamera::PoolCookies::cookies
std::vector< NvSciStreamCookie > cookies
Holds cookies to each identify an nvsipl::INvSIPLClient::INvSIPLBuffer.
Definition: NvSIPLCamera.hpp:164
nvsipl::INvSIPLCamera::PoolCookies::producer
NvSciStreamBlock producer
Holds the producer block.
Definition: NvSIPLCamera.hpp:162
nvsipl::INvSIPLCamera::GetE2PHandle
virtual NvMediaISCDevice * GetE2PHandle(std::uint32_t index)=0
Get EEPROM ISC handle.
nvsipl::INvSIPLCamera::GetInstance
static std::unique_ptr< INvSIPLCamera > GetInstance(void)
Gets a handle to INvSIPLCamera instance.
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:258