mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-15 11:14:43 +00:00
add log messages when runOnPublish is started or stopped
This commit is contained in:
parent
ae0d959892
commit
091056dd8e
@ -565,6 +565,7 @@ func (pa *path) sourceSetReady(tracks gortsplib.Tracks) {
|
|||||||
|
|
||||||
func (pa *path) sourceSetNotReady() {
|
func (pa *path) sourceSetNotReady() {
|
||||||
if pa.onPublishCmd != nil {
|
if pa.onPublishCmd != nil {
|
||||||
|
pa.Log(logger.Info, "on publish command stopped")
|
||||||
pa.onPublishCmd.Close()
|
pa.onPublishCmd.Close()
|
||||||
pa.onPublishCmd = nil
|
pa.onPublishCmd = nil
|
||||||
}
|
}
|
||||||
@ -728,6 +729,7 @@ func (pa *path) handlePublisherRecord(req pathPublisherRecordReq) {
|
|||||||
pa.sourceSetReady(req.Tracks)
|
pa.sourceSetReady(req.Tracks)
|
||||||
|
|
||||||
if pa.conf.RunOnPublish != "" {
|
if pa.conf.RunOnPublish != "" {
|
||||||
|
pa.Log(logger.Info, "on publish command started")
|
||||||
_, port, _ := net.SplitHostPort(pa.rtspAddress)
|
_, port, _ := net.SplitHostPort(pa.rtspAddress)
|
||||||
pa.onPublishCmd = externalcmd.New(pa.conf.RunOnPublish, pa.conf.RunOnPublishRestart, externalcmd.Environment{
|
pa.onPublishCmd = externalcmd.New(pa.conf.RunOnPublish, pa.conf.RunOnPublishRestart, externalcmd.Environment{
|
||||||
Path: pa.name,
|
Path: pa.name,
|
||||||
|
Loading…
Reference in New Issue
Block a user