feat(libplacebo): added Vulkan device selection for libplacebo

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
k4yt3x
2024-11-04 00:00:00 +00:00
parent 77a06e7d92
commit ec4b51064a
6 changed files with 37 additions and 15 deletions

View File

@@ -9,13 +9,13 @@ extern "C" {
}
int init_libplacebo(
AVBufferRef *hw_ctx,
AVFilterGraph **filter_graph,
AVFilterContext **buffersrc_ctx,
AVFilterContext **buffersink_ctx,
AVCodecContext *dec_ctx,
int out_width,
int out_height,
uint32_t vk_device_index,
const std::filesystem::path &shader_path
);

View File

@@ -17,15 +17,21 @@ class LibplaceboFilter : public Filter {
AVFilterGraph *filter_graph;
AVFilterContext *buffersrc_ctx;
AVFilterContext *buffersink_ctx;
uint32_t vk_device_index;
const std::filesystem::path shader_path;
int out_width;
int out_height;
const std::filesystem::path shader_path;
AVRational in_time_base;
AVRational out_time_base;
public:
// Constructor
LibplaceboFilter(int width, int height, const std::filesystem::path &shader_path);
LibplaceboFilter(
uint32_t vk_device_index,
const std::filesystem::path &shader_path,
int width,
int height
);
// Destructor
virtual ~LibplaceboFilter() override;