server now receives images and create final video. server now handles clients disconnect

This commit is contained in:
2025-02-25 22:33:18 +01:00
parent 29f00cf9b2
commit 5ba33c4f69
11 changed files with 320 additions and 72 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/23 23:28:19 by tomoron #+# #+# */
/* Updated: 2025/02/24 00:44:26 by tomoron ### ########.fr */
/* Updated: 2025/02/25 14:47:15 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -121,6 +121,12 @@ void Ffmpeg::addImageToVideo(Scene &scene, std::vector<GLuint> &textures, Shade
convertAndAddToVid();
}
void Ffmpeg::addImageToVideo(std::vector<uint8_t> &buf)
{
memcpy(_rgb_frame->data[0], buf.data(), WIDTH * HEIGHT * 3);
convertAndAddToVid();
}
void Ffmpeg::convertAndAddToVid(void)
{
AVPacket *pkt;