Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

14 changes: 0 additions & 14 deletions docs/api/VideoToolbox/VTCompressionSession.xml

This file was deleted.

14 changes: 0 additions & 14 deletions docs/api/VideoToolbox/VTDecompressionSession.xml

This file was deleted.

38 changes: 38 additions & 0 deletions src/CoreMedia/CMFormatDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,44 @@ public bool VideoMatchesImageBuffer (CVImageBuffer imageBuffer)

return arr;
}

[SupportedOSPlatform ("ios17.0")]
[SupportedOSPlatform ("macos14.0")]
[SupportedOSPlatform ("tvos17.0")]
[SupportedOSPlatform ("maccatalyst17.0")]
[DllImport (Constants.CoreMediaLibrary)]
unsafe static extern /* OSStatus */ CMFormatDescriptionError CMVideoFormatDescriptionCopyTagCollectionArray (
IntPtr /* CMVideoFormatDescriptionRef CM_NONNULL */ formatDescription,
IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CFArrayRef CM_NULLABLE * */ tagCollectionsOut);

/// <summary>Get any multi-image properties as an array of <see cref="CMTagCollection" /> values.</summary>
/// <param name="tagCollections">Upon output, and if successful, the format description's array of <see cref="CMTagCollection" /> values.</param>
/// <returns><see cref="CMFormatDescriptionError.None" /> if succcessful, or an error code otherwise.</returns>
public CMFormatDescriptionError GetTagCollections (out CMTagCollection []? tagCollections)
{
IntPtr array;
CMFormatDescriptionError rv;

tagCollections = null;

unsafe {
rv = CMVideoFormatDescriptionCopyTagCollectionArray (GetCheckedHandle (), &array);
}

if (rv == CMFormatDescriptionError.None)
tagCollections = CFArray.ArrayFromHandleFunc<CMTagCollection> (array, (h) => new CMTagCollection (h, false), releaseHandle: true)!;

return rv;
}

/// <summary>Get any multi-image properties as an array of <see cref="CMTagCollection" /> values.</summary>
public CMTagCollection []? TagCollections {
get {
GetTagCollections (out var tagCollections);
return tagCollections;
}
}

#endif
}
}
6 changes: 6 additions & 0 deletions src/CoreMedia/CoreMedia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,11 @@ public CMVideoDimensions (int width, int height)
Width = width;
Height = height;
}

/// <inheritdoc />
public override string ToString ()
{
return $"[{Width}, {Height}]";
}
}
}
53 changes: 22 additions & 31 deletions src/Foundation/NSIndexSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//

#if MONOMAC

using System;
using System.Reflection;
using System.Collections;
Expand All @@ -35,10 +33,6 @@
namespace Foundation {

public partial class NSIndexSet : IEnumerable, IEnumerable<nuint> {

/// <summary>To be added.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
IEnumerator IEnumerable.GetEnumerator ()
{
if (this.Count == 0)
Expand All @@ -63,9 +57,8 @@ public IEnumerator<nuint> GetEnumerator ()
}
}

/// <summary>To be added.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
/// <summary>Get all the indices in this index set as an array.</summary>
/// <returns>An array of all the indices in this index set.</returns>
public nuint [] ToArray ()
{
nuint [] indexes = new nuint [Count];
Expand All @@ -81,7 +74,7 @@ public nuint [] ToArray ()
return indexes;
}

internal T [] ToInt64EnumArray<T> () where T: System.Enum
internal T [] ToInt64EnumArray<T> () where T : System.Enum
{
var array = ToArray ();
var rv = new T [array.Length];
Expand All @@ -90,7 +83,7 @@ internal T [] ToInt64EnumArray<T> () where T: System.Enum
return rv;
}

internal HashSet<T> ToInt64EnumHashSet<T> () where T: System.Enum
internal HashSet<T> ToInt64EnumHashSet<T> () where T : System.Enum
{
var array = ToArray ();
var rv = new HashSet<T> ();
Expand All @@ -99,10 +92,9 @@ internal HashSet<T> ToInt64EnumHashSet<T> () where T: System.Enum
return rv;
}

/// <param name="items">To be added.</param>
/// <summary>To be added.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NSIndexSet" /> instance from an array of indices.</summary>
/// <param name="items">The indices to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified indices.</returns>
public static NSIndexSet FromArray (nuint [] items)
{
if (items is null)
Expand All @@ -114,10 +106,9 @@ public static NSIndexSet FromArray (nuint [] items)
return indexSet;
}

/// <param name="items">To be added.</param>
/// <summary>To be added.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NSIndexSet" /> instance from an array of indices.</summary>
/// <param name="items">The indices to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified indices.</returns>
public static NSIndexSet FromArray (uint [] items)
{
if (items is null)
Expand All @@ -129,10 +120,9 @@ public static NSIndexSet FromArray (uint [] items)
return indexSet;
}

/// <param name="items">To be added.</param>
/// <summary>To be added.</summary>
/// <returns>To be added.</returns>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NSIndexSet" /> instance from an array of indices.</summary>
/// <param name="items">The indices to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified indices.</returns>
public static NSIndexSet FromArray (int [] items)
{
if (items is null)
Expand All @@ -147,23 +137,26 @@ public static NSIndexSet FromArray (int [] items)
return indexSet;
}

/// <param name="value">To be added.</param>
/// <summary>To be added.</summary>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NSIndexSet" /> instance with the specified index.</summary>
/// <param name="value">The index to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified index.</returns>
public NSIndexSet (uint value) : this ((nuint) value)
{
}

/// <summary>Create a new <see cref="NSIndexSet" /> instance with the specified index.</summary>
/// <param name="value">The index to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified index.</returns>
public NSIndexSet (nint value) : this ((nuint) value)
{
if (value < 0)
throw new ArgumentException ("value must be positive");
// init done by the base ctor
}

/// <param name="value">To be added.</param>
/// <summary>To be added.</summary>
/// <remarks>To be added.</remarks>
/// <summary>Create a new <see cref="NSIndexSet" /> instance with the specified index.</summary>
/// <param name="value">The index to add to the new <see cref="NSIndexSet" />.</param>
/// <returns>A new <see cref="NSIndexSet" /> with the specified index.</returns>
public NSIndexSet (int value) : this ((nuint) (uint) value)
{
if (value < 0)
Expand All @@ -172,5 +165,3 @@ public NSIndexSet (int value) : this ((nuint) (uint) value)
}
}
}

#endif
Loading