프로젝트
GitHub에서 보기
Comcast/gots
소개
MPEG Transport Stream handling in Go
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalgoTS (Go Transport Streams)
gots (Go Transport Streams) is a library for working with MPEG transport streams. It provides abstractions for reading packet information and program specific information (psi)
Bug / Feature Reporting
Add requests to Github issues. To submit a PR see CONTRIBUTING
Tests
go test -race ./...
Travis-CI will run these tests:
go test -v ./...
License
This software is licensed under the MIT license. For full text see LICENSE
Code of Conduct
We take our code of conduct very seriously. Please abide by it.
Examples
This is a simple example that extracts all PIDs from a ts file and prints them. CLI example parser can be found here
func main() {
pidSet := make(map[uint16]bool, 5)
filename := "./scenario1.ts"
file, err := os.Open(filename)
if err == nil {
pkt := make([]byte, packet.PacketSize)
for read, err := file.Read(pkt); read > 0 && err == nil; read, err = file.Read(pkt) {
if err != nil {
println(err)
return
}
pid, err := packet.Pid(pkt)
if err != nil {
println(err)
continue
}
pidSet[pid] = true
}
for v := range pidSet {
fmt.Printf("Found pid %d\n", v)
}
} else {
fmt.Printf("Unable to open file [%s] due to [%s]\n", filename, err.Error())
}
관련 프로젝트 살펴보기
불러오는 중…