Simplified some path writes

This commit is contained in:
emeric
2025-01-06 22:29:46 +01:00
parent 06a4db51f7
commit 10d900faf2
25 changed files with 59 additions and 65 deletions
+4 -4
View File
@@ -130,17 +130,17 @@ namespace lms::av
AudioFile::AudioFile(const std::filesystem::path& p)
: _p{ p }
{
int error{ avformat_open_input(&_context, _p.string().c_str(), nullptr, nullptr) };
int error{ avformat_open_input(&_context, _p.c_str(), nullptr, nullptr) };
if (error < 0)
{
LMS_LOG(AV, ERROR, "Cannot open " << _p.string() << ": " << averror_to_string(error));
LMS_LOG(AV, ERROR, "Cannot open " << _p << ": " << averror_to_string(error));
throw AudioFileException{ error };
}
error = avformat_find_stream_info(_context, nullptr);
if (error < 0)
{
LMS_LOG(AV, ERROR, "Cannot find stream information on " << _p.string() << ": " << averror_to_string(error));
LMS_LOG(AV, ERROR, "Cannot find stream information on " << _p << ": " << averror_to_string(error));
avformat_close_input(&_context);
throw AudioFileException{ error };
}
@@ -353,7 +353,7 @@ namespace lms::av
{ ".mka", "audio/x-matroska" },
};
auto it{ entries.find(core::stringUtils::stringToLower(fileExtension.string())) };
auto it{ entries.find(core::stringUtils::stringToLower(fileExtension.c_str())) };
if (it == std::cend(entries))
return "";
+1 -1
View File
@@ -90,7 +90,7 @@ namespace lms::av::transcoding
throw Exception{ "File error '" + _inputParameters.trackPath.string() + "': " + e.what() };
}
LOG(INFO, "Transcoding file '" << _inputParameters.trackPath.string() << "'");
LOG(INFO, "Transcoding file " << _inputParameters.trackPath);
std::vector<std::string> args;