gl_utils: FrameUploader: supported codecs

This commit is contained in:
Martin Piatka
2024-01-15 15:14:44 +01:00
parent 77ad10d9f4
commit 3927814da7
2 changed files with 15 additions and 0 deletions

View File

@@ -411,6 +411,18 @@ void FrameUploader::put_frame(video_frame *f, bool pbo_frame){
}
}
std::vector<codec_t> FrameUploader::get_supported_codecs(){
std::vector<codec_t> ret;
ret.push_back(RGB);
ret.push_back(RGBA);
auto cvt = get_convertor_supported_codecs();
ret.insert(ret.end(), cvt.begin(), cvt.end());
return ret;
}
void FlatVideoScene::init(){
const char *vert_src = R"END(
#version 330 core

View File

@@ -57,6 +57,7 @@
//#include <SDL2/SDL_opengl.h>
#include <mutex>
#include <memory>
#include <vector>
#include <cassert>
#include "types.h"
@@ -358,6 +359,8 @@ public:
void put_frame(video_frame *f, bool pbo_frame = false);
void attach_dst_texture(Texture *tex){ this->tex = tex; }
std::vector<codec_t> get_supported_codecs();
private:
std::unique_ptr<Frame_convertor> conv;
Texture *tex = nullptr;