diff --git a/Directory.Build.props b/Directory.Build.props index dfd9a15..b13586b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ $(AssemblyName) - 6.0.0 + 6.0.0.2 Ruslan Balanukhin Rationale One FFmpeg.AutoGen diff --git a/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs b/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs index 31cd022..6cb4444 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/Arrays.g.cs @@ -442,6 +442,28 @@ public void UpdateFrom(ulong[] array) public static implicit operator ulong[](ulong8 @struct) => @struct.ToArray(); } +public unsafe struct int9 : IFixedArray +{ + 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 { public static readonly int ArrayLength = 15; diff --git a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs index 99fa238..5f35fd8 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/ffmpeg.functions.facade.g.cs @@ -646,6 +646,22 @@ public static unsafe partial class ffmpeg /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags); + /// Flip the input matrix horizontally and/or vertically. + /// a transformation matrix + /// whether the matrix should be flipped horizontally + /// whether the matrix should be flipped vertically + public static void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip) => vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip); + + /// Extract the rotation component of the transformation matrix. + /// the transformation matrix + /// 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. + public static double av_display_rotation_get(in int9 @matrix) => vectors.av_display_rotation_get(@matrix); + + /// Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees). + /// a transformation matrix (will be fully overwritten by this function) + /// rotation angle in degrees. + public static void av_display_rotation_set(ref int9 @matrix, double @angle) => vectors.av_display_rotation_set(ref @matrix, @angle); + /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. /// The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. public static int av_disposition_from_string(string @disp) => vectors.av_disposition_from_string(@disp); diff --git a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs index 2dd5ff4..b974e83 100644 --- a/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs +++ b/FFmpeg.AutoGen.Abstractions/generated/vectors.g.cs @@ -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 diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs index b34f9a4..c14bbc3 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLinked/generated/DynamicallyLinkedBindings.g.cs @@ -901,6 +901,25 @@ public static extern int av_dict_set_int(AVDictionary** @pm, #endif string @key, long @value, int @flags); + /// Flip the input matrix horizontally and/or vertically. + /// a transformation matrix + /// whether the matrix should be flipped horizontally + /// whether the matrix should be flipped vertically + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] + public static extern void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip); + + /// Extract the rotation component of the transformation matrix. + /// the transformation matrix + /// 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. + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] + public static extern double av_display_rotation_get(in int9 @matrix); + + /// Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees). + /// a transformation matrix (will be fully overwritten by this function) + /// rotation angle in degrees. + [DllImport("avutil-58", CallingConvention = CallingConvention.Cdecl)] + public static extern void av_display_rotation_set(ref int9 @matrix, double @angle); + /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. /// The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. [DllImport("avformat-60", CallingConvention = CallingConvention.Cdecl)] @@ -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; diff --git a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs index 35f3054..fb4eb21 100644 --- a/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.DynamicallyLoaded/generated/DynamicallyLoadedBindings.g.cs @@ -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("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("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("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("avformat", "av_disposition_from_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; diff --git a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs index 11e5ec4..9ce420f 100644 --- a/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs +++ b/FFmpeg.AutoGen.Bindings.StaticallyLinked/generated/StaticallyLinkedBindings.g.cs @@ -901,6 +901,25 @@ public static extern int av_dict_set_int(AVDictionary** @pm, #endif string @key, long @value, int @flags); + /// Flip the input matrix horizontally and/or vertically. + /// a transformation matrix + /// whether the matrix should be flipped horizontally + /// whether the matrix should be flipped vertically + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern void av_display_matrix_flip(ref int9 @matrix, int @hflip, int @vflip); + + /// Extract the rotation component of the transformation matrix. + /// the transformation matrix + /// 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. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern double av_display_rotation_get(in int9 @matrix); + + /// Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees). + /// a transformation matrix (will be fully overwritten by this function) + /// rotation angle in degrees. + [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] + public static extern void av_display_rotation_set(ref int9 @matrix, double @angle); + /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. /// The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] @@ -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; diff --git a/FFmpeg.AutoGen/generated/Arrays.g.cs b/FFmpeg.AutoGen/generated/Arrays.g.cs index edc086d..39e1f5a 100644 --- a/FFmpeg.AutoGen/generated/Arrays.g.cs +++ b/FFmpeg.AutoGen/generated/Arrays.g.cs @@ -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 +{ + 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 { public static readonly int Size = 15; diff --git a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs index 75f7cb2..47075dd 100644 --- a/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs +++ b/FFmpeg.AutoGen/generated/DynamicallyLoadedBindings.g.cs @@ -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("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("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("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("avformat", "av_disposition_from_string", ThrowErrorIfFunctionNotFound) ?? delegate { throw new NotSupportedException(); }; diff --git a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs index 4cb1557..ca3d11f 100644 --- a/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs +++ b/FFmpeg.AutoGen/generated/ffmpeg.functions.facade.g.cs @@ -646,6 +646,22 @@ public static unsafe partial class ffmpeg /// Convenience wrapper for av_dict_set() that converts the value to a string and stores it. public static int av_dict_set_int(AVDictionary** @pm, string @key, long @value, int @flags) => vectors.av_dict_set_int(@pm, @key, @value, @flags); + /// Flip the input matrix horizontally and/or vertically. + /// a transformation matrix + /// whether the matrix should be flipped horizontally + /// whether the matrix should be flipped vertically + public static void av_display_matrix_flip(ref int_array9 @matrix, int @hflip, int @vflip) => vectors.av_display_matrix_flip(ref @matrix, @hflip, @vflip); + + /// Extract the rotation component of the transformation matrix. + /// the transformation matrix + /// 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. + public static double av_display_rotation_get(in int_array9 @matrix) => vectors.av_display_rotation_get(@matrix); + + /// Initialize a transformation matrix describing a pure clockwise rotation by the specified angle (in degrees). + /// a transformation matrix (will be fully overwritten by this function) + /// rotation angle in degrees. + public static void av_display_rotation_set(ref int_array9 @matrix, double @angle) => vectors.av_display_rotation_set(ref @matrix, @angle); + /// Returns The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. /// The AV_DISPOSITION_* flag corresponding to disp or a negative error code if disp does not correspond to a known stream disposition. public static int av_disposition_from_string(string @disp) => vectors.av_disposition_from_string(@disp); diff --git a/FFmpeg.AutoGen/generated/vectors.g.cs b/FFmpeg.AutoGen/generated/vectors.g.cs index 226fcf5..d586578 100644 --- a/FFmpeg.AutoGen/generated/vectors.g.cs +++ b/FFmpeg.AutoGen/generated/vectors.g.cs @@ -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