iceserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Package iceserver - icecast streaming server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufElement

type BufElement struct {
	// contains filtered or unexported fields
}

BufElement - kind of buffer page

func (*BufElement) IsLocked

func (q *BufElement) IsLocked() bool

IsLocked (logical lock, mean it's in use)

func (*BufElement) Lock

func (q *BufElement) Lock()

Lock - mark element as used by listener

func (*BufElement) Next

func (q *BufElement) Next() *BufElement

Next - getting next element

func (*BufElement) Reset

func (q *BufElement) Reset(pool *sync.Pool)

Reset ...

func (*BufElement) UnLock

func (q *BufElement) UnLock()

UnLock - mark element as unused by listener

type BufferInfo

type BufferInfo struct {
	Size      int
	SizeBytes int
	Graph     string
	InUse     int
}

BufferInfo - struct for monitoring

type BufferQueue

type BufferQueue struct {
	// contains filtered or unexported fields
}

BufferQueue - queue, which stores stream fragments from SOURCE

func (*BufferQueue) Append

func (q *BufferQueue) Append(buffer []byte, readed int)

Append - appends new page to the end of the buffer queue

func (*BufferQueue) First

func (q *BufferQueue) First() *BufElement

First - returns the first element in buffer queue

func (*BufferQueue) Info

func (q *BufferQueue) Info() BufferInfo

Info - returns buffer state

func (*BufferQueue) Init

func (q *BufferQueue) Init(minsize int, pool *sync.Pool)

Init - initiates buffer queue

func (*BufferQueue) Last

func (q *BufferQueue) Last() *BufElement

Last - returns the last element in buffer queue

func (*BufferQueue) Size

func (q *BufferQueue) Size() int

Size - returns buffer queue size

func (*BufferQueue) Start

func (q *BufferQueue) Start(burstSize int) *BufElement

Start - returns the element to start with

type IceServer

type IceServer struct {
	Props Properties

	Started        int32
	StartedTime    time.Time
	ListenersCount int32
	SourcesCount   int32
	// contains filtered or unexported fields
}

IceServer ...

func (*IceServer) Close

func (i *IceServer) Close()

Close - finish

func (*IceServer) Init

func (i *IceServer) Init() error

Init - Load params from config.json

func (*IceServer) Start

func (i *IceServer) Start()

Start - start listening port ...

type MetaData

type MetaData struct {
	MetaInt     int
	StreamTitle string
	// contains filtered or unexported fields
}

MetaData ...

type MonitorInfo

type MonitorInfo struct {
	Mounts   []MountInfo
	CPUUsage float64
	MemUsage int
}

MonitorInfo ...

type Mount

type Mount struct {
	Name         string `json:"Name"`
	User         string `json:"User"`
	Password     string `json:"Password"`
	Description  string `json:"Description"`
	BitRate      int    `json:"BitRate"`
	ContentType  string `json:"ContentType"`
	StreamURL    string `json:"StreamURL"`
	Genre        string `json:"Genre"`
	BurstSize    int    `json:"BurstSize"`
	DumpFile     string `json:"DumpFile"`
	MaxListeners int    `json:"MaxListeners"`

	State struct {
		Started     bool
		StartedTime time.Time
		MetaInfo    MetaData
		Listeners   int32
	} `json:"-"`

	Server *IceServer `json:"-"`
	// contains filtered or unexported fields
}

Mount ...

func (*Mount) Clear

func (m *Mount) Clear()

Clear ...

func (*Mount) Close

func (m *Mount) Close()

Close ...

func (*Mount) Init

func (m *Mount) Init(srv *IceServer) error

Init ...

type MountInfo

type MountInfo struct {
	Name      string
	Listeners int32
	UpTime    string
	Buff      BufferInfo
}

MountInfo ...

type PoolManager

type PoolManager struct {
	// contains filtered or unexported fields
}

PoolManager ...

func (*PoolManager) GetPool

func (p *PoolManager) GetPool(size int) (*sync.Pool, error)

GetPool ...

func (*PoolManager) Init

func (p *PoolManager) Init(size int) *sync.Pool

Init ...

type Properties

type Properties struct {
	Name     string `json:"Name"`
	Admin    string `json:"Admin,omitempty"`
	Location string `json:"Location,omitempty"`
	Host     string `json:"Host"`

	Socket struct {
		Port int `json:"Port"`
	} `json:"Socket"`

	Limits struct {
		Clients                int32 `json:"Clients"`
		Sources                int32 `json:"Sources"`
		SourceIdleTimeOut      int   `json:"SourceIdleTimeOut"`
		EmptyBufferIdleTimeOut int   `json:"EmptyBufferIdleTimeOut"`
		WriteTimeOut           int   `json:"WriteTimeOut"`
	} `json:"Limits"`

	Auth struct {
		AdminPassword string `json:"AdminPassword"`
	} `json:"Auth"`

	Paths struct {
		Base string `json:"Base"`
		Web  string `json:"Web"`
		Log  string `json:"Log"`
	} `json:"Paths"`

	Logging struct {
		Loglevel   int  `json:"Loglevel"`
		Logsize    int  `json:"Logsize"`
		UseMonitor bool `json:"UseMonitor"`
		UseStat    bool `json:"UseStat"`
	} `json:"Logging"`

	Mounts []Mount `json:"Mounts"`
}

Properties ...

Jump to

Keyboard shortcuts

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