Skip to content

Commit

Permalink
6.0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Balanukhin committed May 5, 2023
1 parent 43c8c98 commit 6b61da0
Show file tree
Hide file tree
Showing 11 changed files with 181 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<PackageId>$(AssemblyName)</PackageId>
<Version>6.0.0</Version>
<Version>6.0.0.2</Version>
<Authors>Ruslan Balanukhin</Authors>
<Company>Rationale One</Company>
<Product>FFmpeg.AutoGen</Product>
Expand Down
22 changes: 22 additions & 0 deletions FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,28 @@ public void UpdateFrom(ulong[] array)
public static implicit operator ulong[](ulong8 @struct) => @struct.ToArray();
}

public unsafe struct int9 : IFixedArray<int>
{
public static readonly int ArrayLength = 9;
public int Length => 9;
fixed int _[9];

public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[9]; for (uint i = 0; i < 9; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 9) return; }
}
public static implicit operator int[](int9 @struct) => @struct.ToArray();
}

public unsafe struct AVHDRPlusPercentile15 : IFixedArray<AVHDRPlusPercentile>
{
public static readonly int ArrayLength = 15;
Expand Down
16 changes: 16 additions & 0 deletions FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,22 @@ public static unsafe partial class ffmpeg
/// <summary>Convenience wrapper for av_dict_set() that converts the value to a string and stores it.</summary>
public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags);

/// <summary>Flip the input matrix horizontally and/or vertically.</summary>
/// <param name="matrix">a transformation matrix</param>
/// <param name="hflip">whether the matrix should be flipped horizontally</param>
/// <param name="vflip">whether the matrix should be flipped vertically</param>
public static void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip) => vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip);

/// <summary>Extract the rotation component of the transformation matrix.</summary>
/// <param name="matrix">the transformation matrix</param>
/// <returns>the angle (in degrees) by which the transformation rotates the frame counterclockwise. The angle will be in range [-180.0, 180.0], or NaN if the matrix is singular.</returns>
public static double av_display_rotation_get(in int9 @matrix) => vectors.av_display_rotation_get(@matrix);

/// <summary>Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees).</summary>
/// <param name="matrix">a transformation matrix (will be fully overwritten by this function)</param>
/// <param name="angle">rotation angle in degrees.</param>
public static void av_display_rotation_set(ref int9 @matrix, double @angle) => vectors.av_display_rotation_set(ref @matrix, @angle);

/// <summary>Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</summary>
/// <returns>The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</returns>
public static int av_disposition_from_string(string @disp) => vectors.av_disposition_from_string(@disp);
Expand Down
12 changes: 12 additions & 0 deletions FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,18 @@ public delegate int av_dict_set_int_delegate(AVDictionary** @pm,
string @key, long @value, int @flags);
public static av_dict_set_int_delegate av_dict_set_int;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void av_display_matrix_flip_delegate(ref int9 @matrix, int @hflip, int @vflip);
public static av_display_matrix_flip_delegate av_display_matrix_flip;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate double av_display_rotation_get_delegate(in int9 @matrix);
public static av_display_rotation_get_delegate av_display_rotation_get;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void av_display_rotation_set_delegate(ref int9 @matrix, double @angle);
public static av_display_rotation_set_delegate av_display_rotation_set;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int av_disposition_from_string_delegate(
#if NETSTANDARD2_1_OR_GREATER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,25 @@ public static extern int av_dict_set_int(AVDictionary** @pm,
#endif
string @key, long @value, int @flags);

/// <summary>Flip the input matrix horizontally and/or vertically.</summary>
/// <param name="matrix">a transformation matrix</param>
/// <param name="hflip">whether the matrix should be flipped horizontally</param>
/// <param name="vflip">whether the matrix should be flipped vertically</param>
[DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)]
public static extern void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip);

/// <summary>Extract the rotation component of the transformation matrix.</summary>
/// <param name="matrix">the transformation matrix</param>
/// <returns>the angle (in degrees) by which the transformation rotates the frame counterclockwise. The angle will be in range [-180.0, 180.0], or NaN if the matrix is singular.</returns>
[DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)]
public static extern double av_display_rotation_get(in int9 @matrix);

/// <summary>Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees).</summary>
/// <param name="matrix">a transformation matrix (will be fully overwritten by this function)</param>
/// <param name="angle">rotation angle in degrees.</param>
[DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)]
public static extern void av_display_rotation_set(ref int9 @matrix, double @angle);

/// <summary>Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</summary>
/// <returns>The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</returns>
[DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -5284,6 +5303,9 @@ public unsafe static void Initialize()
vectors.av_dict_parse_string = av_dict_parse_string;
vectors.av_dict_set = av_dict_set;
vectors.av_dict_set_int = av_dict_set_int;
vectors.av_display_matrix_flip = av_display_matrix_flip;
vectors.av_display_rotation_get = av_display_rotation_get;
vectors.av_display_rotation_set = av_display_rotation_set;
vectors.av_disposition_from_string = av_disposition_from_string;
vectors.av_disposition_to_string = av_disposition_to_string;
vectors.av_div_q = av_div_q;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,24 @@ public unsafe static void Initialize()
return vectors.av_dict_set_int(@pm, @key, @value, @flags);
};

vectors.av_display_matrix_flip = (ref int9 @matrix, int @hflip, int @vflip) =>
{
vectors.av_display_matrix_flip = FunctionResolver.GetFunctionDelegate<vectors.av_display_matrix_flip_delegate>("avutil", "av_display_matrix_flip", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip);
};

vectors.av_display_rotation_get = (in int9 @matrix) =>
{
vectors.av_display_rotation_get = FunctionResolver.GetFunctionDelegate<vectors.av_display_rotation_get_delegate>("avutil", "av_display_rotation_get", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
return vectors.av_display_rotation_get(@matrix);
};

vectors.av_display_rotation_set = (ref int9 @matrix, double @angle) =>
{
vectors.av_display_rotation_set = FunctionResolver.GetFunctionDelegate<vectors.av_display_rotation_set_delegate>("avutil", "av_display_rotation_set", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
vectors.av_display_rotation_set(ref @matrix, @angle);
};

vectors.av_disposition_from_string = (string @disp) =>
{
vectors.av_disposition_from_string = FunctionResolver.GetFunctionDelegate<vectors.av_disposition_from_string_delegate>("avformat", "av_disposition_from_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,25 @@ public static extern int av_dict_set_int(AVDictionary** @pm,
#endif
string @key, long @value, int @flags);

/// <summary>Flip the input matrix horizontally and/or vertically.</summary>
/// <param name="matrix">a transformation matrix</param>
/// <param name="hflip">whether the matrix should be flipped horizontally</param>
/// <param name="vflip">whether the matrix should be flipped vertically</param>
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
public static extern void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip);

/// <summary>Extract the rotation component of the transformation matrix.</summary>
/// <param name="matrix">the transformation matrix</param>
/// <returns>the angle (in degrees) by which the transformation rotates the frame counterclockwise. The angle will be in range [-180.0, 180.0], or NaN if the matrix is singular.</returns>
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
public static extern double av_display_rotation_get(in int9 @matrix);

/// <summary>Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees).</summary>
/// <param name="matrix">a transformation matrix (will be fully overwritten by this function)</param>
/// <param name="angle">rotation angle in degrees.</param>
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
public static extern void av_display_rotation_set(ref int9 @matrix, double @angle);

/// <summary>Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</summary>
/// <returns>The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</returns>
[DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -5284,6 +5303,9 @@ public unsafe static void Initialize()
vectors.av_dict_parse_string = av_dict_parse_string;
vectors.av_dict_set = av_dict_set;
vectors.av_dict_set_int = av_dict_set_int;
vectors.av_display_matrix_flip = av_display_matrix_flip;
vectors.av_display_rotation_get = av_display_rotation_get;
vectors.av_display_rotation_set = av_display_rotation_set;
vectors.av_disposition_from_string = av_disposition_from_string;
vectors.av_disposition_to_string = av_disposition_to_string;
vectors.av_div_q = av_div_q;
Expand Down
22 changes: 22 additions & 0 deletions FFmpeg.AutoGen/generated/Arrays.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,28 @@ public void UpdateFrom(ulong[] array)
public static implicit operator ulong[](ulong_array8 @struct) => @struct.ToArray();
}

public unsafe struct int_array9 : IFixedArray<int>
{
public static readonly int Size = 9;
public int Length => 9;
fixed int _[9];

public int this[uint i]
{
get => _[i];
set => _[i] = value;
}
public int[] ToArray()
{
var a = new int[9]; for (uint i = 0; i < 9; i++) a[i] = _[i]; return a;
}
public void UpdateFrom(int[] array)
{
uint i = 0; foreach(var value in array) { _[i++] = value; if (i >= 9) return; }
}
public static implicit operator int[](int_array9 @struct) => @struct.ToArray();
}

public unsafe struct AVHDRPlusPercentile_array15 : IFixedArray<AVHDRPlusPercentile>
{
public static readonly int Size = 15;
Expand Down
18 changes: 18 additions & 0 deletions FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,24 @@ public unsafe static void Initialize()
return vectors.av_dict_set_int(@pm, @key, @value, @flags);
};

vectors.av_display_matrix_flip = (ref int_array9 @matrix, int @hflip, int @vflip) =>
{
vectors.av_display_matrix_flip = FunctionResolver.GetFunctionDelegate<vectors.av_display_matrix_flip_delegate>("avutil", "av_display_matrix_flip", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip);
};

vectors.av_display_rotation_get = (in int_array9 @matrix) =>
{
vectors.av_display_rotation_get = FunctionResolver.GetFunctionDelegate<vectors.av_display_rotation_get_delegate>("avutil", "av_display_rotation_get", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
return vectors.av_display_rotation_get(@matrix);
};

vectors.av_display_rotation_set = (ref int_array9 @matrix, double @angle) =>
{
vectors.av_display_rotation_set = FunctionResolver.GetFunctionDelegate<vectors.av_display_rotation_set_delegate>("avutil", "av_display_rotation_set", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
vectors.av_display_rotation_set(ref @matrix, @angle);
};

vectors.av_disposition_from_string = (string @disp) =>
{
vectors.av_disposition_from_string = FunctionResolver.GetFunctionDelegate<vectors.av_disposition_from_string_delegate>("avformat", "av_disposition_from_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); };
Expand Down
16 changes: 16 additions & 0 deletions FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,22 @@ public static unsafe partial class ffmpeg
/// <summary>Convenience wrapper for av_dict_set() that converts the value to a string and stores it.</summary>
public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags);

/// <summary>Flip the input matrix horizontally and/or vertically.</summary>
/// <param name="matrix">a transformation matrix</param>
/// <param name="hflip">whether the matrix should be flipped horizontally</param>
/// <param name="vflip">whether the matrix should be flipped vertically</param>
public static void av_display_matrix_flip(ref int_array9 @matrix, int @hflip, int @vflip) => vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip);

/// <summary>Extract the rotation component of the transformation matrix.</summary>
/// <param name="matrix">the transformation matrix</param>
/// <returns>the angle (in degrees) by which the transformation rotates the frame counterclockwise. The angle will be in range [-180.0, 180.0], or NaN if the matrix is singular.</returns>
public static double av_display_rotation_get(in int_array9 @matrix) => vectors.av_display_rotation_get(@matrix);

/// <summary>Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees).</summary>
/// <param name="matrix">a transformation matrix (will be fully overwritten by this function)</param>
/// <param name="angle">rotation angle in degrees.</param>
public static void av_display_rotation_set(ref int_array9 @matrix, double @angle) => vectors.av_display_rotation_set(ref @matrix, @angle);

/// <summary>Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</summary>
/// <returns>The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition.</returns>
public static int av_disposition_from_string(string @disp) => vectors.av_disposition_from_string(@disp);
Expand Down
12 changes: 12 additions & 0 deletions FFmpeg.AutoGen/generated/vectors.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,18 @@ public delegate int av_dict_set_int_delegate(AVDictionary** @pm,
string @key, long @value, int @flags);
public static av_dict_set_int_delegate av_dict_set_int;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void av_display_matrix_flip_delegate(ref int_array9 @matrix, int @hflip, int @vflip);
public static av_display_matrix_flip_delegate av_display_matrix_flip;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate double av_display_rotation_get_delegate(in int_array9 @matrix);
public static av_display_rotation_get_delegate av_display_rotation_get;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void av_display_rotation_set_delegate(ref int_array9 @matrix, double @angle);
public static av_display_rotation_set_delegate av_display_rotation_set;

[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate int av_disposition_from_string_delegate(
#if NETSTANDARD2_1_OR_GREATER
Expand Down

0 comments on commit 6b61da0

Please sign in to comment.