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_push_session.go

28 lines
591 B
Go

package rtmp
type PushSession struct {
*ClientSession
}
type PushSessionTimeout struct {
ConnectTimeoutMS int
PushTimeoutMS int
WriteAVTimeoutMS int
}
func NewPushSession(timeout PushSessionTimeout) *PushSession {
return &PushSession{
ClientSession: NewClientSession(CSTPushSession, nil, ClientSessionTimeout{
ConnectTimeoutMS: timeout.ConnectTimeoutMS,
DoTimeoutMS: timeout.PushTimeoutMS,
WriteAVTimeoutMS: timeout.WriteAVTimeoutMS,
}),
}
}
func (s *PushSession) Push(rawURL string) error {
return s.Do(rawURL)
}
// TODO chef: add function to write av data