support publishing H265 and AV1 tracks with Enhanced RTMP (#1393) (#1446) (#1621) (#1756)

This commit is contained in:
Alessandro Ros
2023-05-04 20:37:25 +02:00
committed by GitHub
parent 225220ddd5
commit e8124e2f56
57 changed files with 1971 additions and 1716 deletions

View File

@@ -113,8 +113,9 @@ func (s *rtmpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf cha
return err
}
if _, ok := videoFormat.(*formats.H265); ok {
return fmt.Errorf("proxying H265 streams with RTMP is not supported")
switch videoFormat.(type) {
case *formats.H265, *formats.AV1:
return fmt.Errorf("proxying H265 or AV1 tracks with RTMP is not supported")
}
var medias media.Medias
@@ -165,7 +166,7 @@ func (s *rtmpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf cha
}
switch tmsg := msg.(type) {
case *message.MsgVideo:
case *message.Video:
if videoFormat == nil {
return fmt.Errorf("received an H264 packet, but track is not set up")
}
@@ -175,7 +176,7 @@ func (s *rtmpSource) run(ctx context.Context, cnf *conf.PathConf, reloadConf cha
s.Log(logger.Warn, "%v", err)
}
case *message.MsgAudio:
case *message.Audio:
if audioFormat == nil {
return fmt.Errorf("received an AAC packet, but track is not set up")
}