mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
cleanup examples
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user