#ifndef REMOTEAR2_VIDEO_ENCODER_H #define REMOTEAR2_VIDEO_ENCODER_H #include // make windows happy #include #include class video_encoder { public: video_encoder(); ~video_encoder(); bool initialize(); bool start_encode(int width, int height, int fps, int bitrate, bool save_file = false, bool save_frame_length = true); 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(); // force next frame to be IDR frame void refresh(); private: struct impl; std::unique_ptr pimpl; }; #endif //REMOTEAR2_VIDEO_ENCODER_H