36 lines
1.1 KiB
Go
36 lines
1.1 KiB
Go
/**
|
|
* package mediaserver
|
|
*
|
|
* 错误定义
|
|
*/
|
|
package mediaserver
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
// 房间相关错误
|
|
ErrRoomNotFound = errors.New("room not found")
|
|
ErrRoomFull = errors.New("room is full")
|
|
ErrRoomClosed = errors.New("room is closed")
|
|
ErrAlreadyInRoom = errors.New("user already in room")
|
|
ErrNotInRoom = errors.New("user not in room")
|
|
|
|
// 参与者相关错误
|
|
ErrParticipantNotFound = errors.New("participant not found")
|
|
ErrInvalidParticipantType = errors.New("invalid participant type")
|
|
|
|
// 媒体相关错误
|
|
ErrMediaServerDisabled = errors.New("media server is disabled")
|
|
ErrSFUNotReady = errors.New("SFU server is not ready")
|
|
ErrRTMPNotReady = errors.New("RTMP server is not ready")
|
|
ErrStreamNotFound = errors.New("stream not found")
|
|
ErrInvalidOffer = errors.New("invalid SDP offer")
|
|
ErrInvalidAnswer = errors.New("invalid SDP answer")
|
|
ErrICEConnectionFailed = errors.New("ICE connection failed")
|
|
|
|
// 编解码相关错误
|
|
ErrUnsupportedCodec = errors.New("unsupported codec")
|
|
ErrTranscodeFailed = errors.New("transcode failed")
|
|
)
|
|
|