Navigation
API > API/Plugins > API/Plugins/PixelStreaming
A specialized representation of a WebRTC peer connection for Pixel Streaming.
| Name | FPixelStreamingPeerConnection |
| Type | class |
| Header File | /Engine/Plugins/Media/PixelStreaming/Source/PixelStreaming/Public/PixelStreamingPeerConnection.h |
| Include Path | #include "PixelStreamingPeerConnection.h" |
Syntax
class FPixelStreamingPeerConnection : public webrtc::PeerConnectionObserver
Inheritance Hierarchy
- webrtc::PeerConnectionObserver → FPixelStreamingPeerConnection
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPixelStreamingPeerConnection() |
PixelStreamingPeerConnection.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPixelStreamingPeerConnection() |
PixelStreamingPeerConnection.h |
Enums
Public
| Name | Remarks |
|---|---|
| EReceiveMediaOption | Flags for CreateOffer/CreateAnswer that indicate what kind of media we indend to receive. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ErrorCallback | TFunction< void(const FString &Error)> | PixelStreamingPeerConnection.h | |
| FOnDataChannel | TMulticastDelegate_OneParam< void, TSharedPtr< FPixelStreamingDataChannel > > | Called when a data channel is opened from the remote side of this connection. | PixelStreamingPeerConnection.h |
| FOnIceCandidate | TMulticastDelegate_OneParam< void, const webrtc::IceCandidateInterface * > | Called when the ICE candidate is emitted. | PixelStreamingPeerConnection.h |
| FOnIceStateChanged | TMulticastDelegate_OneParam< void, webrtc::PeerConnectionInterface::IceConnectionState > | Called when the ICE state changes. | PixelStreamingPeerConnection.h |
| FRTCConfig | webrtc::PeerConnectionInterface::RTCConfiguration | PixelStreamingPeerConnection.h | |
| SDPCallback | TFunction< void(const webrtc::SessionDescriptionInterface *)> | PixelStreamingPeerConnection.h | |
| VoidCallback | TFunction< void()> | PixelStreamingPeerConnection.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ApplicationAudioSource | rtc::scoped_refptr< webrtc::AudioSourceInterface > | PixelStreamingPeerConnection.h | |
| AudioMixer | TSharedPtr< UE::PixelStreaming::FAudioInputMixer > | PixelStreamingPeerConnection.h | |
| PeerConnectionFactory | rtc::scoped_refptr< webrtc::PeerConnectionFactoryInterface > | PixelStreamingPeerConnection.h | |
| SignallingThread | TUniquePtr< rtc::Thread > | PixelStreamingPeerConnection.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnEmitIceCandidate | FOnIceCandidate | PixelStreamingPeerConnection.h | ||
| OnIceStateChanged | FOnIceStateChanged | PixelStreamingPeerConnection.h | ||
| OnNewDataChannel | FOnDataChannel | PixelStreamingPeerConnection.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AudioSink | TSharedPtr< IPixelStreamingAudioSink > | PixelStreamingPeerConnection.h | ||
| AudioSource | rtc::scoped_refptr< webrtc::AudioSourceInterface > | PixelStreamingPeerConnection.h | ||
| bIsDestroying | bool | PixelStreamingPeerConnection.h | ||
| FPixelStreamingDataChannel | friend | We want to be able to create data channels from events emitted from the peer connection | PixelStreamingPeerConnection.h | |
| IsSFU | bool | PixelStreamingPeerConnection.h | ||
| NegotiatedVideoCodec | EPixelStreamingCodec | The video codec that is negotiated and extracted from the SDP. | PixelStreamingPeerConnection.h | |
| PeerConnection | rtc::scoped_refptr< webrtc::PeerConnectionInterface > | PixelStreamingPeerConnection.h | ||
| StatsSource | TSharedPtr< IPixelStreamingStatsSource > | Source of WebRTC stats that we poll regularly. | PixelStreamingPeerConnection.h | |
| VideoSink | rtc::VideoSinkInterface< webrtc::VideoFrame > * | PixelStreamingPeerConnection.h | ||
| VideoSource | rtc::scoped_refptr< webrtc::VideoTrackSourceInterface > | PixelStreamingPeerConnection.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddRemoteIceCandidate
(
const FString& SDPMid, |
Adds ICE candidate data to the peer connection. Usually supplied from the signalling server. | PixelStreamingPeerConnection.h | |
void CreateAnswer
(
EReceiveMediaOption ReceiveOption, |
Asynchronously creates an answer session description for this local peer connection. | PixelStreamingPeerConnection.h | |
TSharedPtr< FPixelStreamingDataChannel > CreateDataChannel
(
int Id, |
Creates a data connection associated with this peer connection. | PixelStreamingPeerConnection.h | |
void CreateOffer
(
EReceiveMediaOption ReceiveOption, |
Asynchronously creates an offer session description for this local peer connection. | PixelStreamingPeerConnection.h | |
virtual void ForEachTransceiver
(
const TFunction< void(rtc::scoped_refptr< webrtc::RtpTransceiverInterface >)>& Func |
A method for iterating through all of the tranceivers on the peer connection. You could use this to check for the existence of an audio/video transceiver. | PixelStreamingPeerConnection.h | |
TSharedPtr< IPixelStreamingAudioSink > GetAudioSink() |
Gets the currently set audio sink on this connection. | PixelStreamingPeerConnection.h | |
rtc::scoped_refptr< webrtc::AudioSourceInterface > GetAudioSource() |
Gets the currently set audio source on this connection. | PixelStreamingPeerConnection.h | |
const webrtc::SessionDescriptionInterface * GetLocalDescription() |
Gets the current local description. | PixelStreamingPeerConnection.h | |
EPixelStreamingCodec GetNegotiatedVideoCodec() |
PixelStreamingPeerConnection.h | ||
const webrtc::SessionDescriptionInterface * GetRemoteDescription() |
Gets the current remote description. | PixelStreamingPeerConnection.h | |
rtc::VideoSinkInterface< webrtc::VideoFrame > * GetVideoSink() |
Gets the currently set video sink on this connection. | PixelStreamingPeerConnection.h | |
rtc::scoped_refptr< webrtc::VideoTrackSourceInterface > GetVideoSource() |
Gets the currently set video source on this connection. | PixelStreamingPeerConnection.h | |
void ReceiveAnswer
(
const FString& SDP, |
Asynchronously sets the remote description from a session description string answered from a signalling server. | PixelStreamingPeerConnection.h | |
void ReceiveOffer
(
const FString& SDP, |
Asynchronously sets the remote description from a session description string offered from a signalling server. | PixelStreamingPeerConnection.h | |
void RefreshStreamBitrate() |
PixelStreamingPeerConnection.h | ||
void SetAudioSink
(
TSharedPtr< IPixelStreamingAudioSink > InSink |
Sets an audio sink on this connection that will receive audio data from this connection. | PixelStreamingPeerConnection.h | |
void SetAudioSource
(
rtc::scoped_refptr< webrtc::AudioSourceInterface > InAudioSource |
Sets an audio source that can supply this connection with audio data. | PixelStreamingPeerConnection.h | |
void SetLocalDescription
(
webrtc::SessionDescriptionInterface* SDP, |
Asynchronously sets the local description using the given session description object. | PixelStreamingPeerConnection.h | |
void SetRemoteDescription
(
webrtc::SessionDescriptionInterface* SDP, |
Asynchronously sets the remote description using the given session description object. | PixelStreamingPeerConnection.h | |
void SetVideoSink
(
rtc::VideoSinkInterface< webrtc::VideoFrame >* InSink |
Sets a video sink on this connection that will receive frame data from this connection. | PixelStreamingPeerConnection.h | |
void SetVideoSource
(
rtc::scoped_refptr< webrtc::VideoTrackSourceInterface > InVideoSource |
Sets a video source that can supply this connection with frame data. | PixelStreamingPeerConnection.h | |
void SetWebRTCStatsCallback
(
rtc::scoped_refptr< webrtc::RTCStatsCollectorCallback > InCallback |
Sets the callback to be used when the stats collector comes knocking. | PixelStreamingPeerConnection.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnAddStream
(
rtc::scoped_refptr< webrtc::MediaStreamInterface > Stream |
PixelStreamingPeerConnection.h | ||
virtual void OnDataChannel
(
rtc::scoped_refptr< webrtc::DataChannelInterface > Channel |
PixelStreamingPeerConnection.h | ||
virtual void OnIceCandidate
(
const webrtc::IceCandidateInterface* Candidate |
PixelStreamingPeerConnection.h | ||
virtual void OnIceCandidatesRemoved
(
const std::vector< cricket::Candidate >& candidates |
PixelStreamingPeerConnection.h | ||
virtual void OnIceConnectionChange
(
webrtc::PeerConnectionInterface::IceConnectionState NewState |
PixelStreamingPeerConnection.h | ||
virtual void OnIceConnectionReceivingChange
(
bool Receiving |
PixelStreamingPeerConnection.h | ||
virtual void OnIceGatheringChange
(
webrtc::PeerConnectionInterface::IceGatheringState NewState |
PixelStreamingPeerConnection.h | ||
virtual void OnRemoveStream
(
rtc::scoped_refptr< webrtc::MediaStreamInterface > Stream |
PixelStreamingPeerConnection.h | ||
virtual void OnRemoveTrack
(
rtc::scoped_refptr< webrtc::RtpReceiverInterface > receiver |
PixelStreamingPeerConnection.h | ||
virtual void OnRenegotiationNeeded() |
PixelStreamingPeerConnection.h | ||
virtual void OnSignalingChange
(
webrtc::PeerConnectionInterface::SignalingState NewState |
Webrtc::PeerConnectionObserver implementation. | PixelStreamingPeerConnection.h | |
virtual void OnTrack
(
rtc::scoped_refptr< webrtc::RtpTransceiverInterface > Transceiver |
PixelStreamingPeerConnection.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TUniquePtr< FPixelStreamingPeerConnection > Create
(
const FRTCConfig& RTCConfig, |
Creates a new peer connection using the given RTC configuration. | PixelStreamingPeerConnection.h | |
static TSharedPtr< IPixelStreamingAudioInput > CreateAudioInput() |
PixelStreamingPeerConnection.h | ||
static void CreatePeerConnectionFactory() |
TODO these static methods can probably be moved off into a singleton or something. | PixelStreamingPeerConnection.h | |
static void ForceVideoKeyframe() |
Causes the video stream to generate a keyframe | PixelStreamingPeerConnection.h | |
static rtc::scoped_refptr< webrtc::AudioSourceInterface > GetApplicationAudioSource() |
Gets the global audio source. | PixelStreamingPeerConnection.h | |
static void PostSignalingTask
(
FunctorT&& InFunc |
Post a task onto the WebRTC signalling thread. | PixelStreamingPeerConnection.h | |
static void RemoveAudioInput
(
TSharedPtr< IPixelStreamingAudioInput > AudioInput |
PixelStreamingPeerConnection.h | ||
static void Shutdown () |
Shuts down the WebRTC thread and destroys the peer connection factory. | PixelStreamingPeerConnection.h |