mirror of https://github.com/gwuhaolin/livego.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
320 B
18 lines
320 B
package hls |
|
|
|
type TSItem struct { |
|
Name string |
|
SeqNum int |
|
Duration int |
|
Data []byte |
|
} |
|
|
|
func NewTSItem(name string, duration, seqNum int, b []byte) TSItem { |
|
var item TSItem |
|
item.Name = name |
|
item.SeqNum = seqNum |
|
item.Duration = duration |
|
item.Data = make([]byte, len(b)) |
|
copy(item.Data, b) |
|
return item |
|
}
|
|
|