client: build track URLs by using Content-Base, when provided by server

This commit is contained in:
aler9
2021-04-03 15:45:14 +02:00
parent c946e4b6cf
commit 1f8d7a9ae7
9 changed files with 312 additions and 120 deletions

View File

@@ -113,16 +113,3 @@ func (u *URL) RTSPPathAndQuery() (string, bool) {
return pathAndQuery, true
}
// AddControlAttribute adds a control attribute to a RTSP url.
func (u *URL) AddControlAttribute(controlPath string) {
if controlPath[0] != '?' {
controlPath = "/" + controlPath
}
// insert the control attribute at the end of the url
// if there's a query, insert it after the query
// otherwise insert it after the path
nu, _ := ParseURL(u.String() + controlPath)
*u = *nu
}