Commit Graph

129 Commits

Author SHA1 Message Date
Nick Pace
dfb2925f91 Disable PixelStreaming test that doesn't work in a Horde environment
#rb self
#fyi luke.bermingham, aidan.possemiers, matthew.cotton, mattias.jansson
#jira
#preflight 628f0cfdaf7a2e956bfce2e7

[CL 20376338 by Nick Pace in ue5-main branch]
2022-05-26 01:35:34 -04:00
Aidan Possemiers
1b422f2123 Disabling some PVS-Studio warnings in test code.
#jira UE-153552
#preflight 628ed761f622d972b5ac69b6
#rb luke.bermingham, aidan.possemiers

[CL 20375827 by Aidan Possemiers in ue5-main branch]
2022-05-26 00:16:31 -04:00
Luke Bermingham
16fb0841c4 Fixing VCam input.
- CreateInputDevice is only called once on a module so it cannot be used to create multiple input devices when we're creating mutliple streamers. Only the default will work since it's the first being made.
- Fixing signalling config loading when it is readonly.

#fyi Matthew.Cotton, David.Hibbitts
#preflight 628dd36faf7a2e956bb09db8

[CL 20361009 by Luke Bermingham in ue5-main branch]
2022-05-25 03:12:06 -04:00
Nick Pace
588f244816 Add additional PixelStreaming tests to automation
#rb none
#fyi luke.bermingham, aidan.possemiers, matthew.cotton, mattias.jansson
#jira
#preflight na

[CL 20359603 by Nick Pace in ue5-main branch]
2022-05-24 22:08:38 -04:00
Aidan Possemiers
8f81d2a2b0 Fix nonunity build error in game target.
#JIRA UE-153906
#rb self
#fyi Luke.Bermingham, Mattias.Jansson
#preflight local

[CL 20358462 by Aidan Possemiers in ue5-main branch]
2022-05-24 19:57:27 -04:00
Luke Bermingham
35dacaed3d Fix cirrus emitting ugly error message if config file was readonly.
Move --nosudo onto UE::PixelStreaming::Servers

#fyi Aidan.Possemiers
#preflight 628ccd98fc217779d43656dd

[CL 20346948 by Luke Bermingham in ue5-main branch]
2022-05-24 08:53:11 -04:00
Luke Bermingham
69086a164b Fix PixelStreaming servers to launch correctly in VCam usecase and provide better logging/output.
- Added ability to turn off polling if ready on Pixel Streaming servers.
- Added lifecycle logging and child process logging to servers launched through UE::PixelStreaming::Servers.
- Fixed PixelStreamingVCam to shut down streamer before signalling server to avoid ugly log message.
- Modified PixelStreaming::Server tests to have a timeout if they fail to resolve within 60 seconds.
- Exposed HttpPort UProperty on PixelStreamingVCam so user can set webserver port other than 80 if required (this is required for Linux).

#rb self
#fyi Aidan.Possemiers, Matthew.Cotton, Mattias.Jansson
#preflight https://horde.devtools.epicgames.com/job/628c8dc3f057b981ca4a5a63
#preflight 628c8dc3f057b981ca4a5a63

[CL 20345239 by Luke Bermingham in ue5-main branch]
2022-05-24 04:12:17 -04:00
Aidan Possemiers
887880ec99 Early Pixel Streaming 5.1 features, bugfixes, and refactors that benefit main. (From various authors)
*************
Features
*************
- Added `stat pixelstreaminggraphs` that show realtime graphs of Pixel Streaming stats.
- Added -PixelStreamingInputController=Host (or Any) to optionally restrict stream inputs to a single host peer. The default is -PixelStreamingInputController=Any
- Add PixelStreamingServers utility to launch PixelStreaming servers from C++. (Added accompanying test too).
- Added tests for FPixelStreamingSourceFrame, FPixelStreamingFrameMetadata, FPixelStreamingFrameAdapterProcess and FPixelStreamingFrameAdapter
- Added the ability to override the default InputDevice.
- Added the ability to have multiple streamers.
*************
Bugfixes
*************
- Fix so that NVENC now only needs to scale frames as needed, there were some extraneous scaling happening before.
- Fix on screen hud stats on startup that were not dismissable.
- Fix PixelStreaming module state cleanup that was causing packaging crashes.
- Fix bug where SFU peers were unable to receive data channels messages from the streamer.
- Fix failing "connect" test where quality & input controller messages were being sent too early (before datachannel was established) for P2P peers.
- Fix PixelStreamingAudioComponent finding trying to find audio sink on a data-only peer and crashing.
- Fix PIXELSTREAMING_API exports on some files.
- Fix PixelStreaming.build.cs that was too harsh about excluding any file with 'node' in the name.
- Fix PixelStreaming.build.cs to exclude packaging the platform_scripts/cmd/coturn dir.
- Fix Vulkan fast texture copy codepath to not crash in ssome edgecases.
*************
Refactors
*************
- Frames now flow through a much more rigid set of operations to get streamed.
- Video Sources have a Video Adapter and are fed by a Video Input.
- Video Adapters are fed by the input and contains a number of `Processes`.
- Processes take the input frame and adapt it to a format that the encoder can use.
- Frame Buffers now contains a reference to the adapter, frame data is grabbed from here as needed by the encoder.
- Adapters and their processes are also public with the intention that users can implement their own adapt step for other encoders.
- Streamer is also now modular so we can have multiple streamers with their own inputs that stream to their own location.
- Extracted out the copy texture into a rendering util and tweaked how it handles transitions.
- Modify PixelStreamingModule to use new functions for creating a streamer.
- Added optional codepaths to use WebRTC M96 or M84.
- Refactor plugin to enable using our API for the new Pixel Streaming Player plugin.
- Created a new PixelStreamingPeerConnection class to wrap the webrtc peer connection with specific pixelstreaming behaviour.
- Made the signalling server connection public and renamed its observer methods so its obvious when they're implemented.
- Some small changes to frame buffers so make handling of cached data slightly safer.
- Made use of lambdas more explicit where possible.
- Remove unnecessary warning message from PixelStreamingAudioComponent.

#rb Luke.Bermingham
#fyi Mattias.Jansson, Nick.Pace, Mathew.Cotton
#jira UE-152859
#preflight 6289bd911422fb01af9601b7

[CL 20315933 by Aidan Possemiers in ue5-main branch]
2022-05-22 19:42:03 -04:00
christopher waters
3b18bce7f0 Fixing initial state issues after changing the FRHITextureCreateDesc creation.
#jira UE-151907
#rb mihnea.balta
#preflight 627e751b7c26e2477354c142

[CL 20182229 by christopher waters in ue5-main branch]
2022-05-13 11:45:30 -04:00
Aidan Possemiers
55c7be3088 Fix for ASan error heap-use-after-free in Pixel Streaming on shutdown
#JIRA UE-151789
#rb self
#fyi Brandon.Schaefer, Mattias.Jansson
#preflight 627db8cb344341900531e19f

[CL 20178025 by Aidan Possemiers in ue5-main branch]
2022-05-13 01:18:05 -04:00
christopher waters
9ef9e2bf50 Removing the long-form create functions and constructors from FRHITextureCreateDesc in favor of the shorter versions.
#jira none
#rb luke.thatcher
#preflight 627d7c70a82f3adab8b3524e

[CL 20172685 by christopher waters in ue5-main branch]
2022-05-12 17:59:39 -04:00
zach bethel
2156756315 Replaced use of CopyToResolveTarget with CopyTexture.
#preflight 627a90ff7e5f24d1edd73422
#rb luke.thatcher, jason.hoerner

[CL 20127337 by zach bethel in ue5-main branch]
2022-05-10 14:47:34 -04:00
Nick Pace
197eae7fc6 Add PixelStreaming tests to CIS/Horde and remove test which currently doesn't meet standards for CIS/Horde
#rb luke.bermingham
#fyi matthew.cotton, aidan.possemiers, mattias.jansson
#jira UE-151362
#preflight

[CL 20100061 by Nick Pace in ue5-main branch]
2022-05-09 02:31:18 -04:00
Aidan Possemiers
28282ac8a5 Fixing copyright boilerplate.
#JIRA none
#rb self
#preflight trivial

[CL 19617318 by Aidan Possemiers in ue5-main branch]
2022-04-04 19:21:41 -04:00
Aidan Possemiers
bea38b0fae This commit is a large collection (from various authors) of Pixel Streaming 5.1 work
that is useful to be released early onto Main.

--------------------------
Bugfixes
--------------------------

Fix update default max bitrate to support 4k
Fix resolution changing and fix match viewport resolution browser side option.
Fix stream not playable when streamer disconnects but page not refreshed.
Fix SFU/data-only peers were able to request/gain quality controller status.
Fix delegate registration for backbuffer texture sources would sometimes be called when deleted and crash.
Fix uncessary bundling of pixel streaming servers when building non-game targets such as Editor/Server.
Fix PixelStreaming plugin now works with "-onethread" enabled and some methods have been made more thread safe.

--------------------------
Refactors
--------------------------
Refactor texture source API surface to enable texture sources that do not use Unreal Engine texture types.
Refactor to make FixedFPSPump be more usable by any arbitrary thing that wants updates at a fixed interval (not just video sources).
Refactor to remove player id from video sources to make them easier to create outside of a true peer connection existing.
Refactor to remove unecessary CVarPixelStreamingWaitForTextureCopy.
Refactor to expose functionality on module `CreateExternalVideoSource`. This is experimental and will likely be changed before 5.1.

--------------------------
Features
--------------------------
Added foundation for desktop streaming on Pixel Streaming.
Added simulcast support for VP8.
Added a compute shader for faster I420 conversion when using VPX, this is faster than CPU readback and conversion in our tests.
Added some PixelStreaming tests
	1. A test that will start streaming, connect to a client, and check that a data channel message can be sent.
	2. A mock signalling server test and functionality to test the C++ connection to the signalling server.
Added "stat pixelstreaming" and made PixelStreaming.HUDStats able to be toggled on/off.
Added custom UE implementation webrtc::AdaptedVideoTrackSource that can add/remove remove video sinks at runtime.
Added ability on module to start/stop streaming as needed.
Added peers can now swap roles between P2P and simulcast mid-stream.
	To test this new feature:
	1. Simply toggle the PreferSFU toggle in the settings panel.
	2. Click the new restart stream button in the settings panel.

#JIRA UCS-2781,UE-140913,UE-141101,UE-141104,UE-141105,UE-141106,UE-141862,UE-147157
#rb Luke.Bermingham
#fyi Nick.Pace, Mathew.Cotton, Mattias.Jansson
#preflight 624a7c27637925b5d3f7840c
#preflight 624b71109f404234149a58a2

[CL 19616813 by Aidan Possemiers in ue5-main branch]
2022-04-04 18:55:21 -04:00
charles bloom
6dd0a22ef5 nop fix comments
#rb none
#preflight none

[CL 19495502 by charles bloom in ue5-main branch]
2022-03-24 10:45:24 -04:00
charles bloom
2e7e09aa5b fix rename TextureSource.cpp to PixelStreamingTextureSource.cpp
#rb none
#preflight none
#preflight 623202dfe50582311ad00f03

[CL 19406474 by charles bloom in ue5-main branch]
2022-03-16 11:40:58 -04:00
Luke Thatcher
ee64a28f30 Copying //UE5/Dev-ParallelRendering to //UE5/Main
This change is the copy-up of work from //UE5/Dev-ParallelRendering to unify the various RHI texture types
 - The separate RHI texture types (FRHITexture2D, FRHITexture2DArray, FRHITexture3D, FRHITextureCube, FRHITextureCubeArray) have been replaced with a single type: FRHITexture.
 - Includes the required refactoring / fixes for the various platform RHIs.

The old texture types are still supported via typedefs, but will soon be marked deprecated. Future rendering code should make use of the FRHITexture type instead.

#jira UE-139559
#rb Mihnea.Balta
#preflight 622f3af819287beb2c3047f6
#robomerge[FN_ENGINEMERGE] DEV-NC

[CL 19371962 by Luke Thatcher in ue5-main branch]
2022-03-14 09:14:58 -04:00
christopher waters
2a8f9987cb Adding minimal interface to VulkanRHI
- Adding IVulkanDynamicRHI interface for plugins that want to touch Vulkan resources/handles directly.
- Modifying plugins that were using VulkanRHIPrivate.h to use the interface instead.
- Removing plugin references to UE Modules and ThirdParty libraries that were only needed because they included the private RHI headers.
- Removing VulkanRHI/Private from plugin include paths.
- Deprecating VulkanRHIBridge and moved its functionality into the new interface.

#jira none
#rb jeannoe.morissette, mihnea.balta, robert.srinivasiah
#preflight 62281ec531133a23da642007
#robomerge FNNC

[CL 19320995 by christopher waters in ue5-main branch]
2022-03-09 11:16:51 -05:00
christopher waters
b7f30cbbaf Adding minimal interfaces to D3D11 and D3D12 RHIs
- Adding ID3D12DynamicRHI and ID3D11DynamicRHI interfaces for plugins that want to touch DirectX resources/devices directly.
- Adding specific headers for including DirectX headers: D3D12ThirdParty.h and D3D11ThirdParty.h
- Modifying plugins that were using D3D11RHIPrivate.h and D3D12RHIPrivate.h to use the interfaces instead.
- Removing plugin references to UE Modules and ThirdParty libraries that were only needed because they included the private RHI headers.
- Removing D3D11RHI/Private and D3D12RHI/Private from plugin include paths.

#jira none
#rb jeannoe.morissette, kenzo.terelst, mihnea.balta, eric.mcdaniel
#preflight 6222395bb066ef60bbad004a

[CL 19267223 by christopher waters in ue5-main branch]
2022-03-04 11:34:00 -05:00
marc audy
db07ab30b3 Fix a spelling error in the public facing Pixel Streaming delegates
#jira UE-144372
#rb luke.bermingham
[FYI] mattias.jansson
#preflight 621f2aa8410576ef87fd91a7
#lockdown mitchell.wilson

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: william.belcher
#ROBOMERGE-SOURCE: CL 19220192 in //UE5/Release-5.0/... via CL 19223584
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19227619 by marc audy in ue5-main branch]
2022-03-02 15:28:25 -05:00
Luke Bermingham
90317df5b3 Fix comment out unsupported RTP parameters that was causing simulcast streaming to fail.
#rb Aidan.Possemiers
#fyi Matthew.Cotton, Mattias.Jansson
#preflight trivial

[CL 19170334 by Luke Bermingham in ue5-main branch]
2022-02-27 23:19:31 -05:00
christopher waters
c001265796 Removing uses of FDynamicRHI::GetName() and GetGraphicsRHI() to identify specific RHIs in favor of ERHIInterfaceType.
Switching direct casts of GDynamicRHI to use the new CastDynamicRHI/GetDynamicRHI functions. This prevents incorrectly casting RHIValidation into the wrong types.

#jira none
#rb josh.adams, will.damon, peter.tarasenko
#preflight 6216a3b9c15ec90be95f54f7

[CL 19116145 by christopher waters in ue5-main branch]
2022-02-24 11:58:36 -05:00
Luke Bermingham
60a3ae546f Add network priority of video packet to be as high as possible.
#rb Aidan.Possemiers
#fyi Mattias.Jansson, Matthew.Cotton
#preflight trivial

[CL 19066840 by Luke Bermingham in ue5-main branch]
2022-02-21 02:47:48 -05:00
William Belcher
4fffed3c91 Fix streamer to work with older versions of the cirrus signalling server where the offer/answer pattern is reversed
#jira none
#preflight trivial
#rb self

[CL 19008258 by William Belcher in ue5-main branch]
2022-02-15 20:02:44 -05:00