This commit is contained in:
cxh 2025-12-18 08:59:01 +08:00
parent 09fdc0a875
commit 99228c832c

View File

@ -71,7 +71,7 @@ GstElement* RTMPManager::create_pipeline(const Camera& cam)
const int bitrate = cam.bitrate;
// MediaMTX 中的 stream key
const std::string stream_name = cam.name + "_main";
const std::string stream_name = cam.name;
// RTMP 推送到 MediaMTX
// mediamtx.yml 中 paths 会自动创建
@ -354,7 +354,7 @@ std::string RTMPManager::get_stream_url(const std::string& cam_name)
{
std::string ip = get_ip_address("enP2p33s0");
if (ip.empty()) ip = "127.0.0.1";
return "rtsp://" + ip + ":18554/" + cam_name + "_main";
return "rtsp://" + ip + ":18554/" + cam_name;
}
// ========== 汇总状态 ==========
std::vector<RTMPManager::ChannelInfo> RTMPManager::get_all_channels_status()