Versions in this module Expand all Collapse all v0 v0.1.0 May 11, 2020 Changes in this version + const SAVE_STATICS_INTERVAL + var EmptyID = "" + type Client struct + func NewRtmpClient(h av.Handler, getter av.GetWriter) *Client + func (c *Client) Dial(url string, method string) error + func (c *Client) GetHandle() av.Handler + type GetInFo interface + GetInfo func() (string, string, string) + type PackWriterCloser struct + func (p *PackWriterCloser) GetWriter() av.WriteCloser + type RtmpStream struct + func NewRtmpStream() *RtmpStream + func (rs *RtmpStream) CheckAlive() + func (rs *RtmpStream) GetStreams() cmap.ConcurrentMap + func (rs *RtmpStream) HandleReader(r av.ReadCloser) + func (rs *RtmpStream) HandleWriter(w av.WriteCloser) + type Server struct + func NewRtmpServer(h av.Handler, getter av.GetWriter) *Server + func (s *Server) Serve(listener net.Listener) (err error) + type StaticsBW struct + AudioDatainBytes uint64 + AudioSpeedInBytesperMS uint64 + LastAudioDatainBytes uint64 + LastTimestamp int64 + LastVideoDatainBytes uint64 + StreamId uint32 + VideoDatainBytes uint64 + VideoSpeedInBytesperMS uint64 + type Stream struct + func NewStream() *Stream + func (s *Stream) AddReader(r av.ReadCloser) + func (s *Stream) AddWriter(w av.WriteCloser) + func (s *Stream) CheckAlive() (n int) + func (s *Stream) Copy(dst *Stream) + func (s *Stream) GetReader() av.ReadCloser + func (s *Stream) GetWs() cmap.ConcurrentMap + func (s *Stream) ID() string + func (s *Stream) IsSendStaticPush() bool + func (s *Stream) SendStaticPush(packet av.Packet) + func (s *Stream) StartStaticPush() + func (s *Stream) StopStaticPush() + func (s *Stream) TransStart() + func (s *Stream) TransStop() + type StreamReadWriteCloser interface + Close func(error) + Read func(c *core.ChunkStream) error + Write func(core.ChunkStream) error + type VirReader struct + ReadBWInfo StaticsBW + Uid string + func NewVirReader(conn StreamReadWriteCloser) *VirReader + func (v *VirReader) Close(err error) + func (v *VirReader) Info() (ret av.Info) + func (v *VirReader) Read(p *av.Packet) (err error) + func (v *VirReader) SaveStatics(streamid uint32, length uint64, isVideoFlag bool) + type VirWriter struct + Uid string + WriteBWInfo StaticsBW + func NewVirWriter(conn StreamReadWriteCloser) *VirWriter + func (v *VirWriter) Check() + func (v *VirWriter) Close(err error) + func (v *VirWriter) DropPacket(pktQue chan *av.Packet, info av.Info) + func (v *VirWriter) Info() (ret av.Info) + func (v *VirWriter) SaveStatics(streamid uint32, length uint64, isVideoFlag bool) + func (v *VirWriter) SendPacket() error + func (v *VirWriter) Write(p *av.Packet) (err error)