Skip to content

Commit

Permalink
Bye bye, ErrorHandling.cs
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
nixxquality committed May 2, 2014
1 parent 29145ff commit 123f593
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 477 deletions.
293 changes: 0 additions & 293 deletions FFMSsharp/ErrorHandling.cs

This file was deleted.

42 changes: 42 additions & 0 deletions FFMSsharp/FFMS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ namespace FFMSsharp
{
#region Interop

[StructLayout(LayoutKind.Sequential)]
unsafe struct FFMS_ErrorInfo
{
internal FFMS_Errors ErrorType;
internal FFMS_Errors SubType;
public int BufferSize;
[MarshalAs(UnmanagedType.LPStr)]
public string Buffer;
}

static partial class NativeMethods
{
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
Expand Down Expand Up @@ -38,6 +48,38 @@ static partial class NativeMethods

#region Constants

enum FFMS_Errors
{
FFMS_ERROR_SUCCESS = 0,

// Main types - where the error occurred
FFMS_ERROR_INDEX = 1,
FFMS_ERROR_INDEXING,
FFMS_ERROR_POSTPROCESSING,
FFMS_ERROR_SCALING,
FFMS_ERROR_DECODING,
FFMS_ERROR_SEEKING,
FFMS_ERROR_PARSER,
FFMS_ERROR_TRACK,
FFMS_ERROR_WAVE_WRITER,
FFMS_ERROR_CANCELLED,
FFMS_ERROR_RESAMPLING,

// Subtypes - what caused the error
FFMS_ERROR_UNKNOWN = 20,
FFMS_ERROR_UNSUPPORTED,
FFMS_ERROR_FILE_READ,
FFMS_ERROR_FILE_WRITE,
FFMS_ERROR_NO_FILE,
FFMS_ERROR_VERSION,
FFMS_ERROR_ALLOCATION_FAILED,
FFMS_ERROR_INVALID_ARGUMENT,
FFMS_ERROR_CODEC,
FFMS_ERROR_NOT_AVAILABLE,
FFMS_ERROR_FILE_MISMATCH,
FFMS_ERROR_USER
}

/// <summary>
/// Log level for libavformat
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion FFMSsharp/FFMSsharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AudioSource.cs" />
<Compile Include="ErrorHandling.cs" />
<Compile Include="Frame.cs" />
<Compile Include="FrameInfo.cs" />
<Compile Include="GlobalSuppressions.cs" />
Expand Down
Loading

0 comments on commit 123f593

Please sign in to comment.