1
0
Fork 0
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:
Haibo Chen 2023-02-25 16:25:56 +08:00 committed by GitHub
parent 733aeaa641
commit 67867242fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 382 additions and 51 deletions

View file

@ -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
}