mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
46 lines
1.7 KiB
C++
46 lines
1.7 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* Ffmpeg.hpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/02/23 23:41:18 by tomoron #+# #+# */
|
|
/* Updated: 2025/02/25 14:47:37 by tomoron ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef FFMPEG_HPP
|
|
# define FFMPEG_HPP
|
|
|
|
#include "RT.hpp"
|
|
|
|
class Ffmpeg
|
|
{
|
|
public:
|
|
Ffmpeg(std::string filename, int fps, const AVCodec *codec);
|
|
~Ffmpeg();
|
|
|
|
void addImageToVideo(Scene &scene, std::vector<GLuint> &textures, ShaderProgram &denoisingProgram);
|
|
void addImageToVideo(std::vector<uint8_t> &buf);
|
|
|
|
static void updateAvailableCodecs(std::vector<const AVCodec *> &codecList, std::vector<const char *> &codecListStr, std::string filename, int mode, AVCodecID id);
|
|
|
|
private:
|
|
void convertAndAddToVid(void);
|
|
void endVideo(void);
|
|
|
|
static void fillGoodCodecList(std::vector<AVCodecID> &lst);
|
|
|
|
int64_t _pts;
|
|
AVFormatContext *_format;
|
|
AVCodecContext *_codec_context;
|
|
AVFrame *_rgb_frame;
|
|
AVFrame *_yuv_frame;
|
|
SwsContext *_sws_context;
|
|
AVStream *_stream;
|
|
AVDictionary *_codecOptions;
|
|
};
|
|
|
|
#endif
|