rtp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RtpCapureFilter string = "udp and not (" +
	"udp port 53 or " +
	"udp port 138 or " +
	"udp port 67 or " +
	"udp port 68 or " +
	"udp port 1900 or " +

	"udp port 500 or " +
	"udp port 123 or " +
	"port 5060" +
	")"
View Source
var RtpLayerType = gopacket.RegisterLayerType(
	2001,
	gopacket.LayerTypeMetadata{
		"RtpLayerType",
		gopacket.DecodeFunc(decodeRtpLayer),
	},
)

Functions

This section is empty.

Types

type RtpLayer

type RtpLayer struct {
	ReceivedAt            time.Time
	Header                []byte
	Version               int
	Padding               bool
	Extension             bool
	CC                    int
	Marker                bool
	PayloadType           int
	SequenceNumber        uint16
	Timestamp             uint32
	Ssrc                  uint32
	Csrc                  []uint32
	ExtensionHeaderId     uint16
	ExtensionHeaderLength uint16
	ExtensionHeader       []byte
	Payload               []byte
	Data                  []byte
}

func (RtpLayer) LayerContents

func (l RtpLayer) LayerContents() []byte

func (RtpLayer) LayerPayload

func (l RtpLayer) LayerPayload() []byte

func (RtpLayer) LayerType

func (l RtpLayer) LayerType() gopacket.LayerType

func (RtpLayer) RtpPacket

func (l RtpLayer) RtpPacket() *RtpPacket

Improve

func (RtpLayer) String

func (l RtpLayer) String() string

type RtpPacket

type RtpPacket struct {
	ReceivedAt            time.Time
	Version               int
	Padding               bool
	Extension             bool
	CC                    int
	Marker                bool
	PayloadType           int
	SequenceNumber        uint16
	Timestamp             uint32
	Ssrc                  uint32
	Csrc                  []uint32
	ExtensionHeaderId     uint16
	ExtensionHeaderLength uint16
	ExtensionHeader       []byte
	Payload               []byte
	Data                  []byte
}

func (RtpPacket) String added in v0.9.0

func (r RtpPacket) String() string

type RtpReader

type RtpReader struct {
	// contains filtered or unexported fields
}

RtpReader reads

func NewRtpReader

func NewRtpReader(path string) (reader *RtpReader, err error)

NewRtpReader creates new reader

func (*RtpReader) Close

func (r *RtpReader) Close()

Close rtp reader

func (*RtpReader) GetStreams

func (r *RtpReader) GetStreams() []*RtpStream

GetStreams returns rtp streams identified

type RtpStream

type RtpStream struct {

	// Public
	Ssrc               uint32
	PayloadType        int
	SrcIP, DstIP       string
	SrcPort, DstPort   uint
	StartTime, EndTime time.Time

	// Internal - improve
	FirstTimestamp uint32
	FirstSeq       uint16
	Cycle          uint
	CurSeq         uint16

	// Calculated
	TotalExpectedPackets uint
	LostPackets          uint
	MeanJitter           float32
	MeanBandwidth        float32

	RtpPackets []*RtpPacket
}

func (*RtpStream) AddPacket

func (r *RtpStream) AddPacket(rtp *RtpPacket)

func (RtpStream) String

func (r RtpStream) String() string

Jump to

Keyboard shortcuts

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