Skip to content

Conversation

rolfbjarne
Copy link
Member

Any CMPixelFormat value is also a valid CMVideoCodecType value, so duplicate
the values in CMPixelFormat into CMVideoCodecType.

This helps discovery/intellisense.

Fixes #23217.

…Fixes #23217.

Any CMPixelFormat value is also a valid CMVideoCodecType value, so duplicate
the values in CMPixelFormat into CMVideoCodecType.

This helps discovery/intellisense.

Fixes #23217.
@rolfbjarne rolfbjarne requested a review from dalexsoto as a code owner July 4, 2025 15:23
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@jeremy-visionaid
Copy link
Contributor

jeremy-visionaid commented Jul 6, 2025

I'd expect the macios projection of CMVideoCodecType to include only those values from CMVideoCodecType. So, adding pixel formats to it looks incorrect to me if they don't match the upstream definitions.

The reason for the initial bug report is that I'd also expect there to be some projection of the values of MediaSubType so that it's possible to write code that's a closer match to the Apple API. e.g.

AVCaptureDeviceFormat desc = <something>;
if (desc.MediaSubType == MediaSubType.PixelFormat_32BGRA)
...

I think it's more difficult to find things in the dotnet API the further they are from the upstream definition. So, this PR is kind of the opposite of what I was intending to achieve in opening #23217.

As Rolf pointed out, all the constants from MediaSubType are actually available in other types (despite the difficultly in actually reasoning that that's the case). Just adding an extra convenience property would be more helpful IMHO:

 public CVPixelFormatType PixelFormatType { 
 	get { 
 		return MediaType == CMMediaType.Video ? (CVPixelFormatType) MediaSubType : 0; 
 	} 
 } 

However, the trouble is with it being a video mediatype is that you don't know whether it is compressed or not, so either the existing VideoCodecType property or PixelFormatType above might cast to an undefined enum value. (i.e. IMHO it would be better to just have the MediaSubType constants than any of the convenience properties).

Obsoleting CAC3 I think is a good change though, since I'd expect to find it from the usptream identifier iec60958AC3 rather than named from its FourCC value. 👍

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #ce6f6f0] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: ce6f6f0d8da099db6821ddb5799958ca73ab747c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #ce6f6f0] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: ce6f6f0d8da099db6821ddb5799958ca73ab747c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #ce6f6f0] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: ce6f6f0d8da099db6821ddb5799958ca73ab747c [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #ce6f6f0] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: ce6f6f0d8da099db6821ddb5799958ca73ab747c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne
Copy link
Member Author

I'd expect the macios projection of CMVideoCodecType to include only those values from CMVideoCodecType. So, adding pixel formats to it looks incorrect to me if they don't match the upstream definitions.

Unfortunately there are no good solutions here, because MediaSubType is a uint/fourcc, so there are 2^32-1 number of possible values.

I completely see the point that CMVideoCodecType should only contain entries from Apple's CMVideoCodecType enum.

On the other hand, it's can also be argued that the VideoFormatType should return an enum that contains all reasonably likely values when MediaType == CMMediaType.Video, and that enum would have to contain pixel format values. It's not even limited to CMPixelFormat, because Apple's headers say "In general, CoreVideo CVPixelFormatType constants may be used too."

The reason for the initial bug report is that I'd also expect there to be some projection of the values of MediaSubType so that it's possible to write code that's a closer match to the Apple API. e.g.

AVCaptureDeviceFormat desc = <something>;
if (desc.MediaSubType == MediaSubType.PixelFormat_32BGRA)
...

You can do this:

AVCaptureDeviceFormat desc = <something>;
if (desc.MediaSubType == (uint) MediaSubType.PixelFormat_32BGRA)
...

I think it's more difficult to find things in the dotnet API the further they are from the upstream definition. So, this PR is kind of the opposite of what I was intending to achieve in opening #23217.

Sadly, this isn't an API that maps nicely to C#.

Note that you can write code that's pretty close to Objective-C code by using MediaSubType (and casting the enum value to uint) as I mentioned just above.

As Rolf pointed out, all the constants from MediaSubType are actually available in other types (despite the difficultly in actually reasoning that that's the case). Just adding an extra convenience property would be more helpful IMHO:

 public CVPixelFormatType PixelFormatType { 
 	get { 
 		return MediaType == CMMediaType.Video ? (CVPixelFormatType) MediaSubType : 0; 
 	} 
 } 

However, the trouble is with it being a video mediatype is that you don't know whether it is compressed or not, so either the existing VideoCodecType property or PixelFormatType above might cast to an undefined enum value. (i.e. IMHO it would be better to just have the MediaSubType constants than any of the convenience properties).

There are also two pixel format enums: CMPixelFormat and CVPixelFormatType...

In any case, I'll updating this PR to:

  • Add a PixelFormatType as you suggested.
  • Remove the addition of the pixel format types into CMVideoCodecType.
  • Improve the documentation for all these properties.

@rolfbjarne rolfbjarne changed the title [CoreMedia] Copy enum values from CMPixelFormat into CMVideoCodecType. Fixes #23217. [CoreMedia] Improve CMFormatDescription.SubType properties. Fixes #23217. Oct 14, 2025
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #fb3c205] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: fb3c205357cab0d9ce3a2e266de041cc038b94b5 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #fb3c205] Build passed (Build packages) ✅

Pipeline on Agent
Hash: fb3c205357cab0d9ce3a2e266de041cc038b94b5 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 Failed to compare API and create generator diff 🔥

Error: 'make' failed for the hash e433a6a.

Pipeline on Agent
Hash: fb3c205357cab0d9ce3a2e266de041cc038b94b5 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #fb3c205] Build failed (Build macOS tests) 🔥

Build failed for the job 'Build macOS tests' (with job status 'Failed')

Pipeline on Agent
Hash: fb3c205357cab0d9ce3a2e266de041cc038b94b5 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🔥 [CI Build #fb3c205] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 99 tests failed, 14 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.
  • DotNet tests: Failed (Execution failed with exit code 1)

Html Report (VSDrops) Download

❌ generator tests

5 tests failed, 0 tests passed.
  • BGen tests: BuildFailure
  • Roslyn Generator tests: BuildFailure
  • Roslyn Analyzer tests: BuildFailure
  • Roslyn Transformer tests: BuildFailure
  • Roslyn Codefixers tests: BuildFailure

Html Report (VSDrops) Download

❌ interdependent-binding-projects tests

4 tests failed, 0 tests passed.
  • interdependent-binding-projects/macOS/Debug: BuildFailure
  • interdependent-binding-projects/Mac Catalyst/Debug: BuildFailure
  • interdependent-binding-projects/iOS - simulator/Debug: BuildFailure
  • interdependent-binding-projects/tvOS - simulator/Debug: BuildFailure

Html Report (VSDrops) Download

❌ introspection tests

4 tests failed, 0 tests passed.
  • introspection/macOS/Debug: BuildFailure
  • introspection/Mac Catalyst/Debug: BuildFailure
  • introspection/iOS - simulator/Debug: BuildFailure
  • introspection/tvOS - simulator/Debug: BuildFailure

Html Report (VSDrops) Download

❌ linker tests

44 tests failed, 0 tests passed.
  • dont link/macOS/Debug: BuildFailure
  • dont link/macOS/Release: BuildFailure
  • dont link/Mac Catalyst/Debug: BuildFailure
  • dont link/Mac Catalyst/Release: BuildFailure
  • dont link/iOS - simulator/Debug: BuildFailure
  • dont link/iOS - simulator/Release: BuildFailure
  • dont link/tvOS - simulator/Debug: BuildFailure
  • dont link/tvOS - simulator/Release: BuildFailure
  • link sdk/macOS/Debug: BuildFailure
  • link sdk/macOS/Release: BuildFailure
  • link sdk/Mac Catalyst/Debug: BuildFailure
  • link sdk/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link sdk/iOS - simulator/Debug: BuildFailure
  • link sdk/iOS - simulator/Release: BuildFailure
  • link sdk/tvOS - simulator/Debug: BuildFailure
  • link sdk/tvOS - simulator/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/macOS/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/macOS/Debug (bundle original resources): BuildFailure
  • link all/macOS/Release: BuildFailure
  • link all/Mac Catalyst/Debug: BuildFailure
  • link all/Mac Catalyst/Debug (bundle original resources): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • link all/Mac Catalyst/Release: BuildFailure
  • link all/iOS - simulator/Debug: BuildFailure
  • link all/iOS - simulator/Release: BuildFailure
  • link all/iOS - simulator/Debug (bundle original resources): BuildFailure
  • link all/tvOS - simulator/Debug: BuildFailure
  • link all/tvOS - simulator/Release: BuildFailure
  • link all/tvOS - simulator/Debug (bundle original resources): BuildFailure
  • trimmode copy/macOS/Debug: BuildFailure
  • trimmode copy/macOS/Release: BuildFailure
  • trimmode copy/Mac Catalyst/Debug: BuildFailure
  • trimmode copy/Mac Catalyst/Release: BuildFailure
  • trimmode copy/iOS - simulator/Debug: BuildFailure
  • trimmode copy/iOS - simulator/Release: BuildFailure
  • trimmode copy/tvOS - simulator/Debug: BuildFailure
  • trimmode copy/tvOS - simulator/Release: BuildFailure
  • trimmode link/macOS/Debug: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/macOS/Release: BuildFailure
  • trimmode link/Mac Catalyst/Debug: BuildFailure
  • trimmode link/Mac Catalyst/Release: BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • trimmode link/iOS - simulator/Debug: BuildFailure
  • trimmode link/iOS - simulator/Release: BuildFailure
  • trimmode link/tvOS - simulator/Debug: BuildFailure
  • trimmode link/tvOS - simulator/Release: BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

8 tests failed, 0 tests passed.
  • monotouch-test/iOS - simulator/Debug: BuildFailure
  • monotouch-test/iOS - simulator/Debug (LinkSdk): BuildFailure
  • monotouch-test/iOS - simulator/Debug (static registrar): BuildFailure
  • monotouch-test/iOS - simulator/Release (all optimizations): BuildFailure
  • monotouch-test/iOS - simulator/Debug (managed static registrar): BuildFailure
  • monotouch-test/iOS - simulator/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/iOS - simulator/Release (NativeAOT, x64): BuildFailure
  • monotouch-test/iOS - simulator/Debug (interpreter): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

11 tests failed, 0 tests passed.
  • monotouch-test/Mac Catalyst/Debug: BuildFailure
  • monotouch-test/Mac Catalyst/Debug (managed static registrar): BuildFailure
  • monotouch-test/Mac Catalyst/Debug (static registrar): BuildFailure
  • monotouch-test/Mac Catalyst/Release (managed static registrar): BuildFailure
  • monotouch-test/Mac Catalyst/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/Mac Catalyst/Release (NativeAOT): BuildFailure
  • monotouch-test/Mac Catalyst/Release (NativeAOT, x64): BuildFailure
  • monotouch-test/Mac Catalyst/Release (static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/Mac Catalyst/Release (static registrar, all optimizations): BuildFailure
  • monotouch-test/Mac Catalyst/Debug (interpreter): BuildFailure
  • monotouch-test/Mac Catalyst/Release (interpreter): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (macOS)

9 tests failed, 0 tests passed.
  • monotouch-test/macOS/Debug: BuildFailure
  • monotouch-test/macOS/Debug (managed static registrar): BuildFailure
  • monotouch-test/macOS/Debug (static registrar): BuildFailure
  • monotouch-test/macOS/Release (managed static registrar): BuildFailure ( (failed to parse the logs: The Writer is closed or in error state.))
  • monotouch-test/macOS/Release (managed static registrar, all optimizations): BuildFailure
  • monotouch-test/macOS/Release (NativeAOT): BuildFailure
  • monotouch-test/macOS/Release (NativeAOT, x64): BuildFailure
  • monotouch-test/macOS/Release (static registrar): BuildFailure
  • monotouch-test/macOS/Release (static registrar, all optimizations): BuildFailure

Html Report (VSDrops) Download

❌ monotouch tests (tvOS)

8 tests failed, 0 tests passed.
  • monotouch-test/tvOS - simulator/Debug: HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Debug (LinkSdk): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Debug (static registrar): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Release (all optimizations): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Debug (managed static registrar): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Release (managed static registrar, all optimizations): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Release (NativeAOT, x64): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)
  • monotouch-test/tvOS - simulator/Debug (interpreter): HarnessException (Harness exception for 'Tests for 410124B9-8467-46CB-855D-D75AE94A8052': System.Exception: Unable to evaluate the property OutputPath in /Users/builder/azdo/_work/1/s/macios/tests/xharness/bin/Debug/tmp-test-dir/monotouch-test3/monotouch-test.csproj, build failed with exit code 1. Timed out: False
    at Xharness.AppBundleLocator.GetPropertyByMSBuildEvaluationAsync(XmlDocument csproj, String projectPath, String evaluateProperty, String dependsOnTargets, Dictionary`2 properties) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 121
    at Xharness.AppBundleLocator.LocateAppBundle(XmlDocument projectFile, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppBundleLocator.cs:line 48
    at Xharness.IAppBundleInformationParserExtensions.ParseFromProject2(IAppBundleInformationParser this, IAppBundleLocator _appBundleLocator, String projectFilePath, TestTarget target, String buildConfiguration) in /Users/builder/azdo/_work/1/s/macios/tests/xharness/IAppBundleInformationParserExtensions.cs:line 41
    at Xharness.AppRunner.InitializeAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 115
    at Xharness.Jenkins.TestTasks.RunSimulator.SelectSimulatorAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 107
    at Xharness.Jenkins.TestTasks.AggregatedRunSimulatorTask.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/AggregatedRunSimulatorTask.cs:line 64
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 233)

Html Report (VSDrops) Download

❌ msbuild tests

1 tests failed, 1 tests passed.
  • MSBuild tasks tests: BuildFailure

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 0 tests passed.

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: fb3c205357cab0d9ce3a2e266de041cc038b94b5 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@jeremy-visionaid
Copy link
Contributor

You can do this:

AVCaptureDeviceFormat desc = <something>;
if (desc.MediaSubType == (uint) MediaSubType.PixelFormat_32BGRA)
...

Well, that's the original bug I'm reporting. It's pretty much exactly what I want to do (since that's the equivalent of how you'd do it natively), but I can't because the projection of MediaSubType and its associated constants appear to be missing? I can't find it with IntelliSense/ILSpy/grepping the macios repo... perhaps I'm just going mad, haha 😅 At least I was able to get the constants I needed from the other source you pointed out, so thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing constants for CMFormatDescription.MediaSubType

5 participants