utils

package
v0.0.0-...-00fe4b5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64EncodeToString

func Base64EncodeToString(content string) string

func CalcPieceSize

func CalcPieceSize(size uint64) int

func GetLoalIPv4

func GetLoalIPv4() string

func GetMaxSupportUdpNat

func GetMaxSupportUdpNat(nat int8) int8

func GetNoFileUrl

func GetNoFileUrl(url string) string

func GetNoSuffixUrl

func GetNoSuffixUrl(url string) string

func GetRandAk

func GetRandAk() string

func GetSecrect

func GetSecrect(ak string) string

func Hash1

func Hash1(content []byte) string

func MD5

func MD5(content []byte) string

func ParseM3u8Ts

func ParseM3u8Ts(ctx context.Context, url string) (tsUrls []string, duration float64, tsDuration []float64, err error)

func ResolveURL

func ResolveURL(u *url.URL, p string) string

Types

type MediaPlaylist

type MediaPlaylist struct {
	TargetDuration float64
	SeqNo          uint64 // EXT-X-MEDIA-SEQUENCE
	SegmentMap     map[int64]*MediaSegment
	SegmentList    []*MediaSegment
	Ver            uint8
	Count          uint
	MediaLength    uint64
}

func ParseM3u8

func ParseM3u8(ctx context.Context, url string) (*MediaPlaylist, error)

type MediaSegment

type MediaSegment struct {
	Size            uint64
	Url             string
	Duration        float64
	ProgramDateTime time.Time
	Start           uint64
	End             uint64
}

type MediaType

type MediaType uint
const (
	Live MediaType = iota + 1 //直播
	Vod                       //点播
)

func CheckM3u8MediaType

func CheckM3u8MediaType(url string) (MediaType, error)

Directories

Path Synopsis
wechatpay
notify
Package notify 微信支付 API v3 Go SDK 商户通知处理库
Package notify 微信支付 API v3 Go SDK 商户通知处理库

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL