mirror of
https://github.com/aler9/gortsplib
synced 2025-10-12 18:40:07 +08:00
remove deprecated entities (#220)
This commit is contained in:
14
client.go
14
client.go
@@ -225,10 +225,6 @@ type Client struct {
|
||||
OnRequest func(*base.Request)
|
||||
// called after every response.
|
||||
OnResponse func(*base.Response)
|
||||
// Deprecated. replaced by Log.
|
||||
OnWarning func(error)
|
||||
// Deprecated. replaced by Log.
|
||||
OnDecodeError func(error)
|
||||
|
||||
//
|
||||
// logging (all optional)
|
||||
@@ -339,16 +335,6 @@ func (c *Client) Start(scheme string, host string) error {
|
||||
c.OnResponse = func(*base.Response) {
|
||||
}
|
||||
}
|
||||
if c.OnDecodeError != nil {
|
||||
c.Log = func(level LogLevel, format string, args ...interface{}) {
|
||||
c.OnDecodeError(fmt.Errorf(format, args...))
|
||||
}
|
||||
}
|
||||
if c.OnWarning != nil {
|
||||
c.Log = func(level LogLevel, format string, args ...interface{}) {
|
||||
c.OnDecodeError(fmt.Errorf(format, args...))
|
||||
}
|
||||
}
|
||||
|
||||
if c.Log == nil {
|
||||
c.Log = defaultLog
|
||||
|
Reference in New Issue
Block a user