#pragma once #define WIN32_MEAN_AND_LEAN #include #undef WIN32_MEAN_AND_LEAN #include #include #include #include #include namespace MF { enum class EncoderType { H264_SOFTWARE, H264_QSV, H264_NVENC, H264_VCE, }; static const char *typeNames[] = { "Software", "Quicksync", "NVENC", "AMD VCE", }; class EncoderDescriptor { public: static std::vector> EncoderDescriptor::Enumerate(); public: EncoderDescriptor(ComPtr activate_, const char *name_, const char *id_, GUID &guid_, const std::string &guidString_, bool isAsync_, bool isHardware_, EncoderType type_) : activate (activate_), name (name_), id (id_), guid (guid_), guidString (guidString_), isAsync (isAsync_), isHardware (isHardware_), type (type_) {} EncoderDescriptor(const EncoderDescriptor &) = delete; public: const char *Name() const { return name; } const char *Id() const { return id; } ComPtr &Activator() { return activate; } GUID &Guid() { return guid; } std::string GuidString() const { return guidString; } bool Async() const { return isAsync; } bool Hardware() const { return isHardware; } EncoderType Type() const { return type; } private: ComPtr activate; const char *name; const char *id; GUID guid; std::string guidString; bool isAsync; bool isHardware; EncoderType type; }; };