Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CoreMedia] Add support for xcode13 #12770

Merged
merged 13 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from 11 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
256 changes: 232 additions & 24 deletions src/CoreMedia/CMSync.cs

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions tests/monotouch-test/CoreMedia/CMTimebaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,53 @@ void AssertNullOrValidHandle (INativeObject o, string description)
return;
Assert.AreNotEqual (IntPtr.Zero, o.Handle, "AssertNullOrValidHandle - " + description);
}

[Test]
public void CMClockConstructor ()
{
TestRuntime.AssertXcodeVersion (13,0);
Assert.Throws<ArgumentNullException>(() => {
var timebase = new CMTimebase (null, (CMClock) null);
}, "Null clock");

// if it throws we fail the test
using var timebase = new CMTimebase (null, CMClock.HostTimeClock);
Assert.NotNull (timebase, "Not null");
}

[Test]
public void SourceClockProperty ()
{
TestRuntime.AssertXcodeVersion (13,0);
using var timebase = new CMTimebase (null, CMClock.HostTimeClock);
Assert.NotNull (timebase.SourceClock, "not null source clock");
// set and if it throws we fail the test
timebase.SourceClock = CMClock.HostTimeClock;
}

[Test]
public void CMTimebaseConstructor ()
{
TestRuntime.AssertXcodeVersion (13,0);
Assert.Throws<ArgumentNullException>(() => {
var timebase = new CMTimebase (null, (CMTimebase) null);
}, "Null clock");

// if it throws we fail the test
using var mainTimebase = new CMTimebase (CMClock.HostTimeClock);
using var timebase = new CMTimebase (null, mainTimebase);
}

[Test]
public void SourceTimebaseProperty ()
{
TestRuntime.AssertXcodeVersion (13,0);
using var mainTimebase = new CMTimebase (CMClock.HostTimeClock);
using var timebase = new CMTimebase (null, mainTimebase);
Assert.NotNull (timebase.SourceTimebase, "Not null timebase");
// if we throw we fail test test
using var secondTimebase = new CMTimebase (CMClock.HostTimeClock);
timebase.SourceTimebase = secondTimebase;
}
}
}
20 changes: 0 additions & 20 deletions tests/xtro-sharpie/MacCatalyst-CoreMedia.todo

This file was deleted.

18 changes: 18 additions & 0 deletions tests/xtro-sharpie/common-CoreMedia.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
!missing-field! kCMFormatDescriptionExtension_AuxiliaryTypeInfo not bound
!missing-field! kCMFormatDescriptionExtension_ContainsAlphaChannel not bound
!missing-field! kCMFormatDescriptionExtension_ProtectedContentOriginalFormat not bound
!missing-field! kCMFormatDescriptionExtension_AmbientViewingEnvironment not bound
!missing-field! kCMFormatDescriptionExtension_BitsPerComponent not bound
!missing-field! kCMFormatDescriptionExtension_HorizontalFieldOfView not bound
!missing-field! kCMFormatDescriptionExtensionKey_MetadataKeyTable not bound
!missing-field! kCMFormatDescriptionFieldDetail_SpatialFirstLineEarly not bound
!missing-field! kCMFormatDescriptionFieldDetail_SpatialFirstLineLate not bound
Expand Down Expand Up @@ -378,6 +381,7 @@
!missing-pinvoke! CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer is not bound
!missing-pinvoke! CMVideoFormatDescriptionCreateFromBigEndianImageDescriptionBlockBuffer is not bound
!missing-pinvoke! CMVideoFormatDescriptionCreateFromBigEndianImageDescriptionData is not bound
!missing-field! kCMSampleAttachmentKey_CryptorSubsampleAuxiliaryData not bound

## block based version of CMBufferQueueCreate (which use callbacks and is already bound)
!missing-pinvoke! CMBufferQueueCreateWithHandlers is not bound
Expand All @@ -387,3 +391,17 @@

## block based version of CMSampleBufferCreateForImageBuffer (which use callbacks and is already bound)
!missing-pinvoke! CMSampleBufferCreateForImageBufferWithMakeDataReadyHandler is not bound

# they are added because we need to be back compatible yet we do have code to choose the correct one
!unknown-pinvoke! CMTimebaseCopyMaster bound
!unknown-pinvoke! CMTimebaseCopyMasterClock bound
!unknown-pinvoke! CMTimebaseCopyMasterTimebase bound
!unknown-pinvoke! CMTimebaseCopyUltimateMasterClock bound
!unknown-pinvoke! CMTimebaseCreateWithMasterClock bound
!unknown-pinvoke! CMTimebaseCreateWithMasterTimebase bound
!unknown-pinvoke! CMTimebaseSetMasterClock bound
!unknown-pinvoke! CMTimebaseSetMasterTimebase bound

# it can return a Clock or a Timebase but the API already has a way to access the clock source (CMTimebaseCopySourceClock)
# and the Timebase (CMTimebaseCopySourceTimebase) so there is no reason atm to add this method
!missing-pinvoke! CMTimebaseCopySource is not bound
28 changes: 0 additions & 28 deletions tests/xtro-sharpie/iOS-CoreMedia.todo

This file was deleted.

28 changes: 0 additions & 28 deletions tests/xtro-sharpie/macOS-CoreMedia.todo

This file was deleted.

28 changes: 0 additions & 28 deletions tests/xtro-sharpie/tvOS-CoreMedia.todo

This file was deleted.

28 changes: 0 additions & 28 deletions tests/xtro-sharpie/watchOS-CoreMedia.todo

This file was deleted.