![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.9.0 Release |
Creates CUDA processing pipelines for EGLStreams.
This class can be treated as a pipe between two EGLStreams. The input end of this pipe connects to a given EGLStream and receives the contents in the form of a CUarray to process with the desired algorithm. The algorithm returns the processed contents in the form of a CUarray. The output end of this pipe puts the processed contents into an EGLStream that can be displayed on another processing subsystem.
Definition at line 100 of file nvros_egl_cuda_io.h.
Public Member Functions | |
NvRosEglCudaIO () | |
Constructs the NvRosEglCudaIO class object. More... | |
~NvRosEglCudaIO () | |
Destroys the NvRosEglCudaIO object. More... | |
NvRosErr | SetGlobalContext (CUcontext &context) |
Sets the global CUDA context for all threads that perform CUDA EGL inter-operations and executes certain CUDA algorithms. More... | |
NvRosErr | InitEglCuIO (const char *inputSocketPath, const char *outputSocketPath) |
Initializes the EGL CUDA pipeline over the given input and output EGLStream socket paths. More... | |
NvRosErr | RunEglCuInputLoop () |
Fetches frames from the EGL CUDA pipeline over the input EGLStream and places them into the queue. More... | |
NvRosErr | RunEglCuOutputLoop () |
Sets up the CUDA context for the CUDA producer role. More... | |
NvRosErr | StopEglCuInputLoop () |
Stops the iterative processing of the EGL CUDA pipeline over the input stream as started by RunEglCuInputLoop. More... | |
NvRosErr | StopEglCuOutputLoop () |
Stops the iterative processing of the EGL CUDA pipeline over the output stream as started by RunEglCuOutputLoop. More... | |
NvRosErr | RegisterErrCallbackFunc (void(*errCallback)(unsigned int)) |
Registers a callback function for CUDA EGL library to invoke when an error is encountered. More... | |
EglFrameParams | GetInEglFrameParams () |
Gets parameters of input EGL frames. More... | |
NvRosErr | SetOutEglFrameParams (EglFrameParams mOutEglFrameParams) |
Sets parameters of output EGL frames. More... | |
int | GetAvailableFrameCount () |
Gets the number of frames available for processing. More... | |
CUarray | GetEglFrameContent () |
Gets the contents from the first, oldest unprocessed EGL frame in the form of a CUarray that can be passed to a processing subsystem. More... | |
CUdeviceptr | GetEglFrameContent (bool pitchLinearFrame) |
Gets the contents from the first, oldest unprocessed EGL frame in the form of a CUdeviceptr that can be passed to a processing subsystem. More... | |
NvRosErr | PushEglFrameOut (CUarray outputArray) |
Pushes processed EGL frames out. More... | |
NvRosErr | PushEglFrameOut (CUdeviceptr outCUdevptr) |
Pushes processed EGL frame out. More... | |
nvros::NvRosEglCudaIO::NvRosEglCudaIO | ( | ) |
Constructs the NvRosEglCudaIO class object.
nvros::NvRosEglCudaIO::~NvRosEglCudaIO | ( | ) |
Destroys the NvRosEglCudaIO object.
int nvros::NvRosEglCudaIO::GetAvailableFrameCount | ( | ) |
Gets the number of frames available for processing.
CUarray nvros::NvRosEglCudaIO::GetEglFrameContent | ( | ) |
Gets the contents from the first, oldest unprocessed EGL frame in the form of a CUarray that can be passed to a processing subsystem.
CUarray | Image data from the EGL frame. |
CUdeviceptr nvros::NvRosEglCudaIO::GetEglFrameContent | ( | bool | pitchLinearFrame | ) |
Gets the contents from the first, oldest unprocessed EGL frame in the form of a CUdeviceptr that can be passed to a processing subsystem.
pitchLinearFrame | A flag, if true, indicates that the the EGL frame is of pitch linear type. |
CUdeviceptr | Image data from the EGL frame. |
EglFrameParams nvros::NvRosEglCudaIO::GetInEglFrameParams | ( | ) |
Gets parameters of input EGL frames.
NvRosErr nvros::NvRosEglCudaIO::InitEglCuIO | ( | const char * | inputSocketPath, |
const char * | outputSocketPath | ||
) |
Initializes the EGL CUDA pipeline over the given input and output EGLStream socket paths.
This function performs the following:
inputSocketPath | Connects the EGLStream socket path to receive the input EGLStream. |
outputSocketPath | Connects EGLStream stream to emit processed EGLStream. |
NvRosErr nvros::NvRosEglCudaIO::PushEglFrameOut | ( | CUarray | outputArray | ) |
Pushes processed EGL frames out.
outputArray | A CUarray consisting of processed data contents to put in the EGL frame. |
NvRosErr nvros::NvRosEglCudaIO::PushEglFrameOut | ( | CUdeviceptr | outCUdevptr | ) |
Pushes processed EGL frame out.
outCUdevptr | CUdevptr consisting of processed data contents to put in the EGL frame. |
NvRosErr nvros::NvRosEglCudaIO::RegisterErrCallbackFunc | ( | void(*)(unsigned int) | errCallback | ) |
Registers a callback function for CUDA EGL library to invoke when an error is encountered.
The error code is obtained as an argument of this callback function.
errCallback | A pointer to a function with this signature: void (*errCallback)(unsigned int)
|
NvRosErr nvros::NvRosEglCudaIO::RunEglCuInputLoop | ( | ) |
Fetches frames from the EGL CUDA pipeline over the input EGLStream and places them into the queue.
This function runs in a loop and must not run indefinitely without the associated RunEglCuOutputLoop running.
NvRosErr nvros::NvRosEglCudaIO::RunEglCuOutputLoop | ( | ) |
Sets up the CUDA context for the CUDA producer role.
Fetches frames from the queue as they become available and places them into the EGL CUDA pipeline over the output EGLStream. This function runs in a loop, see RunEglCuInputLoop.
NvRosErr nvros::NvRosEglCudaIO::SetGlobalContext | ( | CUcontext & | context | ) |
Sets the global CUDA context for all threads that perform CUDA EGL inter-operations and executes certain CUDA algorithms.
context | Specifies a valid CUcontext initialized in a calling thread. |
NvRosErr nvros::NvRosEglCudaIO::SetOutEglFrameParams | ( | EglFrameParams | mOutEglFrameParams | ) |
Sets parameters of output EGL frames.
mOutEglFrameParams | EglFrameParams structure populated with desired EGL frame parameters. |
NvRosErr nvros::NvRosEglCudaIO::StopEglCuInputLoop | ( | ) |
Stops the iterative processing of the EGL CUDA pipeline over the input stream as started by RunEglCuInputLoop.
NvRosErr nvros::NvRosEglCudaIO::StopEglCuOutputLoop | ( | ) |
Stops the iterative processing of the EGL CUDA pipeline over the output stream as started by RunEglCuOutputLoop.