// Copyright 2022, Guillaume Meunier // Copyright 2022, Patrick Nicolas // SPDX-License-Identifier: BSL-1.0 #pragma once #include #include #include #include #include "vk/vk_helpers.h" struct AVBufferRef; struct AVFilterGraph; struct AVFrame; struct AVCodecContext; extern "C" { #include } const std::error_category & av_error_category(); AVPixelFormat vk_format_to_av_format(VkFormat vk_fmt); uint32_t vk_format_to_fourcc(VkFormat vk_fmt); struct AvDeleter { void operator()(AVBufferRef *); void operator()(AVFrame *); void operator()(AVCodecContext *); void operator()(AVFilterGraph *); }; using av_buffer_ptr = std::unique_ptr; using av_frame_ptr = std::unique_ptr; using av_codec_context_ptr = std::unique_ptr; using av_filter_graph_ptr = std::unique_ptr; av_buffer_ptr make_av_buffer(AVBufferRef *); av_frame_ptr make_av_frame(AVFrame *); av_frame_ptr make_av_frame();