2023-02-28 01:15:26 +00:00
|
|
|
// AUTOGENERATED COPYRIGHT HEADER START
|
|
|
|
// Copyright (C) 2021-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
|
|
|
// AUTOGENERATED COPYRIGHT HEADER END
|
2021-05-02 23:13:19 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "nvidia/cv/nvidia-cv-image.hpp"
|
|
|
|
#include "obs/gs/gs-texture.hpp"
|
|
|
|
|
2022-08-29 10:29:44 +00:00
|
|
|
#include "warning-disable.hpp"
|
|
|
|
#include <cinttypes>
|
|
|
|
#include "warning-enable.hpp"
|
|
|
|
|
2021-05-02 23:13:19 +00:00
|
|
|
namespace streamfx::nvidia::cv {
|
|
|
|
using ::streamfx::nvidia::cv::component_layout;
|
|
|
|
using ::streamfx::nvidia::cv::component_type;
|
|
|
|
using ::streamfx::nvidia::cv::image;
|
|
|
|
using ::streamfx::nvidia::cv::memory_location;
|
|
|
|
using ::streamfx::nvidia::cv::pixel_format;
|
|
|
|
|
|
|
|
class texture : public image {
|
|
|
|
std::shared_ptr<::streamfx::obs::gs::texture> _texture;
|
|
|
|
|
|
|
|
public:
|
|
|
|
~texture() override;
|
|
|
|
texture(uint32_t width, uint32_t height, gs_color_format pix_fmt);
|
|
|
|
|
|
|
|
void resize(uint32_t width, uint32_t height) override;
|
|
|
|
|
|
|
|
std::shared_ptr<::streamfx::obs::gs::texture> get_texture();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void alloc();
|
|
|
|
void free();
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace streamfx::nvidia::cv
|