1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-22 08:35:57 +01:00

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

View file

@ -415,18 +415,20 @@ type rtpUpTrack struct {
bufferedNACKs []uint16 bufferedNACKs []uint16
} }
type trackActionKind int
const ( const (
trackActionAdd = iota trackActionAdd trackActionKind = iota
trackActionDel trackActionDel
trackActionKeyframe trackActionKeyframe
) )
type trackAction struct { type trackAction struct {
action int action trackActionKind
track conn.DownTrack 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}) up.actions.Put(trackAction{action, track})
} }