Files
UnrealEngineUWP/Engine/Source/Programs/PixelStreaming/WebRTCProxy/src/ClientSession.h
Thomas Sarkanen 8ba3c4c087 Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
#rb none
#jira none

[CL 4665410 by Thomas Sarkanen in Dev-Anim branch]
2018-12-17 06:31:16 -05:00

58 lines
2.2 KiB
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "WebRTCProxyCommon.h"
class FConductor;
struct FClientSession
: public webrtc::CreateSessionDescriptionObserver
, public webrtc::PeerConnectionObserver
, public webrtc::DataChannelObserver
{
FClientSession(FConductor& Outer, FClientId ClientId, bool bOriginalQualityController);
~FClientSession() override;
void DisconnectClient();
FConductor& Outer;
FClientId ClientId;
bool bOriginalQualityController;
std::atomic<class FVideoEncoder*> VideoEncoder = nullptr;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> PeerConnection;
rtc::scoped_refptr<webrtc::DataChannelInterface> DataChannel;
std::atomic<bool> bDisconnecting = false;
//
// webrtc::PeerConnectionObserver implementation.
//
void OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState NewState) override;
void OnAddStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> Stream) override;
void OnRemoveStream(rtc::scoped_refptr<webrtc::MediaStreamInterface> Stream) override;
void OnDataChannel(rtc::scoped_refptr<webrtc::DataChannelInterface> Channel) override;
void OnRenegotiationNeeded() override;
void OnIceConnectionChange(webrtc::PeerConnectionInterface::IceConnectionState NewState) override;
void OnIceGatheringChange(webrtc::PeerConnectionInterface::IceGatheringState NewState) override;
void OnIceCandidate(const webrtc::IceCandidateInterface* Candidate) override;
void OnIceCandidatesRemoved(const std::vector<cricket::Candidate>& candidates) override;
void OnIceConnectionReceivingChange(bool Receiving) override;
void OnTrack(rtc::scoped_refptr<webrtc::RtpTransceiverInterface> transceiver) override;
void OnRemoveTrack(rtc::scoped_refptr<webrtc::RtpReceiverInterface> receiver) override;
//
// werbrtc::DataChannelObserver implementation.
//
void OnStateChange() override
{}
void OnBufferedAmountChange(uint64_t PreviousAmount) override
{}
void OnMessage(const webrtc::DataBuffer& Buffer) override;
//
// webrtc::CreateSessionDescriptionObserver implementation.
//
void OnSuccess(webrtc::SessionDescriptionInterface* Desc) override;
void OnFailure(const std::string& Error) override;
};