cleanup examples

This commit is contained in:
aler9
2023-01-08 22:13:15 +01:00
parent 5a1fdd13a9
commit e86bf26343

View File

@@ -1,7 +1,6 @@
package main package main
import ( import (
"fmt"
"log" "log"
"sync" "sync"
@@ -87,19 +86,6 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
sh.publisher.Close() sh.publisher.Close()
} }
var forma *format.H265
medi := ctx.Medias.FindFormat(&forma)
if medi == nil {
return &base.Response{
StatusCode: base.StatusBadRequest,
}, fmt.Errorf("H264 media not found")
}
for _, x := range forma.PPS {
fmt.Printf("0x%.2x, ", x)
}
fmt.Println("")
// create the stream and save the publisher // create the stream and save the publisher
sh.stream = gortsplib.NewServerStream(ctx.Medias) sh.stream = gortsplib.NewServerStream(ctx.Medias)
sh.publisher = ctx.Session sh.publisher = ctx.Session