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/gb28181/gb28181.go

42 lines
1.2 KiB
Go

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

// Copyright 2022, Chef. All rights reserved.
// https://github.com/q191201771/lal
//
// Use of this source code is governed by a MIT-style license
// that can be found in the License file.
//
// Author: Chef (191201771@qq.com)
package gb28181
import (
"errors"
"github.com/q191201771/naza/pkg/nazalog"
"github.com/q191201771/naza/pkg/nazanet"
)
// TODO(chef): [feat] http api stop_rtp_pub 202207
// TODO(chef): [feat] http api /api/stat/all_rtp_pub不过这个可以用已有的all_group代替 202207
// TODO(chef): [perf] 优化ps解析内存块 202207
// TODO(chef): [opt] avpkt转rtmp时可能需要接一个缓存队列 202208
var (
Log = nazalog.GetGlobalLogger()
)
// ErrGb28181 TODO(chef): [refactor] move to pkg base 202207
var ErrGb28181 = errors.New("lal.gb28181: fxxk")
// TODO(chef): [opt] 除了队列长度,还可以通过时长控制 202209
var maxUnpackRtpListSize = 1024
var (
defaultPubSessionPortMin = uint16(30000) // 注意udp和tcp都使用这个端口范围
defaultPubSessionPortMax = uint16(60000)
)
var defaultUdpConnPoll *nazanet.AvailUdpConnPool
func init() {
defaultUdpConnPoll = nazanet.NewAvailUdpConnPool(defaultPubSessionPortMin, defaultPubSessionPortMax)
}