2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-06-24 12:11:51 -04:00
|
|
|
#pragma once
|
|
|
|
|
#include "GameLiveStreamingFunctionLibrary.generated.h"
|
|
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
|
class UGameLiveStreamingFunctionLibrary : public UBlueprintFunctionLibrary
|
|
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
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
|
|
|
|
|
*/
|
2014-07-02 11:33:24 -04:00
|
|
|
UFUNCTION( BlueprintPure, Category="LiveStreaming" )
|
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.
|
2014-07-16 07:43:42 -04:00
|
|
|
* @param bMirrorWebCamImage You can enable this to flip the web camera image horizontally, so that it looks like a mirror
|
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().
|
|
|
|
|
*/
|
2014-07-24 13:55:31 -04:00
|
|
|
UFUNCTION( BlueprintCallable, Category="LiveStreaming")
|
2014-06-24 12:11:51 -04:00
|
|
|
static void StartBroadcastingGame(
|
2014-07-24 13:55:31 -04:00
|
|
|
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);
|
2014-06-24 12:11:51 -04:00
|
|
|
|
|
|
|
|
/** Stops broadcasting the game */
|
2014-07-02 11:33:24 -04:00
|
|
|
UFUNCTION( BlueprintCallable, Category="LiveStreaming" )
|
2014-06-24 12:11:51 -04:00
|
|
|
static void StopBroadcastingGame();
|
|
|
|
|
|
2014-07-02 11:33:24 -04:00
|
|
|
// @todo livestream: Add Blueprint APIs for chat
|
2014-06-24 12:11:51 -04:00
|
|
|
};
|