统一解析处理1078和28181流

This commit is contained in:
yangjiechina
2024-07-14 17:22:03 +08:00
parent 27da874258
commit ac39deea33
6 changed files with 359 additions and 291 deletions

View File

@@ -1,6 +1,7 @@
package stream
import (
"encoding/json"
"github.com/lkmio/avformat/utils"
"github.com/lkmio/lkm/log"
"net/http"
@@ -31,6 +32,10 @@ func PreparePublishSource(source Source, hook bool) (*http.Response, utils.HookS
source.StartIdleTimer()
}
urls := GetStreamPlayUrls(source.Id())
indent, _ := json.MarshalIndent(urls, "", "\t")
log.Sugar.Infof("%s准备推流 source:%s 拉流地址:\r\n%s", source.Type().ToString(), source.Id(), indent)
return response, utils.HookStateOK
}