fixed audiostream, tasks andd other shit

This commit is contained in:
tdv
2025-10-15 19:14:52 +03:00
parent 2385252fcc
commit 6bfee40029
4 changed files with 105 additions and 31 deletions

View File

@@ -60,17 +60,17 @@ public:
std::filesystem::path crt = "/etc/iot/keys/device.crt.pem";
// extract client key via keyctl
auto tmpKey = snoop::device_sec::ExtractClientKeyFromKernelKeyring();
if (!tmpKey.string().empty()) {
spdlog::error("Cannot extract client key for WHIP (keyctl user iot-client-key)");
return false;
}
// auto tmpKey = snoop::device_sec::ExtractClientKeyFromKernelKeyring();
// if (!tmpKey.string().empty()) {
// spdlog::error("Cannot extract client key for WHIP (keyctl user iot-client-key)");
// return false;
// }
WhipClient::Params p{
.whipUrl = whipUrl,
.caPath = ca.string(),
.crtPath = crt.string(),
.keyPath = tmpKey,
// .keyPath = tmpKey,
.sampleRate= sampleRate,
.channels = channels
};
@@ -78,11 +78,11 @@ public:
try {
m_whip->Start();
spdlog::info("WHIP started");
m_tmpKeyPath = tmpKey;
// m_tmpKeyPath = tmpKey;
return true;
} catch (const std::exception& e) {
spdlog::error("WHIP start failed: {}", e.what());
std::error_code ec; std::filesystem::remove(tmpKey, ec);
// std::error_code ec; std::filesystem::remove(tmpKey, ec);
m_whip.reset();
return false;
}