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 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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