| 123456789101112131415161718192021222324252627282930313233 |
- #ifndef REMOTEAR2_VIDEO_ENCODER_H
- #define REMOTEAR2_VIDEO_ENCODER_H
- #include <cuda_gl_interop.h>
- #include <memory>
- class video_encoder {
- public:
- video_encoder();
- ~video_encoder();
- bool initialize();
- bool start_encode(int width, int height, int fps);
- void stop_encode();
- bool encode_frame(void *frame_ptr, void **output_ptr, size_t *output_size);
- bool encode_frame(cudaGraphicsResource *res, void **output_ptr, size_t *output_size);
- bool is_encoding();
- private:
- struct impl;
- std::unique_ptr<impl> pimpl;
- };
- #endif //REMOTEAR2_VIDEO_ENCODER_H
|