mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
Add per path metadata
This commit is contained in:
parent
b4e4f54729
commit
078b3aa29b
3 changed files with 5 additions and 0 deletions
|
|
@ -229,6 +229,9 @@ type Path struct {
|
||||||
RunOnUnread string `json:"runOnUnread"`
|
RunOnUnread string `json:"runOnUnread"`
|
||||||
RunOnRecordSegmentCreate string `json:"runOnRecordSegmentCreate"`
|
RunOnRecordSegmentCreate string `json:"runOnRecordSegmentCreate"`
|
||||||
RunOnRecordSegmentComplete string `json:"runOnRecordSegmentComplete"`
|
RunOnRecordSegmentComplete string `json:"runOnRecordSegmentComplete"`
|
||||||
|
|
||||||
|
// Custom metadata
|
||||||
|
Metadata map[string]any `json:"metadata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pconf *Path) setDefaults() {
|
func (pconf *Path) setDefaults() {
|
||||||
|
|
|
||||||
|
|
@ -590,6 +590,7 @@ func (pa *path) doAPIPathsGet(req pathAPIPathsGetReq) {
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
}(),
|
}(),
|
||||||
|
Metadata: pa.conf.Metadata,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ type APIPath struct {
|
||||||
BytesReceived uint64 `json:"bytesReceived"`
|
BytesReceived uint64 `json:"bytesReceived"`
|
||||||
BytesSent uint64 `json:"bytesSent"`
|
BytesSent uint64 `json:"bytesSent"`
|
||||||
Readers []APIPathSourceOrReader `json:"readers"`
|
Readers []APIPathSourceOrReader `json:"readers"`
|
||||||
|
Metadata map[string]any `json:"metadata" yaml:"metadata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// APIPathList is a list of paths.
|
// APIPathList is a list of paths.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue