-
Notifications
You must be signed in to change notification settings - Fork 201
/
stats_session.go
76 lines (69 loc) · 2.08 KB
/
stats_session.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package gortsplib
import (
"time"
"github.com/bluenviron/gortsplib/v4/pkg/description"
"github.com/bluenviron/gortsplib/v4/pkg/format"
)
// StatsSessionFormat are session format statistics.
type StatsSessionFormat struct {
// number of RTP packets correctly received and processed
RTPPacketsReceived uint64
// number of sent RTP packets
RTPPacketsSent uint64
// number of lost RTP packets
RTPPacketsLost uint64
// mean jitter of received RTP packets
RTPPacketsJitter float64
// local SSRC
LocalSSRC uint32
// remote SSRC
RemoteSSRC uint32
// last sequence number of incoming/outgoing RTP packets
RTPPacketsLastSequenceNumber uint16
// last RTP time of incoming/outgoing RTP packets
RTPPacketsLastRTP uint32
// last NTP time of incoming/outgoing NTP packets
RTPPacketsLastNTP time.Time
}
// StatsSessionMedia are session media statistics.
type StatsSessionMedia struct {
// received bytes
BytesReceived uint64
// sent bytes
BytesSent uint64
// number of RTP packets that could not be processed
RTPPacketsInError uint64
// number of RTCP packets correctly received and processed
RTCPPacketsReceived uint64
// number of sent RTCP packets
RTCPPacketsSent uint64
// number of RTCP packets that could not be processed
RTCPPacketsInError uint64
// format statistics
Formats map[format.Format]StatsSessionFormat
}
// StatsSession are session statistics.
type StatsSession struct {
// received bytes
BytesReceived uint64
// sent bytes
BytesSent uint64
// number of RTP packets correctly received and processed
RTPPacketsReceived uint64
// number of sent RTP packets
RTPPacketsSent uint64
// number of lost RTP packets
RTPPacketsLost uint64
// number of RTP packets that could not be processed
RTPPacketsInError uint64
// mean jitter of received RTP packets
RTPPacketsJitter float64
// number of RTCP packets correctly received and processed
RTCPPacketsReceived uint64
// number of sent RTCP packets
RTCPPacketsSent uint64
// number of RTCP packets that could not be processed
RTCPPacketsInError uint64
// media statistics
Medias map[*description.Media]StatsSessionMedia
}