代码拉取完成,页面将自动刷新
package rtsp
import "errors"
// const errors
var (
ErrorInterleavedFrameHeaderTooShort = errors.New("interleave frame too short")
ErrorInterleavedMagicNumberWrong = errors.New("interleaved magic number wrong")
ErrorClientAlreadyStopped = errors.New("RTSP client already stopped")
ErrorTimeout = errors.New("Timeout")
ErrorUserinfoNeed = errors.New("Need user info to login")
ErrorRTPTooShort = errors.New("RTP packet is too short")
ErrorDropFrame = errors.New("drop frame due to full queue")
ErrorNotImplement = errors.New("not implement")
ErrorQueueFull = errors.New("drop data due to queue full")
)
// StatusError for response
type StatusError struct {
statusCode int
body string
}
// NewStatusError of RTSP
func NewStatusError(statusCode int, body string) error {
return &StatusError{
statusCode: statusCode,
body: body,
}
}
func (se StatusError) Error() string {
if len(se.body) > 0 {
return se.body
}
if statusText, ok := statusText[se.statusCode]; ok {
return statusText
}
return "Unknown"
}
type badStringError struct {
Msg string
Line string
}
func (e *badStringError) Error() string {
return e.Msg + " " + e.Line
}
type missingError struct {
Part string
}
func (e *missingError) Error() string {
return "Missing " + e.Part
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。