forked from VixenLights/Vixen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VIX-3439 Create Vixen Player FSEQ Reader
VIX-3439 Create Vixen Player FSEQ Reader
- Loading branch information
Showing
6 changed files
with
661 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace VixenPlayer.FSeqReader | ||
{ | ||
/// <summary> | ||
/// Maintains frame data for a controller. | ||
/// </summary> | ||
public class ControllerInfo : IControllerInfo | ||
{ | ||
#region Constructor | ||
|
||
/// <summary> | ||
/// Constructor | ||
/// </summary> | ||
public ControllerInfo() | ||
{ | ||
FrameData = new List<byte[]>(); | ||
} | ||
|
||
#endregion | ||
|
||
#region IControllerInfo | ||
|
||
/// <inheritdoc/> | ||
public Guid ID { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public int NumberOfChannels { get; set; } | ||
|
||
/// <inheritdoc/> | ||
public List<byte[]> FrameData { get; private set; } | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0-windows</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<UseWPF>true</UseWPF> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Vixen.Core\Vixen.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace VixenPlayer.FSeqReader | ||
{ | ||
/// <summary> | ||
/// Maintains frame data for a controller. | ||
/// </summary> | ||
public interface IControllerInfo | ||
{ | ||
/// <summary> | ||
/// ID of the controller. | ||
/// </summary> | ||
public Guid ID { get; set; } | ||
|
||
/// <summary> | ||
/// Number of channels associated with the controller. | ||
/// </summary> | ||
public int NumberOfChannels { get; set; } | ||
|
||
/// <summary> | ||
/// Frame data for the controller. | ||
/// </summary> | ||
public List<byte[]> FrameData { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
using System.IO; | ||
|
||
namespace VixenPlayer.FSeqReader | ||
{ | ||
/// <summary> | ||
/// Reads an fseq file. | ||
/// </summary> | ||
public interface IFSeqReader | ||
{ | ||
/// <summary> | ||
/// Reads a Vixen Player fseq file. | ||
/// </summary> | ||
/// <param name="reader">Binary file reader</param> | ||
/// <param name="onlyReadHeader">Flag to only read the header information</param> | ||
/// <param name="skipReadingData">Flag to skip reading the frame data</param> | ||
void ReadFileHeader(BinaryReader reader, bool onlyReadHeader = false, bool skipReadingData = false); | ||
|
||
/// <summary> | ||
/// File identifier (usually 'PSEQ'). | ||
/// </summary> | ||
string FileIdentifier { get; } | ||
|
||
/// <summary> | ||
/// Version of the fseq file. | ||
/// </summary> | ||
string Version { get; } | ||
|
||
/// <summary> | ||
/// Number of channels per frame of data. | ||
/// </summary> | ||
UInt32 ChannelsPerFrame { get; } | ||
|
||
/// <summary> | ||
/// Step time or refresh rate in milliseconds. | ||
/// </summary> | ||
int StepTime { get; } | ||
|
||
/// <summary> | ||
/// True when compression is enabled. | ||
/// </summary> | ||
bool CompressionEnabled { get; } | ||
|
||
/// <summary> | ||
/// Number of data frames in the file. | ||
/// </summary> | ||
UInt32 NumberOfFrames { get; } | ||
|
||
/// <summary> | ||
/// Frame data contained in the file. | ||
/// </summary> | ||
List<Byte[]> FrameData { get; } | ||
|
||
/// <summary> | ||
/// Sequence audio file name. | ||
/// </summary> | ||
string SequenceAudioFileName { get; set; } | ||
|
||
// NOTE: The following properties are from the Vixen Player extended data variable header. | ||
|
||
/// <summary> | ||
/// Version of the Vixen Player extended data variable length header. | ||
/// </summary> | ||
string VixenPlayerHeaderVersion { get; } | ||
|
||
/// <summary> | ||
/// Controller frame data contained in the file. | ||
/// </summary> | ||
List<IControllerInfo> ControllerInfo { get; } | ||
|
||
/// <summary> | ||
/// Time stamp of the sequence used to make the file. | ||
/// </summary> | ||
DateTime SequenceTimeStamp { get; set; } | ||
} | ||
} |
Oops, something went wrong.