Documentation ¶
Overview ¶
Package peerconnection provides common code for webrtc.* RTCPeerConnection tests.
Index ¶
Constants ¶
const ( // LoopbackFile is the file containing the RTCPeerConnection loopback code. LoopbackFile = "loopback_peerconnection.html" // SimulcastAdapterName is the name of the RTC Stat value when simulcast encoding is used. SimulcastAdapterName = "SimulcastEncoderAdapter" )
Variables ¶
This section is empty.
Functions ¶
func DataFiles ¶
func DataFiles() []string
DataFiles returns a list of required files that tests that use this package should include in their Data fields.
func RunDecodePerf ¶
func RunDecodePerf(ctx context.Context, cr *chrome.Chrome, fileSystem http.FileSystem, outDir string, opts RTCTestOptions) error
RunDecodePerf starts a Chrome instance (with or without hardware video decoder), opens a WebRTC loopback page and collects performance measures in p.
func RunRTCPeerConnection ¶
func RunRTCPeerConnection(ctx context.Context, cr *chrome.Chrome, fileSystem http.FileSystem, verifyMode VerifyHWAcceleratorMode, profile string, simulcast bool, svc string) error
RunRTCPeerConnection launches a loopback RTCPeerConnection and inspects that the VerifyHWAcceleratorMode codec is hardware accelerated if profile is not NoVerifyHWAcceleratorUsed.
Types ¶
type RTCTestOptions ¶
type RTCTestOptions struct {
// contains filtered or unexported fields
}
RTCTestOptions is used to describe the config used to run RTCPeerConnectionPerf.
func MakeSWTestOptions ¶
func MakeSWTestOptions(profile string) RTCTestOptions
MakeSWTestOptions creates RTCTestoptions for profile and with HW Encoding/Decoding disabled.
func MakeTestOptions ¶
func MakeTestOptions(profile string) RTCTestOptions
MakeTestOptions creates RTCTestoptions for profile and with HW Encoding/Decoding enabled.
func MakeTestOptionsWithSVC ¶
func MakeTestOptionsWithSVC(profile, svc string) RTCTestOptions
MakeTestOptionsWithSVC creates RTCTestoptions for profile, with HW Encoding/Decoding enabled and with a layer structure as per svc definition.
func MakeTestOptionsWithVideoGrid ¶
func MakeTestOptionsWithVideoGrid(profile string, videoGridDimension int, videoGridFile string) RTCTestOptions
MakeTestOptionsWithVideoGrid creates RTCTestoptions for profile, with HW Encoding/Decoding enabled and embedding the RTCPeerConnection in a grid of videoGridDimension x videoGridDimension videoGridFiles.
type VerifyHWAcceleratorMode ¶
type VerifyHWAcceleratorMode int
VerifyHWAcceleratorMode is the type of codec to verify hardware acceleration for.
const ( // VerifyHWEncoderUsed refers to WebRTC hardware accelerated video encoding. VerifyHWEncoderUsed VerifyHWAcceleratorMode = iota // VerifyHWDecoderUsed refers to WebRTC hardware accelerated video decoding. VerifyHWDecoderUsed // VerifySWEncoderUsed refers to WebRTC software video encoding. VerifySWEncoderUsed // VerifySWDecoderUsed refers to WebRTC software video decoding. VerifySWDecoderUsed // NoVerifyHWAcceleratorUsed means it doesn't matter if WebRTC uses any accelerated video. NoVerifyHWAcceleratorUsed )