gots

MPEG Transport Stream handling in Go

Github星跟蹤圖

GoDoc
Build Status
Go Report Card
Coverage Status

goTS (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())
}

主要指標

概覽
名稱與所有者zikichombo/sio
主編程語言Go
編程語言Go (語言數: 4)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2018-08-03 16:06:17
推送於2021-08-23 22:40:51
最后一次提交2018-10-03 20:51:43
發布數8
最新版本名稱v0.0.5 (發布於 )
第一版名稱v0.0.1-alpha.1 (發布於 )
用户参与
星數25
關注者數5
派生數4
提交數114
已啟用問題?
問題數8
打開的問題數5
拉請求數15
打開的拉請求數0
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?