1
Fork 0

Use a named type for trackAction kind.

This commit is contained in:
Juliusz Chroboczek 2023-12-09 22:13:24 +01:00
parent 5c2e5ee5c0
commit 002d519f91
1 changed files with 5 additions and 3 deletions

View File

@ -415,18 +415,20 @@ type rtpUpTrack struct {
bufferedNACKs []uint16
}
type trackActionKind int
const (
trackActionAdd = iota
trackActionAdd trackActionKind = iota
trackActionDel
trackActionKeyframe
)
type trackAction struct {
action int
action trackActionKind
track conn.DownTrack
}
func (up *rtpUpTrack) action(action int, track conn.DownTrack) {
func (up *rtpUpTrack) action(action trackActionKind, track conn.DownTrack) {
up.actions.Put(trackAction{action, track})
}