mirror of
https://github.com/aler9/gortsplib
synced 2025-09-27 19:42:11 +08:00
improve coverage (#168)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"sync"
|
||||
|
||||
@@ -86,6 +87,19 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
|
||||
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
|
||||
sh.stream = gortsplib.NewServerStream(ctx.Medias)
|
||||
sh.publisher = ctx.Session
|
||||
|
Reference in New Issue
Block a user