mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
allow setting additional properties of streams through description.Stream
This commit is contained in:
@@ -32,14 +32,14 @@ func main() {
|
||||
defer c.Close()
|
||||
|
||||
// find published medias
|
||||
medias, baseURL, _, err := c.Describe(u)
|
||||
desc, _, err := c.Describe(u)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// find the VP8 media and format
|
||||
var forma *format.VP8
|
||||
medi := medias.FindFormat(&forma)
|
||||
medi := desc.FindFormat(&forma)
|
||||
if medi == nil {
|
||||
panic("media not found")
|
||||
}
|
||||
@@ -51,7 +51,7 @@ func main() {
|
||||
}
|
||||
|
||||
// setup a single media
|
||||
_, err = c.Setup(baseURL, medi, 0, 0)
|
||||
_, err = c.Setup(desc.BaseURL, medi, 0, 0)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user