webserver

package
v0.0.0-...-09b8166 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-20

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Oct-28

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-20

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-20

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-20

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Nov-03

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-19

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Nov-03

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-19

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Nov-02

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Nov-01

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-19

Package webserver Created by RTT. Author: teocci@yandex.com on 2022-Apr-20

Package webserver Created by RTT. Author: teocci@yandex.com on 2021-Oct-28

Index

Constants

View Source
const (
	StatusCodeFail    = 0
	StatusCodeSuccess = 1

	Success = "success"
)

Variables

View Source
var Session *session.Session

Functions

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func ErrorEmptyCodec

func ErrorEmptyCodec() error

func ErrorEmptyPayloadRequest

func ErrorEmptyPayloadRequest() error

func ErrorParsingJSONRequest

func ErrorParsingJSONRequest(e error) error

func ErrorRemoteAuthorizationFailed

func ErrorRemoteAuthorizationFailed() error

func HandleAddChannel

func HandleAddChannel(c *gin.Context)

HandleAddChannel function add new stream

func HandleAddStream

func HandleAddStream(c *gin.Context)

HandleAddStream function add new stream

func HandleChannelCodec

func HandleChannelCodec(c *gin.Context)

HandleChannelCodec function return codec info struct

func HandleChannelInfo

func HandleChannelInfo(c *gin.Context)

HandleChannelInfo function return stream info struct

func HandleDeleteChannel

func HandleDeleteChannel(c *gin.Context)

HandleDeleteChannel function delete stream

func HandleDeleteStream

func HandleDeleteStream(c *gin.Context)

HandleDeleteStream function delete stream

func HandleEditChannel

func HandleEditChannel(c *gin.Context)

HandleEditChannel function edit stream

func HandleEditStream

func HandleEditStream(c *gin.Context)

HandleEditStream function edit stream

func HandleIndex

func HandleIndex(c *gin.Context)

HandleIndex index file

func HandlePageAddStream

func HandlePageAddStream(c *gin.Context)

func HandlePageDocumentation

func HandlePageDocumentation(c *gin.Context)

func HandlePageEditStream

func HandlePageEditStream(c *gin.Context)

func HandlePageFullScreenMultiView

func HandlePageFullScreenMultiView(c *gin.Context)

func HandlePageMultiview

func HandlePageMultiview(c *gin.Context)

func HandlePagePlayAll

func HandlePagePlayAll(c *gin.Context)

func HandlePagePlayHLS

func HandlePagePlayHLS(c *gin.Context)

func HandlePagePlayMSE

func HandlePagePlayMSE(c *gin.Context)

func HandlePagePlayWebRTC

func HandlePagePlayWebRTC(c *gin.Context)

func HandlePageStreamList

func HandlePageStreamList(c *gin.Context)

func HandleReloadChannel

func HandleReloadChannel(c *gin.Context)

HandleReloadChannel function reload stream

func HandleReloadStream

func HandleReloadStream(c *gin.Context)

HandleReloadStream reload stream

func HandleStreamHLSLLInit

func HandleStreamHLSLLInit(c *gin.Context)

HandleStreamHLSLLInit send client ts segment

func HandleStreamHLSLLM3U8

func HandleStreamHLSLLM3U8(c *gin.Context)

HandleStreamHLSLLM3U8 send client m3u8 play list

func HandleStreamHLSLLM4Segment

func HandleStreamHLSLLM4Segment(c *gin.Context)

HandleStreamHLSLLM4Segment send client ts segment

func HandleStreamHLSM3U8

func HandleStreamHLSM3U8(c *gin.Context)

HandleStreamHLSM3U8 send client m3u8 play list

func HandleStreamHLSTS

func HandleStreamHLSTS(c *gin.Context)

HandleStreamHLSTS send client ts segment

func HandleStreamInfo

func HandleStreamInfo(c *gin.Context)

HandleStreamInfo function return stream info struct

func HandleStreamLLHLSM4Fragment

func HandleStreamLLHLSM4Fragment(c *gin.Context)

HandleStreamLLHLSM4Fragment send client ts segment

func HandleStreamWebRTC

func HandleStreamWebRTC(c *gin.Context)

HandleStreamWebRTC stream video over WebRTC

func HandleStreams

func HandleStreams(c *gin.Context)

HandleStreams function return stream list

func HandleStreamsMultiControlAdd

func HandleStreamsMultiControlAdd(c *gin.Context)

HandleStreamsMultiControlAdd function add new stream's

func HandleStreamsMultiControlDelete

func HandleStreamsMultiControlDelete(c *gin.Context)

HandleStreamsMultiControlDelete function delete stream's

func SendResponse

func SendResponse(c *gin.Context, response ResponseMessage)

func Start

func Start(s *session.Session)

func SupportedCodecs

func SupportedCodecs() []av.CodecType

Types

type ExecStatus

type ExecStatus struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

type HTMLCode

type HTMLCode int
const (
	HTMLCodeUnknown HTMLCode = 0
	HTMLCodeOK      HTMLCode = 200

	HTMLCodeBadRequest       HTMLCode = 400
	HTMLCodeUnauthorized     HTMLCode = 401
	HTMLCodeNotFound         HTMLCode = 404
	HTMLCodeMethodNotAllowed HTMLCode = 405
	HTMLCodeRequestTimeout   HTMLCode = 408
	HTMLCodeServerError      HTMLCode = 500
)

type MultiViewOptions

type MultiViewOptions struct {
	Grid   int                             `json:"grid"`
	Player map[string]MultiViewOptionsGrid `json:"player"`
}

type MultiViewOptionsGrid

type MultiViewOptionsGrid struct {
	UUID       string `json:"uuid"`
	Channel    int    `json:"channel"`
	PlayerType string `json:"playerType"`
}

type Response

type Response struct {
	Status     int
	StreamData StreamData
	Message    []string
	Error      []string
}

type ResponseError

type ResponseError struct {
	Error string `json:"error"`
}

type ResponseMessage

type ResponseMessage struct {
	Code    HTMLCode    `json:"-"`
	Status  int         `json:"status"`
	Payload interface{} `json:"payload,omitempty"`
	Message string      `json:"message,omitempty"`
	Error   string      `json:"error,omitempty"`
}

type ServeResponse

type ServeResponse struct {
	Version   string
	Port      string
	Template  string
	Page      string
	StreamID  string
	ChannelID string
	Streams   map[string]session.Stream
}

type StreamData

type StreamData struct {
	StreamID string     `json:"stream_id"`
	Tracks   []WebCodec `json:"tracks,omitempty"`
	Sdp64    string     `json:"sdp64,omitempty"`
}

func (StreamData) IsNil

func (sd StreamData) IsNil() bool

type StreamRequest

type StreamRequest struct {
	StreamID     string `json:"stream_id"`
	ChannelID    string `json:"channel_id,omitempty"`
	RtspURL      string `json:"rtsp_url,omitempty"`
	OnDemand     bool   `json:"on_demand,omitempty"`
	DisableAudio bool   `json:"disable_audio,omitempty"`
	Debug        bool   `json:"debug,omitempty"`
	SDP64        string `json:"data,omitempty"`
}

func (*StreamRequest) IsNil

func (ssr *StreamRequest) IsNil() bool

type WebCodec

type WebCodec struct {
	Type string `json:"type"`
}

Jump to

Keyboard shortcuts

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