Restore Announce method for RTSP
This commit is contained in:
+20
-18
@@ -319,24 +319,26 @@ func (c *Conn) Describe() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//func (c *Conn) Announce() (err error) {
|
func (c *Conn) Announce() (err error) {
|
||||||
// req := &tcp.Request{
|
req := &tcp.Request{
|
||||||
// Method: MethodAnnounce,
|
Method: MethodAnnounce,
|
||||||
// URL: c.URL,
|
URL: c.URL,
|
||||||
// Header: map[string][]string{
|
Header: map[string][]string{
|
||||||
// "Content-Type": {"application/sdp"},
|
"Content-Type": {"application/sdp"},
|
||||||
// },
|
},
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// //req.Body, err = c.sdp.Marshal()
|
req.Body, err = streamer.MarshalSDP(c.SessionName, c.Medias)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// return
|
return err
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// _, err = c.Do(req)
|
res, err := c.Do(req)
|
||||||
//
|
|
||||||
// return
|
_ = res
|
||||||
//}
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
func (c *Conn) Setup() error {
|
func (c *Conn) Setup() error {
|
||||||
for _, media := range c.Medias {
|
for _, media := range c.Medias {
|
||||||
|
|||||||
Reference in New Issue
Block a user