Documentation ¶
Index ¶
Constants ¶
View Source
const ( TagAudio = 0x08 TagVideo = 0x09 TagScriptDataAmf0 = 0x12 TagScriptDataAmf3 = 0x0f )
View Source
const ( SoundMp3 = 0x02 SoundAac = 0x0a AacSeqHdr = 0x00 AacRaw = 0x01 )
View Source
const ( AvcSeqHdr = 0x00 FrameKey = 0x01 FrameInter = 0x02 VideoH264 = 0x07 )
View Source
const ( Publish = "publish" Play = "play" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioPacketHeader ¶
type AudioPacketHeader interface { PacketHeader SoundFormat() uint8 AACPacketType() uint8 }
type CodecParser ¶
type CodecParser interface { SampleRater Parse(*Packet, io.Writer) error }
type GetWriter ¶
type GetWriter interface {
GetWriter(Info) WriteCloser
}
type Handler ¶
type Handler interface { HandleReader(ReadCloser) HandleWriter(WriteCloser) }
type Info ¶
func (Info) IsInterval ¶
type Packet ¶
type Packet struct { IsAudio bool IsVideo bool IsMetadata bool TimeStamp uint32 // dts StreamID uint32 Header PacketHeader Data []byte }
Header can be converted to AudioHeaderInfo or VideoHeaderInfo
type PacketHeader ¶
type PacketHeader interface { }
type RWBaser ¶
type RWBaser struct { PreTime time.Time BaseTimestamp uint32 LastVideoTimestamp uint32 LastAudioTimestamp uint32 // contains filtered or unexported fields }
func NewRWBaser ¶
func (*RWBaser) BaseTimeStamp ¶
func (*RWBaser) CalcBaseTimestamp ¶
func (rw *RWBaser) CalcBaseTimestamp()
func (*RWBaser) RecTimeStamp ¶
func (*RWBaser) SetPreTime ¶
func (rw *RWBaser) SetPreTime()
type SampleRater ¶
type VideoPacketHeader ¶
type VideoPacketHeader interface { PacketHeader IsKeyFrame() bool IsSeq() bool CodecID() uint8 CompositionTime() int32 }
Click to show internal directories.
Click to hide internal directories.