Audio file metadata and thumbnails

This commit is contained in:
Robin E. R. Davies
2025-05-31 21:06:34 -04:00
parent 13e2f6b5bb
commit c4e0b0ff46
44 changed files with 3490 additions and 661 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
if (CMAKE_BUILD_TYPE MATCHES Debug)
message(STATUS "Debug build")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -DDEBUG -D_GLIBCXX_DEBUG" )
# Must not use -D_GLIBCXX_DEBUG (incompatible with SQLiteCpp)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -DDEBUG " )
endif()
# Can't get the pkg_check to work.
+8 -2
View File
@@ -268,7 +268,7 @@ int pipedal::sysExecWait(ProcessId pid_)
}
SysExecOutput pipedal::sysExecForOutput(const std::string &program, const std::string &args)
SysExecOutput pipedal::sysExecForOutput(const std::string &program, const std::string &args, bool discardStderr)
{
namespace fs = std::filesystem;
fs::path fullPath = findOnSystemPath(program);
@@ -277,7 +277,13 @@ SysExecOutput pipedal::sysExecForOutput(const std::string &program, const std::s
throw std::runtime_error(SS("Path does not exist. " << fullPath));
}
std::stringstream s;
s << fullPath.c_str() << " " << args << " 2>&1";
s << fullPath.c_str() << " " << args;
if (discardStderr)
{
s << " 2>/dev/null";
} else {
s << " 2>&1"; // redirect stderr to stdout
}
std::string fullCommand = s.str();
FILE *output = popen(fullCommand.c_str(), "r");
+1 -1
View File
@@ -34,7 +34,7 @@ namespace pipedal
std::string output;
};
SysExecOutput sysExecForOutput(const std::string& command, const std::string&args);
SysExecOutput sysExecForOutput(const std::string& command, const std::string&args, bool discardStderr = false);
using ProcessId = int64_t; // platform-agnostic wrapper for pid_t;
// Returns a pid or -1 on errror.