refactor: task system

This commit is contained in:
langhuihui
2024-08-24 21:11:32 +08:00
parent e883bb94cd
commit d9f9df06b7
42 changed files with 407 additions and 313 deletions

View File

@@ -9,6 +9,6 @@ import (
func (r *RTMPPlugin) PushOut(ctx context.Context, req *pb.PushRequest) (res *gpb.SuccessResponse, err error) {
pusher := rtmp.NewPusher()
err = r.Server.AddPushTask(pusher.GetPushContext().Init(pusher, &r.Plugin, req.StreamPath, req.RemoteURL)).WaitStarted()
err = pusher.GetPushContext().Init(pusher, &r.Plugin, req.StreamPath, req.RemoteURL).WaitStarted()
return &gpb.SuccessResponse{}, err
}