Files
UnrealEngineUWP/Engine/Source/Runtime/GameLiveStreaming/GameLiveStreamingFunctionLibrary.h

50 lines
2.7 KiB
C
Raw Normal View History

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
#pragma once
#include "GameLiveStreamingFunctionLibrary.generated.h"
UCLASS()
class UGameLiveStreamingFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_UCLASS_BODY()
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
/**
* Checks to see if we are currently broadcasting live video (and possibly audio) from the game's viewport
*
* @return True if we are currently transmitting
*/
UFUNCTION( BlueprintPure, Category="LiveStreaming" )
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
static bool IsBroadcastingGame();
/**
* Starts broadcasting the game's video (and optionally audio) using an internet streaming service, if one is available
*
* @param FrameRate Frame rate to stream video from when broadcasting to services like Twitch.
* @param ScreenScaling How much to scale the broadcast video resolution down to reduce streaming bandwidth. We recommend broadcasting at resolutions of 1280x720 or lower. Some live streaming providers will not be able to transcode your video to a lower resolution, so using a high resolution stream may prevent low-bandwidth users from having a good viewing experience.
* @param bEnableWebCam If enabled, video from your web camera will be captured and displayed while broadcasting, so that your viewers can see your presence.
* @param DesiredWebCamWidth Desired web cam capture resolution width. The web cam may only support a limited number of resolutions, so we'll choose one that matches as closely to this as possible
* @param DesiredWebCamHeight Desired web cam capture resolution height.
* @param bMirrorWebCamImage You can enable this to flip the web camera image horizontally, so that it looks like a mirror
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
* @param bCaptureAudioFromComputer Enables broadcast of audio being played by your computer, such as in-game sounds
* @param bCaptureAudioFromMicrophone Enables broadcast of audio from your default microphone recording device
* @param bDrawSimpleWebCamVideo If enabled, the engine will draw a simple web cam image on top of the game viewport. If you turn this off, it's up to you to draw the web cam image yourself. You can access the web cam texture by calling IGameLiveStreaming::Get().GetWebCamTexture().
*/
UFUNCTION( BlueprintCallable, Category="LiveStreaming")
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
static void StartBroadcastingGame(
int32 FrameRate = 30,
float ScreenScaling = 1.f,
bool bEnableWebCam = true,
int32 DesiredWebCamWidth = 320,
int32 DesiredWebCamHeight = 240,
bool bMirrorWebCamImage = false,
bool bCaptureAudioFromComputer = true,
bool bCaptureAudioFromMicrophone = true,
bool bDrawSimpleWebCamVideo = true);
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
/** Stops broadcasting the game */
UFUNCTION( BlueprintCallable, Category="LiveStreaming" )
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
static void StopBroadcastingGame();
// @todo livestream: Add Blueprint APIs for chat
Work in progress: Live streaming support for editor and games This commit adds the framework APIs, editor and rendering features needed to support live streaming. Along with this, we're working on a new plugin that adds Twitch.tv support (waiting for legal approval to commit.) - Game live streaming - Allows general support for live internet streaming of game video and audio - Web cam video feed can be overlaid onto game viewports automatically - New 'Broadcast' Blueprint function library allows you to easily start broadcasting from your game - New IGameLiveStreaming API that allows you to start broadcasting through C++ - Editor live streaming - The editor UI now displays a "broadcast" button automatically when a live streaming service is available - Broadcasting of all desktop editor windows is supported (configured in preferences) - If you have a web cam, video will be displayed automatically while broadcasting in a new editor window - New "Live Streaming" editor preference tab with many new settings for configuring broadcasting - New IEditorLiveStreaming API that lets you control editor broadcasting directly, if needed - Added new 'Broadcast.Start' and 'Broadcast.Stop' console commands - These allow you to easily test live streaming in games without writing UI code - Built-in help is available for these new commands - To implement a live streaming plugin: - Inherit from the new ILiveStreamingService interface - Register your "LiveStreaming" feature with the IModularFeatures system - Other changes: - Eliminated broken screen quad drawing functions; replaced with publicly-exposed DrawRectangle() - Slate: Eliminated legacy code for 'marking windows as drawn' (not used anymore) - Slate: Added Slate rendering callback to find out when a frame buffer is ready to be presented [CL 2115377 by Mike Fricker in Main branch]
2014-06-24 12:11:51 -04:00
};