You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lal/pkg/rtmp/client_pull_session.go

30 lines
625 B
Go

package rtmp
type PullSessionObserver interface {
AVMsgObserver
}
type PullSession struct {
*ClientSession
}
type PullSessionTimeout struct {
ConnectTimeoutMS int
PullTimeoutMS int
ReadAVTimeoutMS int
}
func NewPullSession(obs PullSessionObserver, timeout PullSessionTimeout) *PullSession {
return &PullSession{
ClientSession: NewClientSession(CSTPullSession, obs, ClientSessionTimeout{
ConnectTimeoutMS: timeout.ConnectTimeoutMS,
DoTimeoutMS: timeout.PullTimeoutMS,
ReadAVTimeoutMS: timeout.ReadAVTimeoutMS,
}),
}
}
func (s *PullSession) Pull(rawURL string) error {
return s.Do(rawURL)
}