Documentation
¶
Overview ¶
Package webrtp provides RTSP to WebSocket streaming with fMP4 output.
Index ¶
- func AnnexbToAvcc(au [][]byte) []byte
- func BuildFragment(seqNr uint32, dts uint64, dur uint32, isIDR bool, avcc []byte) ([]byte, error)
- func BuildInitH264(sps, pps []byte) ([]byte, error)
- func BuildInitH265(vps, sps, pps []byte) ([]byte, error)
- type Config
- type Hub
- func (r *Hub) Broadcast(data []byte)
- func (r *Hub) GetInit() []byte
- func (r *Hub) GetStats(name string) StreamStats
- func (r *Hub) GetStatus() Status
- func (r *Hub) SetFramerate(framerate float64)
- func (r *Hub) SetInfo(codec string, width, height int, frameRate float64)
- func (r *Hub) SetInit(data []byte)
- func (r *Hub) Subscribe() chan []byte
- func (r *Hub) Unsubscribe(ch chan []byte)
- type Instance
- type Status
- type StreamStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnexbToAvcc ¶
AnnexbToAvcc converts Annex-B NAL units to AVCC format.
func BuildFragment ¶
BuildFragment creates an fMP4 media fragment.
func BuildInitH264 ¶
BuildInitH264 creates an fMP4 init segment for H264 video.
func BuildInitH265 ¶
BuildInitH265 creates an fMP4 init segment for H265 video.
Types ¶
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
func (*Hub) GetStats ¶
func (r *Hub) GetStats(name string) StreamStats
func (*Hub) SetFramerate ¶
func (*Hub) Unsubscribe ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func (*Instance) HandleWebsocket ¶
func (*Instance) InstanceReady ¶
type Status ¶
type Status struct {
Streams []*StreamStats `json:"streams"`
}
type StreamStats ¶
type StreamStats struct {
Name string `json:"name"`
Ready bool `json:"ready"`
Codec string `json:"codec"`
Width int `json:"width"`
Height int `json:"height"`
Framerate float64 `json:"framerate"`
FrameNo uint64 `json:"frameNo"`
ClientCount int32 `json:"clientCount"`
BytesRecv uint64 `json:"bytesRecv"`
Bitrate float64 `json:"bitrateKbps"`
Uptime time.Duration `json:"uptime"`
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
command
|
|
|
webrtp
command
|
|
|
experiment
|
|
|
streamable
command
|
|
|
webtransport
command
|
Click to show internal directories.
Click to hide internal directories.
