feat: stream/info接口返回拉流端计数

This commit is contained in:
ydajiang
2025-08-30 17:07:09 +08:00
parent 6ce491445d
commit c5851a0e01

2
api.go
View File

@@ -613,7 +613,7 @@ func (api *ApiServer) OnStreamInfo(w http.ResponseWriter, r *http.Request) {
HLS: liveGBSUrls["hls"], HLS: liveGBSUrls["hls"],
InBitRate: statistics.PreviousSecond() * 8 / 1024, InBitRate: statistics.PreviousSecond() * 8 / 1024,
InBytes: int(statistics.Total()), InBytes: int(statistics.Total()),
NumOutputs: 0, NumOutputs: source.GetTransStreamPublisher().SinkCount(),
Ondemand: true, Ondemand: true,
OutBytes: 0, OutBytes: 0,
RTMP: liveGBSUrls["rtmp"], RTMP: liveGBSUrls["rtmp"],