// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System.Threading.Tasks;
namespace Microsoft.MixedReality.Toolkit.Input
{
///
/// Provides input recording into an internal buffer and exporting to files.
///
public interface IMixedRealityInputRecordingService : IMixedRealityInputDeviceManager
{
///
/// True if input is being recorded.
///
bool IsRecording { get; }
///
/// Limit the size of the recording buffer.
///
///
/// If recording is limited any input older than the RecordingBufferTimeLimit will be discarded.
///
bool UseBufferTimeLimit { get; set; }
///
/// Maximum duration in seconds of the input recording if UseBufferTimeLimit is enabled.
///
///
/// If UseBufferTimeLimit is enabled then keyframes older than this limit will be discarded.
///
float RecordingBufferTimeLimit { get; set; }
///
/// Start unlimited input recording.
///
void StartRecording();
///
/// Stop recording input.
///
void StopRecording();
///
/// Discard all recorded input
///
void DiscardRecordedInput();
///
/// Save recorded input animation to a file.
///
/// Directory in which to create the file. If null the persistent data path of the app is used.
/// File path where input has been recorded.
///
/// Filename is determined automatically.
///
string SaveInputAnimation(string directory = null);
///
/// Save recorded input animation to a file.
///
/// Name of the file to create.
/// Directory in which to create the file. If null the persistent data path of the app is used.
/// File path where input has been recorded.
string SaveInputAnimation(string filename, string directory);
///
/// Save recorded input animation to a file asynchronously.
///
/// Directory in which to create the file. If null the persistent data path of the app is used.
/// File path where input has been recorded.
///
/// Filename is determined automatically.
///
Task SaveInputAnimationAsync(string directory = null);
///
/// Save recorded input animation to a file asynchronously.
///
/// Name of the file to create.
/// Directory in which to create the file. If null the persistent data path of the app is used.
/// File path where input has been recorded.
Task SaveInputAnimationAsync(string filename, string directory);
}
}