client: support cameras that provide base URL inside control attribute (https://github.com/aler9/rtsp-simple-server/issues/683)

This commit is contained in:
aler9
2022-05-11 16:51:48 +02:00
parent c1b10a80be
commit 811e189b43
7 changed files with 151 additions and 107 deletions

View File

@@ -14,6 +14,11 @@ import (
// SessionDescription is a SDP session description.
type SessionDescription psdp.SessionDescription
// Attribute returns the value of an attribute and if it exists
func (s *SessionDescription) Attribute(key string) (string, bool) {
return (*psdp.SessionDescription)(s).Attribute(key)
}
// Marshal encodes a SessionDescription.
func (s *SessionDescription) Marshal() ([]byte, error) {
return (*psdp.SessionDescription)(s).Marshal()