stats

package
v0.0.0-...-1ce205e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyRtmpStatsProvider

type EmptyRtmpStatsProvider struct{}

func NewEmptyRtmpStatsProvider

func NewEmptyRtmpStatsProvider() *EmptyRtmpStatsProvider

func (*EmptyRtmpStatsProvider) Stats

func (s *EmptyRtmpStatsProvider) Stats() (string, error)

func (*EmptyRtmpStatsProvider) Submit

func (s *EmptyRtmpStatsProvider) Submit() error

type RtmpStats

type RtmpStats struct {
	Data RtmpStatsData
}

func NewRtmpStats

func NewRtmpStats() *RtmpStats

func (*RtmpStats) Process

func (s *RtmpStats) Process(statsProvider StatsProvider) error

func (*RtmpStats) Submit

func (s *RtmpStats) Submit() error

type RtmpStatsApplication

type RtmpStatsApplication struct {
	Name string          `xml:"name"`
	Live []RtmpStatsLive `xml:"live"`
}

type RtmpStatsAudio

type RtmpStatsAudio struct {
	Codec      string `xml:"codec"`
	Profile    string `xml:"profile"`
	Channel    int    `xml:"channels"`
	SampleRate int    `xml:"sample_rate"`
}

type RtmpStatsClient

type RtmpStatsClient struct {
	Id           int    `xml:"id"`
	Address      string `xml:"address"`
	Time         int    `xml:"time"`
	FlashVersion string `xml:"flashver"`
	Dropped      int    `xml:"dropped"`
	AvSync       int    `xml:"avsync"`
	Timestamp    int    `xml:"timestamp"`
	Active       string `xml:"active"`
}

type RtmpStatsData

type RtmpStatsData struct {
	XMLName      string            `xml:"rtmp"`
	NginxVersion string            `xml:"nginx_version"`
	BwIn         int               `xml:"bw_in"`
	BytesIn      int               `xml:"bytes_in"`
	BwOut        int               `xml:"bw_out"`
	BytesOut     int               `xml:"bytes_out"`
	Server       []RtmpStatsServer `xml:"server"`
}

type RtmpStatsLive

type RtmpStatsLive struct {
	Stream        []RtmpStatsStream `xml:"stream"`
	NumberClients int               `xml:"nclients"`
}

type RtmpStatsMeta

type RtmpStatsMeta struct {
	Video []RtmpStatsVideo `xml:"video"`
	Audio []RtmpStatsAudio `xml:"audio"`
}

type RtmpStatsProvider

type RtmpStatsProvider struct{}

func NewRmptStatsProvider

func NewRmptStatsProvider() *RtmpStatsProvider

func (*RtmpStatsProvider) Stats

func (s *RtmpStatsProvider) Stats() (string, error)

type RtmpStatsServer

type RtmpStatsServer struct {
	Application []RtmpStatsApplication `xml:"application"`
}

type RtmpStatsStream

type RtmpStatsStream struct {
	Name     string            `xml:"name"`
	Time     int               `xml:"time"`
	BwIn     int               `xml:"bw_in"`
	BytesIn  int               `xml:"bytes_in"`
	BwOut    int               `xml:"bw_out"`
	BytesOut int               `xml:"bytes_out"`
	BwAudio  int               `xml:"bw_audio"`
	BwVideo  int               `xml:"bw_video"`
	Client   []RtmpStatsClient `xml:"client"`
	Meta     []RtmpStatsMeta   `xml:"meta"`
}

type RtmpStatsVideo

type RtmpStatsVideo struct {
	Width     int    `xml:"width"`
	Height    int    `xml:"height"`
	FrameRate int    `xml:"frame_rate"`
	Codec     string `xml:"codec"`
	Profile   string `xml:"profile"`
	Compat    int    `xml:"compat"`
	Level     string `xml:"level"`
}

type StatsProvider

type StatsProvider interface {
	Stats() (string, error)
}

Jump to

Keyboard shortcuts

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