Introduced new transcoding service

This commit is contained in:
emeric
2025-05-30 23:27:01 +02:00
parent 8cf2e2b660
commit dc52ea4ea5
32 changed files with 487 additions and 301 deletions
+4 -3
View File
@@ -22,12 +22,13 @@
#include <fstream>
#include "core/ILogger.hpp"
#include "core/MimeTypes.hpp"
namespace lms
namespace lms::core
{
std::unique_ptr<IResourceHandler> createFileResourceHandler(const std::filesystem::path& path, std::string_view mimeType)
{
return std::make_unique<FileResourceHandler>(path, mimeType);
return std::make_unique<FileResourceHandler>(path, mimeType.empty() ? getMimeType(path.extension()) : mimeType);
}
FileResourceHandler::FileResourceHandler(const std::filesystem::path& path, std::string_view mimeType)
@@ -134,4 +135,4 @@ namespace lms
LMS_LOG(UTILS, DEBUG, "Job complete!");
return nullptr;
}
} // namespace lms
} // namespace lms::core