NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 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"
16 #include "INvSiplControlAuto.hpp"
17 #include "NvSIPLClient.hpp"
18 
19 #include "nvmedia_image.h"
20 
21 #include "devblk_cdi.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:
68  static std::unique_ptr<INvSIPLCamera> GetInstance(void);
69 
82  virtual SIPLStatus SetPlatformCfg(const PlatformCfg* platformCfg) = 0;
83 
84 #if !NV_IS_SAFETY
85 
98  virtual SIPLStatus SetPipelineCfg(std::uint32_t index, const NvSIPLPipelineCfg &pipelineCfg) = 0;
99 
100 #endif // NV_IS_SAFETY
101 
114  virtual SIPLStatus SetPipelineCfg(std::uint32_t index,
115  const NvSIPLPipelineConfiguration &pipelineCfg,
116  NvSIPLPipelineQueues& queues) = 0;
117 
132  virtual SIPLStatus RegisterAutoControlPlugin(std::uint32_t index,
134  ISiplControlAuto* autoControl,
135  const std::vector<std::uint8_t>& blob) = 0;
136 
147  virtual SIPLStatus Init(void) = 0;
148 
164  virtual SIPLStatus GetImageAttributes(std::uint32_t index,
166  NvSIPLImageAttr &imageAttr) = 0;
167 
181  virtual SIPLStatus ReadEEPROMData(const std::uint32_t index,
182  const std::uint16_t address,
183  const std::uint32_t length,
184  std::uint8_t * const buffer) = 0;
185 
186 #if !NV_IS_SAFETY
187 
199  virtual DevBlkCDIDevice* GetE2PHandle(std::uint32_t index) = 0;
200 #endif // !NV_IS_SAFETY
201 
215  virtual SIPLStatus RegisterImageGroups(std::uint32_t index,
216  const std::vector<NvMediaImageGroup*> &imageGroups) = 0;
217 
232  virtual SIPLStatus RegisterImages(std::uint32_t index,
234  const std::vector<NvMediaImage*> &images) = 0;
235 
247  virtual SIPLStatus Start(void) = 0;
248 
258  virtual SIPLStatus Stop(void) = 0;
259 
272  virtual SIPLStatus Deinit(void) = 0;
273 
286  virtual SIPLStatus RecoverLink(std::uint32_t index) = 0;
287 
288 #if !NV_IS_SAFETY
289 
302  virtual SIPLStatus ToggleLED(std::uint32_t index, bool enable) = 0;
303 #endif // !NV_IS_SAFETY
304 
306  virtual ~INvSIPLCamera(void) = default;
307 
308 #ifdef NVMEDIA_NVSCI_ENABLE
309 
324  virtual SIPLStatus FillNvSciSyncAttrList(std::uint32_t index,
326  NvSciSyncAttrList attrList,
327  NvMediaNvSciSyncClientType clientType) = 0;
328 
342  virtual SIPLStatus RegisterNvSciSyncObj(std::uint32_t index,
344  NvMediaNvSciSyncObjType syncobjtype,
345  NvSciSyncObj syncobj) = 0;
346 
347 #if !NV_IS_SAFETY
348 
362  virtual SIPLStatus SetNvSciSyncObjForEOF(std::uint32_t index,
364  NvSciSyncObj syncobj) = 0;
365 #endif // !NV_IS_SAFETY
366 #endif // NVMEDIA_NVSCI_ENABLE
367 
368 }; // INvSIPLCamera
369 
371 } // namespace nvsipl
372 
373 
374 
375 #endif // NVSIPLCAMERA_HPP
NvSIPLClient.hpp
NVIDIA SIPL: Client Interface - NvSIPL Client
nvsipl::INvSIPLCamera::RegisterImageGroups
virtual SIPLStatus RegisterImageGroups(std::uint32_t index, const std::vector< NvMediaImageGroup * > &imageGroups)=0
Registers image groups.
INvSiplControlAuto.hpp
NVIDIA SIPL: Auto Control Interface - SIPL Auto Control
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:271
nvsipl::INvSIPLCamera::Init
virtual SIPLStatus Init(void)=0
Initializes NvSIPL Camera for the selected platform configuration.
nvsipl::INvSIPLCamera::ToggleLED
virtual SIPLStatus ToggleLED(std::uint32_t index, bool enable)=0
Control the LED on the associated camera module.
NvSIPLCommon.hpp
NVIDIA SIPL: Common Data Structures - SIPL
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:307
nvsipl::INvSIPLCamera::RegisterNvSciSyncObj
virtual SIPLStatus RegisterNvSciSyncObj(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj syncobj)=0
Register an NvSciSyncObj.
NvSIPLPlatformCfg.hpp
NVIDIA SIPL: Camera Platform Configuration
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
Deinitializes NvSIPL Camera 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:189
nvsipl::NvSIPLPipelineCfg
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:237
type
int const char int type
Definition: drm-nvdc-docs.h:1479
nvsipl::PlatformCfg
Defines the camera platform configuration.
Definition: NvSIPLPlatformCfg.hpp:52
nvsipl::NvSIPLPipelineQueues
This is the output structure for the new version of SetPipelineCfg().
Definition: NvSIPLPipelineMgr.hpp:368
nvsipl::INvSIPLCamera::GetE2PHandle
virtual DevBlkCDIDevice * GetE2PHandle(std::uint32_t index)=0
Get EEPROM CDI handle.
nvsipl::INvSIPLCamera::SetPlatformCfg
virtual SIPLStatus SetPlatformCfg(const PlatformCfg *platformCfg)=0
Sets a platform configuration.
nvsipl::NvSIPLPipelineConfiguration
Defines the camera pipeline configuration.
Definition: NvSIPLPipelineMgr.hpp:256
nvsipl::NvSIPLImageAttr
Describes attributes of images used in image processing pipeline.
Definition: NvSIPLPipelineMgr.hpp:190
nvsipl::INvSIPLCamera::RegisterImages
virtual SIPLStatus RegisterImages(std::uint32_t index, INvSIPLClient::ConsumerDesc::OutputType outType, const std::vector< NvMediaImage * > &images)=0
Registers images.
nvsipl::SIPLStatus
SIPLStatus
Defines the status codes returned by functions in SIPL modules.
Definition: NvSIPLCommon.hpp:38
NvSIPLPipelineMgr.hpp
NVIDIA SIPL: Pipeline Manager - NvSIPL Pipeline Manager
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 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 for the selected platform configuration.
nvscistream.h
NVIDIA Software Communications Interface (SCI) : NvSciStream
nvsipl::INvSIPLCamera::RegisterAutoControlPlugin
virtual SIPLStatus RegisterAutoControlPlugin(std::uint32_t index, PluginType type, ISiplControlAuto *autoControl, const std::vector< std::uint8_t > &blob)=0
Register Auto Control plugin to be used for specific pipeline.
nvsipl::PluginType
PluginType
Defines types of SIPL Control Auto plug-ins.
Definition: NvSIPLPipelineMgr.hpp:47
nvsipl
Contains the classes and variables for implementation of SIPL.
Definition: INvSiplControlAuto.hpp:33
nvsipl::INvSIPLCamera::ReadEEPROMData
virtual SIPLStatus ReadEEPROMData(const std::uint32_t index, const std::uint16_t address, const std::uint32_t length, std::uint8_t *const buffer)=0
Read from an EEPROM in a camera module.
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:289
nvsipl::INvSIPLCamera::RecoverLink
virtual SIPLStatus RecoverLink(std::uint32_t index)=0
Attempts to recover a given link.
nvsipl::ISiplControlAuto
Defines SIPL Control Auto Interface Class.
Definition: INvSiplControlAuto.hpp:44
nvmedia_image.h
NVIDIA Media Interface: Image Processing
nvsipl::INvSIPLCamera::GetInstance
static std::unique_ptr< INvSIPLCamera > GetInstance(void)
Gets a handle to an INvSIPLCamera instance.
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:258