Skip to content

Commit

Permalink
[CoreMedia] Add support for xcode13 (#12770)
Browse files Browse the repository at this point in the history
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
  • Loading branch information
mandel-macaque and rolfbjarne authored Sep 24, 2021
1 parent 9a299ae commit ad673ae
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 156 deletions.
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.

3 comments on commit ad673ae

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on Build (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent
[CoreMedia] Add support for xcode13 (#12770)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Status for 'xamarin-macios - sample testing (build)': failure.

  • ❌ Debug_iPhone_AF: Failed
  • ❌ Debug_iPhone_GR: Failed
  • ❌ Debug_iPhone_SZ: Failed
  • ❌ Debug_iPhoneSimulator: Failed
  • ❌ Release_iPhone_AF: Failed
  • ❌ Release_iPhone_GR: Failed
  • ❌ Release_iPhone_SZ: Failed
  • ❌ Release_iPhoneSimulator: Failed
  • ❌ Debug_Mac: Failed
  • ❌ Release_Mac: Failed
  • ❌ PublishPerformanceData: Failed

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Tests were not ran (Build). ⚠️

Results were skipped for this run Azure Devops.

Pipeline on Agent
[CoreMedia] Add support for xcode13 (#12770)

Co-authored-by: Rolf Bjarne Kvinge rolf@xamarin.com

Please sign in to comment.