mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
GB: Support HEVC for regression test and load tool for GB. (#3416)
Co-authored-by: Winlin <winlin@vip.126.com> Co-authored-by: chundonglinlin <chundonglinlin@163.com>
This commit is contained in:
parent
733aeaa641
commit
67867242fc
9 changed files with 382 additions and 51 deletions
32
trunk/3rdparty/srs-bench/gb28181/gb_test.go
vendored
32
trunk/3rdparty/srs-bench/gb28181/gb_test.go
vendored
|
@ -1,6 +1,6 @@
|
|||
// The MIT License (MIT)
|
||||
//
|
||||
// Copyright (c) 2022 Winlin
|
||||
// # Copyright (c) 2022 Winlin
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
// this software and associated documentation files (the "Software"), to deal in
|
||||
|
@ -47,6 +47,36 @@ func TestGbPublishRegularly(t *testing.T) {
|
|||
return nil
|
||||
}
|
||||
|
||||
t.ingester.conf.psConfig.video = "avatar.h264"
|
||||
if err := t.Run(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}()
|
||||
if err := filterTestError(ctx.Err(), err); err != nil {
|
||||
t.Errorf("err %+v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGbPublishRegularlyH265(t *testing.T) {
|
||||
ctx := logger.WithContext(context.Background())
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Duration(*srsTimeout)*time.Millisecond)
|
||||
defer cancel()
|
||||
|
||||
err := func() error {
|
||||
t := NewGBTestPublisher()
|
||||
defer t.Close()
|
||||
|
||||
var nnPackets int
|
||||
t.ingester.onSendPacket = func(pack *PSPackStream) error {
|
||||
if nnPackets += 1; nnPackets > 10 {
|
||||
cancel()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
t.ingester.conf.psConfig.video = "avatar.h265"
|
||||
if err := t.Run(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue