Documentation ¶
Index ¶
- func AesDecrypt(cryptByte []byte, key []byte, iv []byte) (decryptBytes []byte, err error)
- func DownloadTs(ts Ts) (err error)
- func PKCS7UnPadding(data []byte) []byte
- type Key
- type M3U8
- func (m *M3U8) CleanTsLists() (err error)
- func (m *M3U8) DownloadTsList() (err error)
- func (m *M3U8) GetMaxBandwidthInfo() (maxInfo *StreamInfo)
- func (m *M3U8) MergeTsList() (err error)
- func (m *M3U8) ParseUrl(m3u8Url string) (err error)
- func (m *M3U8) Run() (err error)
- func (m *M3U8) SetGNum(gNum int)
- func (m *M3U8) SetOutputName(name string)
- func (m *M3U8) SetOutputPath(name string)
- type StreamInfo
- type Ts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt aes解密
Types ¶
type Key ¶
type Key struct { // 加密方法,如果是NONE标识不需要解密,AES-128使用aes128解密 Method string // 秘钥地址 Uri string // key的值 KeyValue []byte // 加密向量 IV string }
Key 加密信息
type M3U8 ¶
type M3U8 struct { IsM3U8 bool GNum int // 上级m3u8的url ParentURL string // url Url string // 主域名 BaseUrl string // m3u8版本 Version int // 最大媒体段时长(秒) TargetDuration int // 首个list的序号 MediaSequence int // ts列表 //TsLists []string TsLists []Ts // 是否需要解密 HasKey bool // 加密key Keys []Key // 播放列表,有带宽,分辨率等信息,用户根据带宽自行选择播放文件 StreamInfos []StreamInfo // 保存的内容 OutputName string // 保存目录 OutputPath string }
M3U8 参数: https://blog.csdn.net/weixin_41635750/article/details/108066684
func (*M3U8) GetMaxBandwidthInfo ¶
func (m *M3U8) GetMaxBandwidthInfo() (maxInfo *StreamInfo)
GetMaxBandwidthInfo 获取最大带宽的播放列表信息
Click to show internal directories.
Click to hide internal directories.