|
NVIDIA DRIVE OS Linux SDK API Reference
|
5.1.15.0 Release For Test and Development only
|
Go to the documentation of this file.
19 #ifndef _NVROS_EGL_CUDA_IO_
20 #define _NVROS_EGL_CUDA_IO_
23 #include <condition_variable>
25 #include "nvros_egl_utils/nvros_egl_utils.h"
106 std::queue<CUarray> inQ;
107 std::queue<CUarray> outQ;
108 std::queue<CUdeviceptr> inQPl;
109 std::queue<CUdeviceptr> outQPl;
110 const char* inSocketPath;
111 const char* outSocketPath;
116 EGLStreamKHR eglStreamIn;
117 EGLStreamKHR eglStreamOut;
118 EGLDisplay eglDisplayIn;
119 EGLDisplay eglDisplayOut;
122 void (*errCallback)(
unsigned int);
127 std::condition_variable inQCV;
128 std::mutex outFrameParamsWaitCVMtx;
129 std::condition_variable outFrameParamsWaitCV;
130 std::mutex outQMutex;
131 std::condition_variable outQCV;
@ EGL_CU_IO_UNSUPPORTED_EGL_FRAME
Indicates that the EGL frame is unsupported.
NvRosErr StopEglCuOutputLoop()
Stops the iterative processing of the EGL CUDA pipeline over the output stream as started by RunEglCu...
NvRosErr RunEglCuInputLoop()
Fetches frames from the EGL CUDA pipeline over the input EGLStream and places them into the queue.
NvRosErr InitEglCuIO(const char *inputSocketPath, const char *outputSocketPath)
Initializes the EGL CUDA pipeline over the given input and output EGLStream socket paths.
_EglCuIOErrors
Defines the error codes emitted by the EGL CUDA IO library.
unsigned int depth
Specifies the depth.
CUarray GetEglFrameContent()
Gets the contents from the first, oldest unprocessed EGL frame in the form of a CUarray that can be p...
Class to initialize the EGLStream for the following roles: EGLOUTPUT_CONSUMER, CUDA_CONSUMER,...
enum nvros::_EglCuIOErrors EglCuIOErrors
Defines the error codes emitted by the EGL CUDA IO library.
NvRosEglCudaIO()
Constructs the NvRosEglCudaIO class object.
~NvRosEglCudaIO()
Destroys the NvRosEglCudaIO object.
unsigned int frameType
Specifies the frame type.
NvRosErr RunEglCuOutputLoop()
Sets up the CUDA context for the CUDA producer role.
Holds EGL related parameters.
int GetAvailableFrameCount()
Gets the number of frames available for processing.
NvRosErr PushEglFrameOut(CUarray outputArray)
Pushes processed EGL frames out.
unsigned int colorFormat
Specifies the color format.
struct nvros::_EglFrameParams EglFrameParams
Holds the required EGL frame-related parameters for processing that frame.
Creates CUDA processing pipelines for EGLStreams.
enum nvros::_NvRosErrCode NvRosErr
Declares error codes for all NvROS modules and packages.
Holds CUDA EGL related parameters.
unsigned int frameWidth
Specifies the width of the frame.
NvRosErr RegisterErrCallbackFunc(void(*errCallback)(unsigned int))
Registers a callback function for CUDA EGL library to invoke when an error is encountered.
EglFrameParams GetInEglFrameParams()
Gets parameters of input EGL frames.
NvRosErr SetGlobalContext(CUcontext &context)
Sets the global CUDA context for all threads that perform CUDA EGL inter-operations and executes cert...
unsigned int frameHeight
Specifies the height of the frame.
unsigned int channels
Specifies the number of channels.
Holds the required EGL frame-related parameters for processing that frame.
@ EGL_CU_IO_CUDA_API_ERR
Indicates that an error occurred during the CUDA driver/runtime API call.
NvRosErr StopEglCuInputLoop()
Stops the iterative processing of the EGL CUDA pipeline over the input stream as started by RunEglCuI...
NvRosErr SetOutEglFrameParams(EglFrameParams mOutEglFrameParams)
Sets parameters of output EGL frames.
unsigned int planes
Specifies the number of planes in the frame.
@ EGL_CU_IO_STREAM_DISCONNECTED
Indicates that EGLStream is in a disconnected state.
A global namespace for NvRos packages.
unsigned int pitch
Specifies the pitch.