Skip to content

Commit

Permalink
Update to 4.0. Closes Ruslan-B#87.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan-B committed Apr 30, 2018
1 parent 150c6f5 commit 8e83e15
Show file tree
Hide file tree
Showing 59 changed files with 2,937 additions and 3,708 deletions.
2 changes: 1 addition & 1 deletion FFmpeg.AutoGen/FFmpeg.AutoGen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<PackageId>FFmpeg.AutoGen</PackageId>
<Version>3.4.0.6</Version>
<Version>4.0.0.0</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Ruslan Balanukhin</Authors>
<Company>Rational Core</Company>
Expand Down
21 changes: 0 additions & 21 deletions FFmpeg.AutoGen/FFmpeg.arrays.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,27 +341,6 @@ public void UpdateFrom(long[] array)
public static implicit operator long[](long_array17 @struct) => @struct.ToArray();
}

public unsafe struct byte_array32
{
public static readonly int Size = 32;
fixed byte _[32];

public byte this[uint i]
{
get { if (i >= Size) throw new ArgumentOutOfRangeException(); fixed (byte_array32* p = &this) { return p->_[i]; } }
set { if (i >= Size) throw new ArgumentOutOfRangeException(); fixed (byte_array32* p = &this) { p->_[i] = value; } }
}
public byte[] ToArray()
{
fixed (byte_array32* p = &this) { var a = new byte[Size]; for (uint i = 0; i < Size; i++) a[i] = p->_[i]; return a; }
}
public void UpdateFrom(byte[] array)
{
fixed (byte_array32* p = &this) { uint i = 0; foreach(var value in array) { p->_[i++] = value; if (i >= Size) return; } }
}
public static implicit operator byte[](byte_array32 @struct) => @struct.ToArray();
}

public unsafe struct double_array399
{
public static readonly int Size = 399;
Expand Down
16 changes: 16 additions & 0 deletions FFmpeg.AutoGen/FFmpeg.delegates.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ public unsafe struct AVHWAccel_start_frame_func
public static implicit operator AVHWAccel_start_frame_func(AVHWAccel_start_frame func) => new AVHWAccel_start_frame_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVHWAccel_decode_params (AVCodecContext* @avctx, int @type, byte* @buf, uint @buf_size);
public unsafe struct AVHWAccel_decode_params_func
{
public IntPtr Pointer;
public static implicit operator AVHWAccel_decode_params_func(AVHWAccel_decode_params func) => new AVHWAccel_decode_params_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVHWAccel_decode_slice (AVCodecContext* @avctx, byte* @buf, uint @buf_size);
public unsafe struct AVHWAccel_decode_slice_func
Expand Down Expand Up @@ -291,6 +299,14 @@ public unsafe struct AVHWAccel_uninit_func
public static implicit operator AVHWAccel_uninit_func(AVHWAccel_uninit func) => new AVHWAccel_uninit_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVHWAccel_frame_params (AVCodecContext* @avctx, AVBufferRef* @hw_frames_ctx);
public unsafe struct AVHWAccel_frame_params_func
{
public IntPtr Pointer;
public static implicit operator AVHWAccel_frame_params_func(AVHWAccel_frame_params func) => new AVHWAccel_frame_params_func { Pointer = func == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(func) };
}

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public unsafe delegate int AVCodecContext_execute (AVCodecContext* @c, func_func @func, void* @arg2, int* @ret, int @count, int @size);
public unsafe struct AVCodecContext_execute_func
Expand Down
Loading

0 comments on commit 8e83e15

Please sign in to comment.