ffmepg 导入, 视频解码初始化逻辑, 视频解码线程逻辑

This commit is contained in:
Jie
2024-09-30 16:11:07 +08:00
parent 1237b164bf
commit 15018f4079
8 changed files with 127 additions and 6 deletions

View File

@@ -3,11 +3,13 @@
#include <string>
#include <SFML/Graphics.hpp>
#include <memory>
#include "videoService.h"
class MediaService
{
private:
ImageService *imageService = nullptr;
VideoService *videoService = nullptr;
MediaType type;
std::shared_ptr<sf::Texture> texture;
std::shared_ptr<sf::Sprite> sprite;
@@ -16,7 +18,10 @@ private:
int client_height = 0;
public:
MediaService(const std::string &filename, int width, int height);
~MediaService() = default;
~MediaService(){
delete imageService;
delete videoService;
}
std::shared_ptr<sf::Sprite> GetSprite()
{
return sprite;