mirror of
https://github.com/langhuihui/monibuca.git
synced 2026-05-08 10:41:07 +08:00
fix:1.rtp/pkg/video.go playLoad maybe length is 0
2.exception.go delete oldest file sql must search end_time is not 1970-01-01 00:00:00
This commit is contained in:
+339
-4
@@ -1270,6 +1270,24 @@ func local_request_Api_GetPullProxyList_0(ctx context.Context, marshaler runtime
|
||||
|
||||
}
|
||||
|
||||
func request_Api_GetPullProxyList_1(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := client.GetPullProxyList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Api_GetPullProxyList_1(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
msg, err := server.GetPullProxyList(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Api_AddPullProxy_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -1296,6 +1314,32 @@ func local_request_Api_AddPullProxy_0(ctx context.Context, marshaler runtime.Mar
|
||||
|
||||
}
|
||||
|
||||
func request_Api_AddPullProxy_1(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.AddPullProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Api_AddPullProxy_1(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.AddPullProxy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Api_RemovePullProxy_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RequestWithId
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -1356,6 +1400,66 @@ func local_request_Api_RemovePullProxy_0(ctx context.Context, marshaler runtime.
|
||||
|
||||
}
|
||||
|
||||
func request_Api_RemovePullProxy_1(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RequestWithId
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.Uint32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := client.RemovePullProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Api_RemovePullProxy_1(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RequestWithId
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["id"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id")
|
||||
}
|
||||
|
||||
protoReq.Id, err = runtime.Uint32(val)
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
|
||||
}
|
||||
|
||||
msg, err := server.RemovePullProxy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Api_UpdatePullProxy_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -1382,6 +1486,32 @@ func local_request_Api_UpdatePullProxy_0(ctx context.Context, marshaler runtime.
|
||||
|
||||
}
|
||||
|
||||
func request_Api_UpdatePullProxy_1(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.UpdatePullProxy(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Api_UpdatePullProxy_1(ctx context.Context, marshaler runtime.Marshaler, server ApiServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq PullProxyInfo
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.UpdatePullProxy(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Api_GetPushProxyList_0(ctx context.Context, marshaler runtime.Marshaler, client ApiClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq emptypb.Empty
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -1552,6 +1682,7 @@ func local_request_Api_GetTransformList_0(ctx context.Context, marshaler runtime
|
||||
// UnaryRPC :call ApiServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterApiHandlerFromEndpoint instead.
|
||||
// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
|
||||
func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApiServer) error {
|
||||
|
||||
mux.Handle("GET", pattern_Api_SysInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
@@ -2279,6 +2410,31 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Api_GetPullProxyList_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/global.Api/GetPullProxyList", runtime.WithHTTPPathPattern("/api/device/list"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Api_GetPullProxyList_1(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_GetPullProxyList_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_AddPullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -2304,6 +2460,31 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_AddPullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/global.Api/AddPullProxy", runtime.WithHTTPPathPattern("/api/device/add"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Api_AddPullProxy_1(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_AddPullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_RemovePullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -2329,6 +2510,31 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_RemovePullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/global.Api/RemovePullProxy", runtime.WithHTTPPathPattern("/api/device/add/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Api_RemovePullProxy_1(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_RemovePullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_UpdatePullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -2354,6 +2560,31 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_UpdatePullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/global.Api/UpdatePullProxy", runtime.WithHTTPPathPattern("/api/device/update"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Api_UpdatePullProxy_1(annotatedContext, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_UpdatePullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Api_GetPushProxyList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -2510,21 +2741,21 @@ func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
||||
// RegisterApiHandlerFromEndpoint is same as RegisterApiHandler but
|
||||
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
|
||||
func RegisterApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
|
||||
conn, err := grpc.DialContext(ctx, endpoint, opts...)
|
||||
conn, err := grpc.NewClient(endpoint, opts...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
if cerr := conn.Close(); cerr != nil {
|
||||
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr)
|
||||
}
|
||||
}()
|
||||
}()
|
||||
@@ -2542,7 +2773,7 @@ func RegisterApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.C
|
||||
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ApiClient".
|
||||
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ApiClient"
|
||||
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
|
||||
// "ApiClient" to call the correct interceptors.
|
||||
// "ApiClient" to call the correct interceptors. This client ignores the HTTP middlewares.
|
||||
func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApiClient) error {
|
||||
|
||||
mux.Handle("GET", pattern_Api_SysInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
@@ -3183,6 +3414,28 @@ func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Api_GetPullProxyList_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/global.Api/GetPullProxyList", runtime.WithHTTPPathPattern("/api/device/list"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Api_GetPullProxyList_1(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_GetPullProxyList_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_AddPullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3205,6 +3458,28 @@ func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_AddPullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/global.Api/AddPullProxy", runtime.WithHTTPPathPattern("/api/device/add"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Api_AddPullProxy_1(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_AddPullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_RemovePullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3227,6 +3502,28 @@ func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_RemovePullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/global.Api/RemovePullProxy", runtime.WithHTTPPathPattern("/api/device/add/{id}"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Api_RemovePullProxy_1(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_RemovePullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_UpdatePullProxy_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3249,6 +3546,28 @@ func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Api_UpdatePullProxy_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
var err error
|
||||
var annotatedContext context.Context
|
||||
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/global.Api/UpdatePullProxy", runtime.WithHTTPPathPattern("/api/device/update"))
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Api_UpdatePullProxy_1(annotatedContext, inboundMarshaler, client, req, pathParams)
|
||||
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Api_UpdatePullProxy_1(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Api_GetPushProxyList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -3443,12 +3762,20 @@ var (
|
||||
|
||||
pattern_Api_GetPullProxyList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "proxy", "pull", "list"}, ""))
|
||||
|
||||
pattern_Api_GetPullProxyList_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "device", "list"}, ""))
|
||||
|
||||
pattern_Api_AddPullProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "proxy", "pull", "add"}, ""))
|
||||
|
||||
pattern_Api_AddPullProxy_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "device", "add"}, ""))
|
||||
|
||||
pattern_Api_RemovePullProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"api", "proxy", "pull", "remove", "id"}, ""))
|
||||
|
||||
pattern_Api_RemovePullProxy_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"api", "device", "add", "id"}, ""))
|
||||
|
||||
pattern_Api_UpdatePullProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "proxy", "pull", "update"}, ""))
|
||||
|
||||
pattern_Api_UpdatePullProxy_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "device", "update"}, ""))
|
||||
|
||||
pattern_Api_GetPushProxyList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "proxy", "push", "list"}, ""))
|
||||
|
||||
pattern_Api_AddPushProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "proxy", "push", "add"}, ""))
|
||||
@@ -3521,12 +3848,20 @@ var (
|
||||
|
||||
forward_Api_GetPullProxyList_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_GetPullProxyList_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_AddPullProxy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_AddPullProxy_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_RemovePullProxy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_RemovePullProxy_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_UpdatePullProxy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_UpdatePullProxy_1 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_GetPushProxyList_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Api_AddPushProxy_0 = runtime.ForwardResponseMessage
|
||||
|
||||
@@ -161,24 +161,39 @@ service api {
|
||||
rpc GetPullProxyList (google.protobuf.Empty) returns (PullProxyListResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/proxy/pull/list"
|
||||
additional_bindings {
|
||||
get: "/api/device/list"
|
||||
}
|
||||
};
|
||||
}
|
||||
rpc AddPullProxy (PullProxyInfo) returns (SuccessResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/proxy/pull/add"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/api/device/add"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
}
|
||||
rpc RemovePullProxy (RequestWithId) returns (SuccessResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/proxy/pull/remove/{id}"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/api/device/add/{id}"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
}
|
||||
rpc UpdatePullProxy (PullProxyInfo) returns (SuccessResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/proxy/pull/update"
|
||||
body: "*"
|
||||
additional_bindings {
|
||||
post: "/api/device/update"
|
||||
body: "*"
|
||||
}
|
||||
};
|
||||
}
|
||||
rpc GetPushProxyList (google.protobuf.Empty) returns (PushProxyListResponse) {
|
||||
|
||||
+170
-82
@@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.19.1
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v5.28.3
|
||||
// source: global.proto
|
||||
|
||||
package pb
|
||||
@@ -16,8 +16,48 @@ import (
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Api_SysInfo_FullMethodName = "/global.api/SysInfo"
|
||||
Api_DisabledPlugins_FullMethodName = "/global.api/DisabledPlugins"
|
||||
Api_Summary_FullMethodName = "/global.api/Summary"
|
||||
Api_Shutdown_FullMethodName = "/global.api/Shutdown"
|
||||
Api_Restart_FullMethodName = "/global.api/Restart"
|
||||
Api_TaskTree_FullMethodName = "/global.api/TaskTree"
|
||||
Api_StopTask_FullMethodName = "/global.api/StopTask"
|
||||
Api_RestartTask_FullMethodName = "/global.api/RestartTask"
|
||||
Api_StreamList_FullMethodName = "/global.api/StreamList"
|
||||
Api_WaitList_FullMethodName = "/global.api/WaitList"
|
||||
Api_StreamInfo_FullMethodName = "/global.api/StreamInfo"
|
||||
Api_PauseStream_FullMethodName = "/global.api/PauseStream"
|
||||
Api_ResumeStream_FullMethodName = "/global.api/ResumeStream"
|
||||
Api_SetStreamSpeed_FullMethodName = "/global.api/SetStreamSpeed"
|
||||
Api_SeekStream_FullMethodName = "/global.api/SeekStream"
|
||||
Api_GetSubscribers_FullMethodName = "/global.api/GetSubscribers"
|
||||
Api_AudioTrackSnap_FullMethodName = "/global.api/AudioTrackSnap"
|
||||
Api_VideoTrackSnap_FullMethodName = "/global.api/VideoTrackSnap"
|
||||
Api_ChangeSubscribe_FullMethodName = "/global.api/ChangeSubscribe"
|
||||
Api_GetStreamAlias_FullMethodName = "/global.api/GetStreamAlias"
|
||||
Api_SetStreamAlias_FullMethodName = "/global.api/SetStreamAlias"
|
||||
Api_StopPublish_FullMethodName = "/global.api/StopPublish"
|
||||
Api_StopSubscribe_FullMethodName = "/global.api/StopSubscribe"
|
||||
Api_GetConfigFile_FullMethodName = "/global.api/GetConfigFile"
|
||||
Api_UpdateConfigFile_FullMethodName = "/global.api/UpdateConfigFile"
|
||||
Api_GetConfig_FullMethodName = "/global.api/GetConfig"
|
||||
Api_GetFormily_FullMethodName = "/global.api/GetFormily"
|
||||
Api_ModifyConfig_FullMethodName = "/global.api/ModifyConfig"
|
||||
Api_GetPullProxyList_FullMethodName = "/global.api/GetPullProxyList"
|
||||
Api_AddPullProxy_FullMethodName = "/global.api/AddPullProxy"
|
||||
Api_RemovePullProxy_FullMethodName = "/global.api/RemovePullProxy"
|
||||
Api_UpdatePullProxy_FullMethodName = "/global.api/UpdatePullProxy"
|
||||
Api_GetPushProxyList_FullMethodName = "/global.api/GetPushProxyList"
|
||||
Api_AddPushProxy_FullMethodName = "/global.api/AddPushProxy"
|
||||
Api_RemovePushProxy_FullMethodName = "/global.api/RemovePushProxy"
|
||||
Api_UpdatePushProxy_FullMethodName = "/global.api/UpdatePushProxy"
|
||||
Api_GetRecording_FullMethodName = "/global.api/GetRecording"
|
||||
)
|
||||
|
||||
// ApiClient is the client API for Api service.
|
||||
//
|
||||
@@ -72,8 +112,9 @@ func NewApiClient(cc grpc.ClientConnInterface) ApiClient {
|
||||
}
|
||||
|
||||
func (c *apiClient) SysInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SysInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SysInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/SysInfo", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_SysInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -81,8 +122,9 @@ func (c *apiClient) SysInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *apiClient) DisabledPlugins(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DisabledPluginsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DisabledPluginsResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/DisabledPlugins", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_DisabledPlugins_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -90,8 +132,9 @@ func (c *apiClient) DisabledPlugins(ctx context.Context, in *emptypb.Empty, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) Summary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SummaryResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SummaryResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/Summary", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_Summary_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -99,8 +142,9 @@ func (c *apiClient) Summary(ctx context.Context, in *emptypb.Empty, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *apiClient) Shutdown(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/Shutdown", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_Shutdown_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -108,8 +152,9 @@ func (c *apiClient) Shutdown(ctx context.Context, in *RequestWithId, opts ...grp
|
||||
}
|
||||
|
||||
func (c *apiClient) Restart(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/Restart", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_Restart_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -117,8 +162,9 @@ func (c *apiClient) Restart(ctx context.Context, in *RequestWithId, opts ...grpc
|
||||
}
|
||||
|
||||
func (c *apiClient) TaskTree(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TaskTreeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TaskTreeResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/TaskTree", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_TaskTree_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -126,8 +172,9 @@ func (c *apiClient) TaskTree(ctx context.Context, in *emptypb.Empty, opts ...grp
|
||||
}
|
||||
|
||||
func (c *apiClient) StopTask(ctx context.Context, in *RequestWithId64, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/StopTask", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_StopTask_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -135,8 +182,9 @@ func (c *apiClient) StopTask(ctx context.Context, in *RequestWithId64, opts ...g
|
||||
}
|
||||
|
||||
func (c *apiClient) RestartTask(ctx context.Context, in *RequestWithId64, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/RestartTask", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_RestartTask_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -144,8 +192,9 @@ func (c *apiClient) RestartTask(ctx context.Context, in *RequestWithId64, opts .
|
||||
}
|
||||
|
||||
func (c *apiClient) StreamList(ctx context.Context, in *StreamListRequest, opts ...grpc.CallOption) (*StreamListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StreamListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/StreamList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_StreamList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -153,8 +202,9 @@ func (c *apiClient) StreamList(ctx context.Context, in *StreamListRequest, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) WaitList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StreamWaitListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StreamWaitListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/WaitList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_WaitList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -162,8 +212,9 @@ func (c *apiClient) WaitList(ctx context.Context, in *emptypb.Empty, opts ...grp
|
||||
}
|
||||
|
||||
func (c *apiClient) StreamInfo(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*StreamInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StreamInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/StreamInfo", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_StreamInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -171,8 +222,9 @@ func (c *apiClient) StreamInfo(ctx context.Context, in *StreamSnapRequest, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) PauseStream(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/PauseStream", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_PauseStream_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -180,8 +232,9 @@ func (c *apiClient) PauseStream(ctx context.Context, in *StreamSnapRequest, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) ResumeStream(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/ResumeStream", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_ResumeStream_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -189,8 +242,9 @@ func (c *apiClient) ResumeStream(ctx context.Context, in *StreamSnapRequest, opt
|
||||
}
|
||||
|
||||
func (c *apiClient) SetStreamSpeed(ctx context.Context, in *SetStreamSpeedRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/SetStreamSpeed", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_SetStreamSpeed_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -198,8 +252,9 @@ func (c *apiClient) SetStreamSpeed(ctx context.Context, in *SetStreamSpeedReques
|
||||
}
|
||||
|
||||
func (c *apiClient) SeekStream(ctx context.Context, in *SeekStreamRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/SeekStream", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_SeekStream_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -207,8 +262,9 @@ func (c *apiClient) SeekStream(ctx context.Context, in *SeekStreamRequest, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) GetSubscribers(ctx context.Context, in *SubscribersRequest, opts ...grpc.CallOption) (*SubscribersResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SubscribersResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetSubscribers", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetSubscribers_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -216,8 +272,9 @@ func (c *apiClient) GetSubscribers(ctx context.Context, in *SubscribersRequest,
|
||||
}
|
||||
|
||||
func (c *apiClient) AudioTrackSnap(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*TrackSnapShotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TrackSnapShotResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/AudioTrackSnap", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_AudioTrackSnap_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -225,8 +282,9 @@ func (c *apiClient) AudioTrackSnap(ctx context.Context, in *StreamSnapRequest, o
|
||||
}
|
||||
|
||||
func (c *apiClient) VideoTrackSnap(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*TrackSnapShotResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(TrackSnapShotResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/VideoTrackSnap", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_VideoTrackSnap_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -234,8 +292,9 @@ func (c *apiClient) VideoTrackSnap(ctx context.Context, in *StreamSnapRequest, o
|
||||
}
|
||||
|
||||
func (c *apiClient) ChangeSubscribe(ctx context.Context, in *ChangeSubscribeRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/ChangeSubscribe", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_ChangeSubscribe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -243,8 +302,9 @@ func (c *apiClient) ChangeSubscribe(ctx context.Context, in *ChangeSubscribeRequ
|
||||
}
|
||||
|
||||
func (c *apiClient) GetStreamAlias(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StreamAliasListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StreamAliasListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetStreamAlias", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetStreamAlias_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -252,8 +312,9 @@ func (c *apiClient) GetStreamAlias(ctx context.Context, in *emptypb.Empty, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) SetStreamAlias(ctx context.Context, in *SetStreamAliasRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/SetStreamAlias", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_SetStreamAlias_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -261,8 +322,9 @@ func (c *apiClient) SetStreamAlias(ctx context.Context, in *SetStreamAliasReques
|
||||
}
|
||||
|
||||
func (c *apiClient) StopPublish(ctx context.Context, in *StreamSnapRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/StopPublish", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_StopPublish_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -270,8 +332,9 @@ func (c *apiClient) StopPublish(ctx context.Context, in *StreamSnapRequest, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) StopSubscribe(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/StopSubscribe", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_StopSubscribe_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -279,8 +342,9 @@ func (c *apiClient) StopSubscribe(ctx context.Context, in *RequestWithId, opts .
|
||||
}
|
||||
|
||||
func (c *apiClient) GetConfigFile(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigFileResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetConfigFileResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetConfigFile", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetConfigFile_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -288,8 +352,9 @@ func (c *apiClient) GetConfigFile(ctx context.Context, in *emptypb.Empty, opts .
|
||||
}
|
||||
|
||||
func (c *apiClient) UpdateConfigFile(ctx context.Context, in *UpdateConfigFileRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/UpdateConfigFile", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_UpdateConfigFile_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -297,8 +362,9 @@ func (c *apiClient) UpdateConfigFile(ctx context.Context, in *UpdateConfigFileRe
|
||||
}
|
||||
|
||||
func (c *apiClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetConfig", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -306,8 +372,9 @@ func (c *apiClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ..
|
||||
}
|
||||
|
||||
func (c *apiClient) GetFormily(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetFormily", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetFormily_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -315,8 +382,9 @@ func (c *apiClient) GetFormily(ctx context.Context, in *GetConfigRequest, opts .
|
||||
}
|
||||
|
||||
func (c *apiClient) ModifyConfig(ctx context.Context, in *ModifyConfigRequest, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/ModifyConfig", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_ModifyConfig_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -324,8 +392,9 @@ func (c *apiClient) ModifyConfig(ctx context.Context, in *ModifyConfigRequest, o
|
||||
}
|
||||
|
||||
func (c *apiClient) GetPullProxyList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PullProxyListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PullProxyListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetPullProxyList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetPullProxyList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -333,8 +402,9 @@ func (c *apiClient) GetPullProxyList(ctx context.Context, in *emptypb.Empty, opt
|
||||
}
|
||||
|
||||
func (c *apiClient) AddPullProxy(ctx context.Context, in *PullProxyInfo, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/AddPullProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_AddPullProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -342,8 +412,9 @@ func (c *apiClient) AddPullProxy(ctx context.Context, in *PullProxyInfo, opts ..
|
||||
}
|
||||
|
||||
func (c *apiClient) RemovePullProxy(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/RemovePullProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_RemovePullProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -351,8 +422,9 @@ func (c *apiClient) RemovePullProxy(ctx context.Context, in *RequestWithId, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) UpdatePullProxy(ctx context.Context, in *PullProxyInfo, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/UpdatePullProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_UpdatePullProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -360,8 +432,9 @@ func (c *apiClient) UpdatePullProxy(ctx context.Context, in *PullProxyInfo, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) GetPushProxyList(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PushProxyListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PushProxyListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetPushProxyList", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetPushProxyList_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -369,8 +442,9 @@ func (c *apiClient) GetPushProxyList(ctx context.Context, in *emptypb.Empty, opt
|
||||
}
|
||||
|
||||
func (c *apiClient) AddPushProxy(ctx context.Context, in *PushProxyInfo, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/AddPushProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_AddPushProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -378,8 +452,9 @@ func (c *apiClient) AddPushProxy(ctx context.Context, in *PushProxyInfo, opts ..
|
||||
}
|
||||
|
||||
func (c *apiClient) RemovePushProxy(ctx context.Context, in *RequestWithId, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/RemovePushProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_RemovePushProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -387,8 +462,9 @@ func (c *apiClient) RemovePushProxy(ctx context.Context, in *RequestWithId, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) UpdatePushProxy(ctx context.Context, in *PushProxyInfo, opts ...grpc.CallOption) (*SuccessResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SuccessResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/UpdatePushProxy", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_UpdatePushProxy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -396,8 +472,9 @@ func (c *apiClient) UpdatePushProxy(ctx context.Context, in *PushProxyInfo, opts
|
||||
}
|
||||
|
||||
func (c *apiClient) GetRecording(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*RecordingListResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RecordingListResponse)
|
||||
err := c.cc.Invoke(ctx, "/global.api/GetRecording", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Api_GetRecording_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -415,7 +492,7 @@ func (c *apiClient) GetTransformList(ctx context.Context, in *emptypb.Empty, opt
|
||||
|
||||
// ApiServer is the server API for Api service.
|
||||
// All implementations must embed UnimplementedApiServer
|
||||
// for forward compatibility
|
||||
// for forward compatibility.
|
||||
type ApiServer interface {
|
||||
SysInfo(context.Context, *emptypb.Empty) (*SysInfoResponse, error)
|
||||
DisabledPlugins(context.Context, *emptypb.Empty) (*DisabledPluginsResponse, error)
|
||||
@@ -458,9 +535,12 @@ type ApiServer interface {
|
||||
mustEmbedUnimplementedApiServer()
|
||||
}
|
||||
|
||||
// UnimplementedApiServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedApiServer struct {
|
||||
}
|
||||
// UnimplementedApiServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedApiServer struct{}
|
||||
|
||||
func (UnimplementedApiServer) SysInfo(context.Context, *emptypb.Empty) (*SysInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SysInfo not implemented")
|
||||
@@ -577,6 +657,7 @@ func (UnimplementedApiServer) GetTransformList(context.Context, *emptypb.Empty)
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetTransformList not implemented")
|
||||
}
|
||||
func (UnimplementedApiServer) mustEmbedUnimplementedApiServer() {}
|
||||
func (UnimplementedApiServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeApiServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ApiServer will
|
||||
@@ -586,6 +667,13 @@ type UnsafeApiServer interface {
|
||||
}
|
||||
|
||||
func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer) {
|
||||
// If the following call pancis, it indicates UnimplementedApiServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&Api_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
@@ -599,7 +687,7 @@ func _Api_SysInfo_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/SysInfo",
|
||||
FullMethod: Api_SysInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).SysInfo(ctx, req.(*emptypb.Empty))
|
||||
@@ -617,7 +705,7 @@ func _Api_DisabledPlugins_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/DisabledPlugins",
|
||||
FullMethod: Api_DisabledPlugins_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).DisabledPlugins(ctx, req.(*emptypb.Empty))
|
||||
@@ -635,7 +723,7 @@ func _Api_Summary_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/Summary",
|
||||
FullMethod: Api_Summary_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).Summary(ctx, req.(*emptypb.Empty))
|
||||
@@ -653,7 +741,7 @@ func _Api_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/Shutdown",
|
||||
FullMethod: Api_Shutdown_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).Shutdown(ctx, req.(*RequestWithId))
|
||||
@@ -671,7 +759,7 @@ func _Api_Restart_Handler(srv interface{}, ctx context.Context, dec func(interfa
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/Restart",
|
||||
FullMethod: Api_Restart_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).Restart(ctx, req.(*RequestWithId))
|
||||
@@ -689,7 +777,7 @@ func _Api_TaskTree_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/TaskTree",
|
||||
FullMethod: Api_TaskTree_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).TaskTree(ctx, req.(*emptypb.Empty))
|
||||
@@ -707,7 +795,7 @@ func _Api_StopTask_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/StopTask",
|
||||
FullMethod: Api_StopTask_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).StopTask(ctx, req.(*RequestWithId64))
|
||||
@@ -725,7 +813,7 @@ func _Api_RestartTask_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/RestartTask",
|
||||
FullMethod: Api_RestartTask_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).RestartTask(ctx, req.(*RequestWithId64))
|
||||
@@ -743,7 +831,7 @@ func _Api_StreamList_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/StreamList",
|
||||
FullMethod: Api_StreamList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).StreamList(ctx, req.(*StreamListRequest))
|
||||
@@ -761,7 +849,7 @@ func _Api_WaitList_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/WaitList",
|
||||
FullMethod: Api_WaitList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).WaitList(ctx, req.(*emptypb.Empty))
|
||||
@@ -779,7 +867,7 @@ func _Api_StreamInfo_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/StreamInfo",
|
||||
FullMethod: Api_StreamInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).StreamInfo(ctx, req.(*StreamSnapRequest))
|
||||
@@ -797,7 +885,7 @@ func _Api_PauseStream_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/PauseStream",
|
||||
FullMethod: Api_PauseStream_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).PauseStream(ctx, req.(*StreamSnapRequest))
|
||||
@@ -815,7 +903,7 @@ func _Api_ResumeStream_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/ResumeStream",
|
||||
FullMethod: Api_ResumeStream_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).ResumeStream(ctx, req.(*StreamSnapRequest))
|
||||
@@ -833,7 +921,7 @@ func _Api_SetStreamSpeed_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/SetStreamSpeed",
|
||||
FullMethod: Api_SetStreamSpeed_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).SetStreamSpeed(ctx, req.(*SetStreamSpeedRequest))
|
||||
@@ -851,7 +939,7 @@ func _Api_SeekStream_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/SeekStream",
|
||||
FullMethod: Api_SeekStream_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).SeekStream(ctx, req.(*SeekStreamRequest))
|
||||
@@ -869,7 +957,7 @@ func _Api_GetSubscribers_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetSubscribers",
|
||||
FullMethod: Api_GetSubscribers_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetSubscribers(ctx, req.(*SubscribersRequest))
|
||||
@@ -887,7 +975,7 @@ func _Api_AudioTrackSnap_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/AudioTrackSnap",
|
||||
FullMethod: Api_AudioTrackSnap_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).AudioTrackSnap(ctx, req.(*StreamSnapRequest))
|
||||
@@ -905,7 +993,7 @@ func _Api_VideoTrackSnap_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/VideoTrackSnap",
|
||||
FullMethod: Api_VideoTrackSnap_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).VideoTrackSnap(ctx, req.(*StreamSnapRequest))
|
||||
@@ -923,7 +1011,7 @@ func _Api_ChangeSubscribe_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/ChangeSubscribe",
|
||||
FullMethod: Api_ChangeSubscribe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).ChangeSubscribe(ctx, req.(*ChangeSubscribeRequest))
|
||||
@@ -941,7 +1029,7 @@ func _Api_GetStreamAlias_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetStreamAlias",
|
||||
FullMethod: Api_GetStreamAlias_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetStreamAlias(ctx, req.(*emptypb.Empty))
|
||||
@@ -959,7 +1047,7 @@ func _Api_SetStreamAlias_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/SetStreamAlias",
|
||||
FullMethod: Api_SetStreamAlias_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).SetStreamAlias(ctx, req.(*SetStreamAliasRequest))
|
||||
@@ -977,7 +1065,7 @@ func _Api_StopPublish_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/StopPublish",
|
||||
FullMethod: Api_StopPublish_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).StopPublish(ctx, req.(*StreamSnapRequest))
|
||||
@@ -995,7 +1083,7 @@ func _Api_StopSubscribe_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/StopSubscribe",
|
||||
FullMethod: Api_StopSubscribe_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).StopSubscribe(ctx, req.(*RequestWithId))
|
||||
@@ -1013,7 +1101,7 @@ func _Api_GetConfigFile_Handler(srv interface{}, ctx context.Context, dec func(i
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetConfigFile",
|
||||
FullMethod: Api_GetConfigFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetConfigFile(ctx, req.(*emptypb.Empty))
|
||||
@@ -1031,7 +1119,7 @@ func _Api_UpdateConfigFile_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/UpdateConfigFile",
|
||||
FullMethod: Api_UpdateConfigFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).UpdateConfigFile(ctx, req.(*UpdateConfigFileRequest))
|
||||
@@ -1049,7 +1137,7 @@ func _Api_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(inter
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetConfig",
|
||||
FullMethod: Api_GetConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetConfig(ctx, req.(*GetConfigRequest))
|
||||
@@ -1067,7 +1155,7 @@ func _Api_GetFormily_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetFormily",
|
||||
FullMethod: Api_GetFormily_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetFormily(ctx, req.(*GetConfigRequest))
|
||||
@@ -1085,7 +1173,7 @@ func _Api_ModifyConfig_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/ModifyConfig",
|
||||
FullMethod: Api_ModifyConfig_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).ModifyConfig(ctx, req.(*ModifyConfigRequest))
|
||||
@@ -1103,7 +1191,7 @@ func _Api_GetPullProxyList_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetPullProxyList",
|
||||
FullMethod: Api_GetPullProxyList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetPullProxyList(ctx, req.(*emptypb.Empty))
|
||||
@@ -1121,7 +1209,7 @@ func _Api_AddPullProxy_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/AddPullProxy",
|
||||
FullMethod: Api_AddPullProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).AddPullProxy(ctx, req.(*PullProxyInfo))
|
||||
@@ -1139,7 +1227,7 @@ func _Api_RemovePullProxy_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/RemovePullProxy",
|
||||
FullMethod: Api_RemovePullProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).RemovePullProxy(ctx, req.(*RequestWithId))
|
||||
@@ -1157,7 +1245,7 @@ func _Api_UpdatePullProxy_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/UpdatePullProxy",
|
||||
FullMethod: Api_UpdatePullProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).UpdatePullProxy(ctx, req.(*PullProxyInfo))
|
||||
@@ -1175,7 +1263,7 @@ func _Api_GetPushProxyList_Handler(srv interface{}, ctx context.Context, dec fun
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetPushProxyList",
|
||||
FullMethod: Api_GetPushProxyList_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetPushProxyList(ctx, req.(*emptypb.Empty))
|
||||
@@ -1193,7 +1281,7 @@ func _Api_AddPushProxy_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/AddPushProxy",
|
||||
FullMethod: Api_AddPushProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).AddPushProxy(ctx, req.(*PushProxyInfo))
|
||||
@@ -1211,7 +1299,7 @@ func _Api_RemovePushProxy_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/RemovePushProxy",
|
||||
FullMethod: Api_RemovePushProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).RemovePushProxy(ctx, req.(*RequestWithId))
|
||||
@@ -1229,7 +1317,7 @@ func _Api_UpdatePushProxy_Handler(srv interface{}, ctx context.Context, dec func
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/UpdatePushProxy",
|
||||
FullMethod: Api_UpdatePushProxy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).UpdatePushProxy(ctx, req.(*PushProxyInfo))
|
||||
@@ -1247,7 +1335,7 @@ func _Api_GetRecording_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/global.api/GetRecording",
|
||||
FullMethod: Api_GetRecording_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApiServer).GetRecording(ctx, req.(*emptypb.Empty))
|
||||
|
||||
@@ -92,7 +92,7 @@ func (p *DeleteRecordTask) deleteOldestFile() {
|
||||
EventLevel: "1", // 查询条件:event_level = 1,非重要事件
|
||||
}
|
||||
var eventRecords []m7s.RecordStream
|
||||
err := p.DB.Where(&queryRecord).Order("end_time ASC").Limit(1).Find(&eventRecords).Error
|
||||
err := p.DB.Where(&queryRecord).Where("end_time != '1970-01-01 00:00:00'").Order("end_time ASC").Limit(1).Find(&eventRecords).Error
|
||||
if err == nil {
|
||||
if len(eventRecords) > 0 {
|
||||
for _, record := range eventRecords {
|
||||
|
||||
@@ -430,6 +430,9 @@ func (r *Video) Demux(ictx codec.ICodecCtx) (any, error) {
|
||||
}
|
||||
}
|
||||
for _, packet := range r.Packets {
|
||||
if len(packet.Payload) == 0 {
|
||||
continue
|
||||
}
|
||||
b0 := packet.Payload[0]
|
||||
if t := codec.ParseH265NALUType(b0); t < H265_NALU_AP {
|
||||
nalu.AppendOne(packet.Payload)
|
||||
|
||||
Reference in New Issue
Block a user