| 55 | } |
| 56 | |
| 57 | type StreamTracker struct { |
| 58 | params StreamTrackerParams |
| 59 | |
| 60 | onStatusChanged func(status StreamStatus) |
| 61 | onBitrateAvailable func() |
| 62 | |
| 63 | lock sync.RWMutex |
| 64 | |
| 65 | paused bool |
| 66 | generation atomic.Uint32 |
| 67 | |
| 68 | status StreamStatus |
| 69 | lastNotifiedStatus StreamStatus |
| 70 | |
| 71 | lastBitrateReport time.Time |
| 72 | bytesForBitrate [buffer.DefaultMaxLayerTemporal + 1]int64 |
| 73 | bitrate [buffer.DefaultMaxLayerTemporal + 1]int64 |
| 74 | |
| 75 | isStopped bool |
| 76 | } |
| 77 | |
| 78 | func NewStreamTracker(params StreamTrackerParams) *StreamTracker { |
| 79 | return &StreamTracker{ |
nothing calls this directly
no outgoing calls
no test coverage detected