mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-27 05:35:57 +08:00
16 lines
465 B
Go
16 lines
465 B
Go
package plugin_rtmp
|
|
|
|
import (
|
|
"context"
|
|
gpb "m7s.live/m7s/v5/pb"
|
|
"m7s.live/m7s/v5/pkg/config"
|
|
"m7s.live/m7s/v5/plugin/rtmp/pb"
|
|
rtmp "m7s.live/m7s/v5/plugin/rtmp/pkg"
|
|
)
|
|
|
|
func (r *RTMPPlugin) PushOut(ctx context.Context, req *pb.PushRequest) (res *gpb.SuccessResponse, err error) {
|
|
pusher := rtmp.NewPusher()
|
|
err = pusher.GetPushJob().Init(pusher, &r.Plugin, req.StreamPath, config.Push{URL: req.RemoteURL}).WaitStarted()
|
|
return &gpb.SuccessResponse{}, err
|
|
}
|