channel

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(r *gin.Engine, ws *web.Service, oven *oven.Service, config *ConfigStream)

Bind to webservice

Types

type Channel added in v0.2.4

type Channel struct {
	Model   models.Channel `json:"data"`
	Streams []StreamSource `json:"stream_sources"`
	Ingress *StreamIngress `json:"ingress,omitemptry"`
}

type ConfigStream added in v0.2.4

type ConfigStream struct {
	Streams []StreamSource `config:"stream_sources"`
	Ingress StreamIngress  `config:"ingress"`
}

func (*ConfigStream) ForChannel added in v0.2.4

func (cs *ConfigStream) ForChannel(obj models.Channel) ConfigStream

ForChannel fills ConfigStream by placeholder with values for a defined channel

type Restream

type Restream struct {
	ID        string `json:"id" example:"d592d376-0d93-4c2a-8156-5ea872fa748a Blub"`
	Name      string `json:"name" example:"Blub"`
	Protocol  string `json:"protocol" example:"rtmp"`
	URL       string `json:"url" example:"rtmp://a.rtmp.youtube.com/live2"`
	StreamKey string `json:"secret" example:"SUPERSECRET"`
	// extras
	State    string `json:"state" example:"ready"`
	Sequence int    `json:"sequence" example:"1"`
}

Restream data

func RestreamFromOven

func RestreamFromOven(data *oven.ResponsePushData) *Restream

type RestreamAdd

type RestreamAdd struct {
	Name      string `json:"name" example:"Blub"`
	Protocol  string `json:"protocol" example:"rtmp"`
	URL       string `json:"url" example:"rtmp://a.rtmp.youtube.com/live2"`
	StreamKey string `json:"secret" example:"SUPERSECRET"`
}

RestreamAdd

func (*RestreamAdd) ToOven

func (d *RestreamAdd) ToOven(channelID string) *oven.ResponsePushStart

Convert for Oven

type StreamIngress added in v0.2.4

type StreamIngress struct {
	WebRTC string `json:"webrtc"`
	RTMP   string `json:"rtmp"`
}

func (*StreamIngress) ForChannel added in v0.2.4

func (si *StreamIngress) ForChannel(r *strings.Replacer) StreamIngress

ForChannel fills StreamIngress by replacer with values for a defined channel

type StreamSource added in v0.2.4

type StreamSource struct {
	Label     string `json:"label"`
	Type      string `json:"type"`
	File      string `json:"file"`
	FrameRate int    `json:"framerate,omitempty"`
}

func (*StreamSource) ForChannel added in v0.2.4

func (ss *StreamSource) ForChannel(r *strings.Replacer) StreamSource

ForChannel fills StreamSource by replacer with values for a defined channel

Jump to

Keyboard shortcuts

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