mirror of
https://github.com/aler9/rtsp-simple-server
synced 2025-10-21 14:49:36 +08:00
hls: support proxying AV1 tracks (#2157)
This commit is contained in:
@@ -76,6 +76,22 @@ func (s *hlsSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf chan
|
||||
var medi *media.Media
|
||||
|
||||
switch tcodec := track.Codec.(type) {
|
||||
case *codecs.AV1:
|
||||
medi = &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
Formats: []formats.Format{&formats.AV1{}},
|
||||
}
|
||||
|
||||
c.OnDataAV1(track, func(pts time.Duration, obus [][]byte) {
|
||||
stream.WriteUnit(medi, medi.Formats[0], &formatprocessor.UnitAV1{
|
||||
BaseUnit: formatprocessor.BaseUnit{
|
||||
NTP: time.Now(),
|
||||
},
|
||||
PTS: pts,
|
||||
OBUs: obus,
|
||||
})
|
||||
})
|
||||
|
||||
case *codecs.H264:
|
||||
medi = &media.Media{
|
||||
Type: media.TypeVideo,
|
||||
|
Reference in New Issue
Block a user