NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvros::NvRosEglUtil Class Reference

Detailed Description

Class to initialize the EGLStream for the following roles: EGLOUTPUT_CONSUMER, CUDA_CONSUMER, CUDA_PRODUCER, IMAGE_PRODUCER.

Each NvRosEglUtil class object must only be instantiated with one role at a time.

Definition at line 285 of file nvros_egl_utils.h.

Public Member Functions

 NvRosEglUtil (ConsumerType cons_type, WinSys win_sys_type, OpMode op_mode)
 Instantiates NvRosEglUtil class for the EGL consumer role. More...
 
 NvRosEglUtil (ProducerType prod_type, WinSys win_sys_type, OpMode op_mode)
 Instantiates NvRosEglUtil class for the EGL producer role. More...
 
 ~NvRosEglUtil ()
 Destroys NvRosEglUtil object. More...
 
NvMediaStatus CheckNvMediaEGLStreamVersion (void)
 Checks version of NvMedia EGLStream library. More...
 
NvRosErr EglUtilInit (EglUtilOptions *options, EglUtilState *eglUtil)
 Initializes EGL utility structures. More...
 
EGLStreamKHR EglStreamInit (EGLDisplay display, const char *socket_path)
 Initializes an EGLStream over a given EGLDisplay through EglUtilInit and a given socket path. More...
 
EGLint GetStreamState (EGLDisplay display, EGLStreamKHR eglStream)
 Gets the current state of EGLStream. More...
 
NvRosErr InitConsumer (EGLDisplay display, EGLStreamKHR eglStream)
 Initializes an EGL consumer in EGLOUTPUT role over specified EGLDisplay and EGLStreamKHR handles. More...
 
NvRosErr InitConsumer (EGLDisplay display, EGLStreamKHR eglStream, CudaEglParams *cudaConsumerParams)
 Initializes CUDA consumer over specified EGLDisplay and EGLStreamKHR handles with additional CudaEglParams* argument (overloaded method). More...
 
NvRosErr EglStreamFinish (EGLDisplay display, EGLStreamKHR eglStream)
 Closes the EGLStream that is set up by the same NvRosEglUtil object. More...
 
NvRosErr EglUtilDeInit (EglUtilState *state)
 Terminates the entire EGLStream setup that was initialized through previous EglUtilInit and EglStreamInit APIs. More...
 

Constructor & Destructor Documentation

nvros::NvRosEglUtil::NvRosEglUtil ( ConsumerType  cons_type,
WinSys  win_sys_type,
OpMode  op_mode 
)

Instantiates NvRosEglUtil class for the EGL consumer role.

Parameters
cons_typeInstantiates NvRosEglUtil for specified EGL consumer role. NvROS only supports EGLOUTPUT_CONSUMER and CUDA_CONSUMER.
win_sys_typeWindow system type. This parameter is only functionally required when cons_type is EGLOUTPUT_CONSUMER. Only EGLDEVICE window system is supported. If
cons_type
is CUDA_CONSUMER, this parameter is ignored.
op_modeOperation mode of EGLStream.
nvros::NvRosEglUtil::NvRosEglUtil ( ProducerType  prod_type,
WinSys  win_sys_type,
OpMode  op_mode 
)

Instantiates NvRosEglUtil class for the EGL producer role.

Parameters
prod_typeInstantiates NvRosEglUtil for specified EGL producer role. NvRos supports IMAGE_PRODUCER and CUDA_PRODUCER only.
win_sys_typeWindow system type. This parameter is ignored.
op_modeOperation mode of EGLStream.
nvros::NvRosEglUtil::~NvRosEglUtil ( )

Destroys NvRosEglUtil object.

Member Function Documentation

NvMediaStatus nvros::NvRosEglUtil::CheckNvMediaEGLStreamVersion ( void  )

Checks version of NvMedia EGLStream library.

You must call this API first. If an error is returned, exit the application. Continuing after an error may result in undefined behavior.

Returns
NVMEDIA_STATUS_OK if success, or NVMEDIA_STATUS_INCOMPATIBLE_VERSION otherwise.
NvRosErr nvros::NvRosEglUtil::EglStreamFinish ( EGLDisplay  display,
EGLStreamKHR  eglStream 
)

Closes the EGLStream that is set up by the same NvRosEglUtil object.

Parameters
displayHandle to EGLDisplay.
eglStreamHandle to EGLStreamKHR.
Returns
NVROS_SUCCESS on successful execution, or NVROS_ERR otherwise.
EGLStreamKHR nvros::NvRosEglUtil::EglStreamInit ( EGLDisplay  display,
const char *  socket_path 
)

Initializes an EGLStream over a given EGLDisplay through EglUtilInit and a given socket path.

Parameters
displayValid handle to EGLDisplay that is initialized through a previous call to EglUtilInit.
socket_pathValid socket to initialize EGLStream.
Returns
A valid handle to EGLStreamKHR on success, EGL_NO_STREAM_KHR on failure.
NvRosErr nvros::NvRosEglUtil::EglUtilDeInit ( EglUtilState state)

Terminates the entire EGLStream setup that was initialized through previous EglUtilInit and EglStreamInit APIs.

This also terminates the window system for EGLOUTPUT_CONSUMER.

Parameters
stateEglUtilState initialized at EglUtilInit.
Returns
NVROS_SUCCESS on successful execution, or NVROS_ERR otherwise.
NvRosErr nvros::NvRosEglUtil::EglUtilInit ( EglUtilOptions options,
EglUtilState eglUtil 
)

Initializes EGL utility structures.

EglUtilState; the contents are required when initializing EGLStream.

Parameters
optionsPointer to the EglUtilOptions structure with valid data.
eglUtilPointer to the EglUtilState structure. On successful execution of the API, this structure is populated with valid values to its members.
Returns
NVROS_SUCCESS on successful execution, or NVROS_ERR otherwise.
EGLint nvros::NvRosEglUtil::GetStreamState ( EGLDisplay  display,
EGLStreamKHR  eglStream 
)

Gets the current state of EGLStream.

Parameters
displayHandle to EGLDisplay.
eglStreamHandle to EGLStreamKHR.
Return values
EGLintInteger representation of EGLStream state. For more details on possible EGLStream states, see https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_stream.txt
NvRosErr nvros::NvRosEglUtil::InitConsumer ( EGLDisplay  display,
EGLStreamKHR  eglStream 
)

Initializes an EGL consumer in EGLOUTPUT role over specified EGLDisplay and EGLStreamKHR handles.

Parameters
displayHandle to EGLDisplay.
eglStreamHandle to EGLStreamKHR. This must be the same handle received from previously successful calls to EglStreamInit.
Returns
NVROS_SUCCESS on successful execution, or NVROS_ERR otherwise.
NvRosErr nvros::NvRosEglUtil::InitConsumer ( EGLDisplay  display,
EGLStreamKHR  eglStream,
CudaEglParams cudaConsumerParams 
)

Initializes CUDA consumer over specified EGLDisplay and EGLStreamKHR handles with additional CudaEglParams* argument (overloaded method).

Parameters
displayHandle to EGLDisplay.
eglStreamHandle to EGLStreamKHR. This must be the same handle received from previously successful calls to EglStreamInit.
cudaConsumerParamsPointer to CudaEglParams structure. Successful execution of this API populates valid data into this structure.
Returns
NVROS_SUCCESS on successful execution, or NVROS_ERR otherwise.

The documentation for this class was generated from the following file: