chore(libvideo2x)!: replace the C API with C++ API (#1245)

* chore(libvideo2x)!: replace the C API with C++ API
* fix: convert wide string to u8 for av_opt_set
* style: removed unnecessary enum and struct specifiers

Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
K4YT3X
2024-12-02 07:24:30 +00:00
committed by GitHub
parent 24d43a8478
commit f8dcad3aef
27 changed files with 420 additions and 457 deletions

View File

@@ -4,7 +4,19 @@
#include <filesystem>
#include <string>
#include "char_defs.h"
#ifdef _WIN32
typedef wchar_t CharType;
#define STR(x) L##x
#else
typedef char CharType;
#define STR(x) x
#endif
#ifdef _WIN32
typedef std::wstring StringType;
#else
typedef std::string StringType;
#endif
bool filepath_is_readable(const std::filesystem::path &path);
@@ -12,6 +24,8 @@ std::filesystem::path find_resource_file(const std::filesystem::path &path);
std::string path_to_u8string(const std::filesystem::path &path);
std::string wstring_to_u8string(const StringType &wstr);
StringType path_to_string_type(const std::filesystem::path &path);
StringType to_string_type(int value);