Audio file metadata and thumbnails
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user