From bf6fe2fcead609327012708ab1d86f23c2352d9b Mon Sep 17 00:00:00 2001 From: Saharsh Jaiswal Date: Mon, 18 Nov 2024 17:24:14 +0530 Subject: [PATCH 1/3] Addressing comments from PR-review! --- specs/CameraCaptureUI/CameraCaptureUI.md | 12 ++++++++++-- specs/WinRT/WinRTAPIContracts.md | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/specs/CameraCaptureUI/CameraCaptureUI.md b/specs/CameraCaptureUI/CameraCaptureUI.md index 7c5d5cb6b7..cb50481e47 100644 --- a/specs/CameraCaptureUI/CameraCaptureUI.md +++ b/specs/CameraCaptureUI/CameraCaptureUI.md @@ -190,6 +190,11 @@ Provides settings for capturing photos with CameraCaptureUI. The settings include aspect ratio, image size, format, resolution, and whether or not cropping is allowed by the user interface (UI). +**Important Note**: +- Don't specify both size and aspect ratio in the `PhotoSettings`, doing so will cause an invalid argument exception. +- `PhotoSettings` can't have a ratio or size specified with cropping disabled. + + ## CameraCaptureUIPhotoCaptureSettings Properties | Name | Description | Value | @@ -207,6 +212,11 @@ and whether or not cropping is allowed by the user interface (UI). Provides settings for capturing videos. The settings include format, maximum resolution, maximum duration, and whether or not to allow trimming. +**Important Note**: +- `MaxDurationInSeconds` must be a valid value (i.e., the duration should be in the range of 0 to `UINT32_MAX`). +- `MaxDurationInSeconds` cannot be set if `AllowTrimming` is false. + + ## CameraCaptureUIVideoCaptureSettings Properties | Name | Description | Value | |-|-|-| @@ -355,8 +365,6 @@ namespace Microsoft.Windows.Media.Capture } [contract(CameraCaptureUIContract, 1)] - [threading(sta), - marshaling_behavior(none)] runtimeclass CameraCaptureUI { CameraCaptureUI(Microsoft.UI.WindowId window); diff --git a/specs/WinRT/WinRTAPIContracts.md b/specs/WinRT/WinRTAPIContracts.md index c2fb1e7a78..2b50856dc3 100644 --- a/specs/WinRT/WinRTAPIContracts.md +++ b/specs/WinRT/WinRTAPIContracts.md @@ -106,6 +106,7 @@ The list of all contracts defined across Windows App SDK | AppLifecycle | windowsappsdk | AppLifecycleContract | Microsoft.Windows.AppLifecycle | | | AppNotifications | windowsappsdk | AppNotificationsContract | Microsoft.Windows.AppNotifications | | | BackgroundTask | windowsappsdk | BackgroundTaskContract | Microsoft.Windows.ApplicationModel.Background | | +| CameraCaptureUI | windowsappsdk | CameraCaptureUIContract | Microsoft.Windows.Media.Capture | | | Deployment | windowsappsdk | DeploymentManagerContract | Microsoft.Windows.ApplicationModel.WindowsAppRuntime | | | DynamicDependency | windowsappsdk | DynamicDependencyContract | Microsoft.Windows.ApplicationModel.DynamicDependency | | | EnvironmentManager | windowsappsdk | EnvironmentManagerContract | Microsoft.Windows.System | | From 0833338b6590450ec28ea7c2af4eb4b0723586fa Mon Sep 17 00:00:00 2001 From: Saharsh Jaiswal Date: Mon, 18 Nov 2024 22:37:09 +0530 Subject: [PATCH 2/3] addressing comments --- specs/CameraCaptureUI/CameraCaptureUI.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/CameraCaptureUI/CameraCaptureUI.md b/specs/CameraCaptureUI/CameraCaptureUI.md index cb50481e47..34ba4c5c85 100644 --- a/specs/CameraCaptureUI/CameraCaptureUI.md +++ b/specs/CameraCaptureUI/CameraCaptureUI.md @@ -192,7 +192,7 @@ and whether or not cropping is allowed by the user interface (UI). **Important Note**: - Don't specify both size and aspect ratio in the `PhotoSettings`, doing so will cause an invalid argument exception. -- `PhotoSettings` can't have a ratio or size specified with cropping disabled. +- `PhotoSettings` can't have a ratio or size specified with cropping disabled. Attempting to do so will result in an invalid argument exception. ## CameraCaptureUIPhotoCaptureSettings Properties @@ -213,8 +213,8 @@ Provides settings for capturing videos. The settings include format, maximum resolution, maximum duration, and whether or not to allow trimming. **Important Note**: -- `MaxDurationInSeconds` must be a valid value (i.e., the duration should be in the range of 0 to `UINT32_MAX`). -- `MaxDurationInSeconds` cannot be set if `AllowTrimming` is false. +- `MaxDurationInSeconds` must be a valid value (i.e., the duration should be in the range of 0 to `UINT32_MAX`). Specifying an invalid value will result in an invalid argument exception. +- `MaxDurationInSeconds` cannot be set if `AllowTrimming` is false. Attempting to do so will result in an invalid argument exception. ## CameraCaptureUIVideoCaptureSettings Properties From 5ea26665013607f34c1230188cc59dd14f9af65b Mon Sep 17 00:00:00 2001 From: Saharsh Jaiswal Date: Tue, 19 Nov 2024 16:22:14 +0530 Subject: [PATCH 3/3] Addressing comment --- specs/CameraCaptureUI/CameraCaptureUI.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specs/CameraCaptureUI/CameraCaptureUI.md b/specs/CameraCaptureUI/CameraCaptureUI.md index 34ba4c5c85..46d19453c1 100644 --- a/specs/CameraCaptureUI/CameraCaptureUI.md +++ b/specs/CameraCaptureUI/CameraCaptureUI.md @@ -191,6 +191,7 @@ The settings include aspect ratio, image size, format, resolution, and whether or not cropping is allowed by the user interface (UI). **Important Note**: +- By default, `AllowCropping` is true. - Don't specify both size and aspect ratio in the `PhotoSettings`, doing so will cause an invalid argument exception. - `PhotoSettings` can't have a ratio or size specified with cropping disabled. Attempting to do so will result in an invalid argument exception. @@ -213,6 +214,7 @@ Provides settings for capturing videos. The settings include format, maximum resolution, maximum duration, and whether or not to allow trimming. **Important Note**: +- By default, `AllowTrimming` is true. - `MaxDurationInSeconds` must be a valid value (i.e., the duration should be in the range of 0 to `UINT32_MAX`). Specifying an invalid value will result in an invalid argument exception. - `MaxDurationInSeconds` cannot be set if `AllowTrimming` is false. Attempting to do so will result in an invalid argument exception.