// AUTOGENERATED COPYRIGHT HEADER START
// Copyright (C) 2020-2023 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
// AUTOGENERATED COPYRIGHT HEADER END
// Copyright (C) 2022 Carsten Braun <info@braun-cloud.de>

#pragma once
#include "encoders/encoder-ffmpeg.hpp"
#include "encoders/ffmpeg/handler.hpp"

#include "warning-disable.hpp"
extern "C" {
#include <libavcodec/avcodec.h>
}
#include "warning-enable.hpp"

namespace streamfx::encoder::ffmpeg {
	class dnxhd : public handler {
		public:
		dnxhd();
		virtual ~dnxhd();

		virtual bool has_keyframes(ffmpeg_factory* factory);

		virtual void adjust_info(ffmpeg_factory* factory, std::string& id, std::string& name, std::string& codec);

		virtual std::string help(ffmpeg_factory* factory) {
			return "https://github.com/Xaymar/obs-StreamFX/wiki/Encoder-FFmpeg-Avid-DNxHR";
		}

		virtual void defaults(ffmpeg_factory* factory, obs_data_t* settings);
		virtual void properties(ffmpeg_factory* factory, ffmpeg_instance* instance, obs_properties_t* props);
		virtual void update(ffmpeg_factory* factory, ffmpeg_instance* instance, obs_data_t* settings);
		virtual void log(ffmpeg_factory* factory, ffmpeg_instance* instance, obs_data_t* settings);

		virtual void override_colorformat(ffmpeg_factory* factory, ffmpeg_instance* instance, obs_data_t* settings, AVPixelFormat& target_format);
	};
} // namespace streamfx::encoder::ffmpeg
