mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-10-07 22:10:51 +08:00
fix: snap plugin
This commit is contained in:
@@ -4,14 +4,15 @@ import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
m7s "m7s.live/v5"
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"google.golang.org/protobuf/types/known/emptypb"
|
||||
m7s "m7s.live/v5"
|
||||
|
||||
globalPB "m7s.live/v5/pb"
|
||||
"m7s.live/v5/plugin/transcode/pb"
|
||||
transcode "m7s.live/v5/plugin/transcode/pkg"
|
||||
@@ -137,13 +138,8 @@ func parseCrop(cropString string) (string, error) {
|
||||
|
||||
func (t *TranscodePlugin) Launch(ctx context.Context, transReq *pb.TransRequest) (response *globalPB.SuccessResponse, err error) {
|
||||
var publisher *m7s.Publisher
|
||||
var ok bool
|
||||
t.Server.Server.Call(func() error {
|
||||
publisher, ok = t.Server.Streams.Get(transReq.SrcStream)
|
||||
return nil
|
||||
})
|
||||
if !ok {
|
||||
err = fmt.Errorf("src stream not found")
|
||||
publisher, err = t.Server.GetPublisher(transReq.SrcStream)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
response = &globalPB.SuccessResponse{}
|
||||
|
Reference in New Issue
Block a user