16 #include "cuda_runtime.h"
17 #include <cuda_gl_interop.h>
22 #include <cuda_runtime_api.h>
24 #include <NvCodec/NvEncoder/nvEncodeAPI.h>
28 #define MAX_ENCODE_QUEUE 32
38 , nvRegisteredResource(0)
40 , bufferFmt(NV_ENC_BUFFER_FORMAT_ARGB)
87 bool initialize(
DtDe* theDe,
const osg::ref_ptr<osg::Image>& image,
unsigned int frameRate);
90 void flipVertically(CUdeviceptr dev, uint32_t stride,
int height);
101 bool initCUDA(
const osg::ref_ptr<osg::Image>& image,
unsigned int frameRate);
104 void deinitNVidiaEncoder();
107 bool initNVidiaEncoder(
const osg::ref_ptr<osg::Image>& image,
unsigned int frameRate);