mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-26 19:21:14 +08:00
32 lines
557 B
Go
32 lines
557 B
Go
package rtsp
|
|
|
|
import (
|
|
"github.com/lkmio/avformat/utils"
|
|
"github.com/lkmio/rtp"
|
|
)
|
|
|
|
// Track rtsp每路输出流的封装
|
|
type Track struct {
|
|
payload rtp.PayloadType
|
|
MediaType utils.AVMediaType
|
|
StartSeq uint16
|
|
EndSeq uint16
|
|
CodecID utils.AVCodecID
|
|
Muxer rtp.Muxer
|
|
}
|
|
|
|
func (r *Track) Close() {
|
|
|
|
}
|
|
|
|
func NewRTSPTrack(muxer rtp.Muxer, payload rtp.PayloadType, mediaType utils.AVMediaType, id utils.AVCodecID) *Track {
|
|
stream := &Track{
|
|
payload: payload,
|
|
MediaType: mediaType,
|
|
CodecID: id,
|
|
Muxer: muxer,
|
|
}
|
|
|
|
return stream
|
|
}
|