Documentation
¶
Index ¶
- Constants
- func BytesToUint16(buf []byte) uint16
- func BytesToUint32(buf []byte) uint32
- func BytesToUint64(buf []byte) uint64
- func ContextDone(ctx context.Context) bool
- func ExtractLiveInfo(rawurl string) (host, app, sid string, err error)
- func ExtractStreamID(streamName string) string
- func FileExists(path string) bool
- func GetCidFromStreamID(sid string) string
- func GetHackStreamID(tcUrl string) string
- func GetModuleName(fullModuleName string) string
- func GetSrcStreamName(sid string) string
- func GetStreamInfo(sid string) (cid string, roomID string, sessionID string)
- func GetSubPath(path string) []string
- func GetTsInfoFromTsUrl(rawurl string) (sid, fileName string, err error)
- func GetUrlFileSuffix(rawurl string) (suffix string, err error)
- func HTTPPost(cli *http.Client, url, data string) (string, error)
- func IsSliceRangeReq(srcUrl string) bool
- func IsSliceSubstreamReq(srcUrl string) bool
- func IsSrcStreamName(sid string) bool
- func IsValidURL(s string) bool
- func MSTimeString() string
- func NewTimer(threshold time.Duration) *timer
- func PanicRecover()
- func PanicRecoverWithInfo(info string)
- func ParseHttpSliceRangeReq(r *http.Request) ([]uint64, error)
- func PeelOffPort1935(host string) string
- func PtsToTime(pts int64) time.Duration
- func RebuildURLPath(path string) string
- func RemoveSliceParam(r *http.Request) string
- func RepairHostWithPort1935(host string) string
- func ReplaceURLHost(rawurl string, host string) string
- func ReplaceURLProtoHost(rawurl, proto, host string) string
- func SetSPEHostEmpty(rawurl string) string
- func TimeNowMillisecond() uint64
- func TimeToTs(tm time.Duration) int32
- func TimingPause(pause time.Duration, cost *time.Duration)
- func Uint16ToBytes(i uint16) []byte
- func Uint32ToBytes(i uint32) []byte
- func Uint64ToBytes(i uint64) []byte
- type SliceRequest
Constants ¶
View Source
const ( KSliceParamStartId = "startID" KSliceParamSubstreamId = "substreamID" KSliceParamStreamBase = "streambase" KSliceParamSliceRange = "sliceRange" KSliceParamQuickOffset = "quickOffset" )
Variables ¶
This section is empty.
Functions ¶
func BytesToUint16 ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func ExtractLiveInfo ¶
func ExtractStreamID ¶
ExtractStreamID 从streamName抽取streamID
func FileExists ¶
func GetCidFromStreamID ¶
GetCidFromStreamID 从streamID获取cid
func GetHackStreamID ¶
func GetModuleName ¶
GetModuleName 从fullModuleName获取moduleName,考虑将httpflv模块后缀去掉
func GetStreamInfo ¶
GetStreamInfo ...
func GetSubPath ¶
func GetTsInfoFromTsUrl ¶
GetTsInfoFromTsUrl sg-live-43287-96716-1626688779.ts
func GetUrlFileSuffix ¶
func IsSliceRangeReq ¶
func IsSliceSubstreamReq ¶
func IsValidURL ¶
func ParseHttpSliceRangeReq ¶
ParseHttpSliceRangeReq param: startID=xx&sliceRange=x,x-y,x
func RebuildURLPath ¶
func RemoveSliceParam ¶
func RepairHostWithPort1935 ¶
RepairHostWithPort1935 ...
func ReplaceURLHost ¶
ReplaceURLHost 替换url中的host
func ReplaceURLProtoHost ¶
ReplaceURLProtoHost 替换url中的proto和host
func TimeNowMillisecond ¶
func TimeNowMillisecond() uint64
func Uint16ToBytes ¶
func Uint32ToBytes ¶
func Uint64ToBytes ¶
Types ¶
type SliceRequest ¶
func ParseHttpSliceReq ¶
func ParseHttpSliceReq(r *http.Request) (SliceRequest, error)
Click to show internal directories.
Click to hide internal directories.