Files
UnrealEngineUWP/Engine/Source/Editor/EditorLiveStreaming/EditorLiveStreaming.h
Mike Fricker 1a24188e92 Live Streaming improvements
- New API for querying a list of existing live stream URLs for any game
- New "QueryLiveStreams" Blueprint node in the "Live Streaming" category (latent)
- Initial API support for sending and receiving online chat messages (no blueprint support yet)
- Fixed broadcasting console commands not unregistered when module is unloaded
- Various code clean-ups

[CL 2124665 by Mike Fricker in Main branch]
2014-07-02 11:33:24 -04:00

68 lines
2.0 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "IEditorLiveStreaming.h"
/**
* Handles broadcasting of the editor to a live internet stream
*/
class FEditorLiveStreaming
: public IEditorLiveStreaming
{
public:
/** Default constructor */
FEditorLiveStreaming();
/** IModuleInterface overrides */
virtual void StartupModule() override;
virtual void ShutdownModule() override;
/** IEditorLiveStreaming overrides */
virtual bool IsLiveStreamingAvailable() const override;
virtual bool IsBroadcastingEditor() const override;
virtual void StartBroadcastingEditor() override;
virtual void StopBroadcastingEditor() override;
virtual void BroadcastEditorVideoFrame() override;
protected:
/** Called by the live streaming service when streaming status has changed or an error has occurred */
void BroadcastStatusCallback( const struct FLiveStreamingStatus& Status );
/** Closes the window that shows the current status of the broadcast */
void CloseBroadcastStatusWindow();
/** Called by the live streaming service when we get a new chat message to display */
void OnChatMessage( const FText& UserName, const FText& ChatMessage );
private:
/** True if we're currently broadcasting anything */
bool bIsBroadcasting;
/** The live streaming implementation we're using for editor broadcasting */
class ILiveStreamingService* LiveStreamer;
/** Number of video frames we've submitted since we started broadcasting */
uint32 SubmittedVideoFrameCount;
/** A temporary pair of buffers that we write our video frames to */
void* ReadbackBuffers[2];
/** The current buffer index. We bounce between them to avoid stalls. */
int32 ReadbackBufferIndex;
/** Persistent Slate notification for live streaming status */
TWeakPtr< class SNotificationItem > NotificationWeakPtr;
/** Dynamic slate image brush for our web cam texture */
TSharedPtr< struct FSlateDynamicImageBrush > WebCamDynamicImageBrush;
/** Window for broadcast status */
TSharedPtr< class SWindow > BroadcastStatusWindow;
};