ts

package module
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 12 Imported by: 2

README

TS插件

处理TS数据的插件

功能

  1. 通过Publish发布一个TS流,然后通过Feed方法填入TS数据即可
  2. 通过PublishDir可以读取服务器上文件夹内的所有ts文件进行发布

默认配置

[TS]
BufferLength = 2048
Path         = "ts"
  • BufferLength指的是解析TS流的时候的缓存大小,单位是PES包的个数
  • Path 指存放ts的目录

API

  • /api/ts/list 罗列所有ts文件
  • /api/ts/publish?streamPath=live/rtc 开始将文件夹内的ts文件逐个读取,发布成一个直播流

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TS

type TS struct {
	*Stream
	*mpegts.MpegTsStream `json:"-"`
	TotalPesCount        int
	IsSplitFrame         bool
	PTS                  uint64
	DTS                  uint64
	PesCount             int
	BufferLength         int //TsChan     chan io.Reader
	// contains filtered or unexported fields
}

func (*TS) Publish

func (ts *TS) Publish(streamPath string) (result bool)

func (*TS) PublishDir

func (ts *TS) PublishDir(streamPath string)

type TSDir

type TSDir struct {
	StreamPath string
	TsCount    int
	TotalSize  int64
}

Jump to

Keyboard shortcuts

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