[Camera] Add new APIs for CameraDeviceManager and ExtraPreview (#4507)
authorHaesu Gwon <haesu.gwon@samsung.com>
Wed, 7 Sep 2022 07:55:20 +0000 (16:55 +0900)
committerGitHub <noreply@github.com>
Wed, 7 Sep 2022 07:55:20 +0000 (16:55 +0900)
* [Camera] Add new APIs for CameraDeviceManager and ExtraPreview

13 files changed:
src/Tizen.Multimedia.Camera/Camera/Camera.Events.cs
src/Tizen.Multimedia.Camera/Camera/Camera.Properties.cs
src/Tizen.Multimedia.Camera/Camera/Camera.cs
src/Tizen.Multimedia.Camera/Camera/CameraCapabilities.cs
src/Tizen.Multimedia.Camera/Camera/CameraDeviceConnectionChangedEventArgs.cs
src/Tizen.Multimedia.Camera/Camera/CameraDeviceManager.cs
src/Tizen.Multimedia.Camera/Camera/CameraDisplaySettings.cs
src/Tizen.Multimedia.Camera/Camera/CameraEnums.cs
src/Tizen.Multimedia.Camera/Camera/CameraSettings.cs
src/Tizen.Multimedia.Camera/Camera/ExtraPreviewEventArgs.cs
src/Tizen.Multimedia.Camera/Interop/Interop.Camera.cs
src/Tizen.Multimedia.Camera/Interop/Interop.CameraCapabilities.cs
src/Tizen.Multimedia.Camera/Interop/Interop.CameraSettings.cs

index 6567668..b2469c9 100644 (file)
@@ -243,12 +243,8 @@ namespace Tizen.Multimedia
 
         private Native.ExtraPreviewCallback _extraPreviewCallback;
         private event EventHandler<ExtraPreviewEventArgs> _extraPreview;
-        /// <summary>
-        /// An event that occurs once per frame when previewing.
-        /// Preview callback is registered when an user adds a callback explicitly to avoid useless P/Invoke.
-        /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <summary>An event that occurs once per frame when previewing.</summary>
+        /// <since_tizen> 10 </since_tizen>
         public event EventHandler<ExtraPreviewEventArgs> ExtraPreview
         {
             add
index a3dc44b..2b49769 100644 (file)
@@ -79,7 +79,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public Display Display
         {
@@ -128,7 +128,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value> None, Created, Preview, Capturing, Captured.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraState State
         {
             get
@@ -149,7 +149,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">An invalid state.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public bool DisplayReuseHint
         {
             get
@@ -174,7 +174,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraFacingDirection"/> that specifies the facing direction of the camera device.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraFacingDirection Direction
         {
             get
@@ -193,7 +193,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <value>This returns 2, if the device supports primary and secondary cameras.
         /// Otherwise 1, if the device only supports primary camera.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int CameraCount
         {
             get
index ab55d55..a366029 100644 (file)
@@ -46,6 +46,7 @@ namespace Tizen.Multimedia
         private bool _disposed = false;
         private CameraState _state = CameraState.None;
         PinnedPreviewBuffer<byte> _previewBuffer;
+        private CameraDeviceManager _cameraDeviceManager;
 
         /// <summary>
         /// Initializes a new instance of the <see cref="Camera"/> class.
@@ -94,12 +95,26 @@ namespace Tizen.Multimedia
             CameraDeviceType cameraDeviceType = CameraDeviceType.BuiltIn;
             CameraDevice cameraDevice = device;
 
-            if (CameraDeviceManager.IsSupported || device == CameraDevice.Default)
+            try
             {
-                var deviceInfo = GetDeviceInformation();
+                _cameraDeviceManager = new CameraDeviceManager();
+            }
+            catch (NotSupportedException)
+            {
+                Log.Info(CameraLog.Tag,
+                    $"CameraDeviceManager is not supported. Not error.");
+            }
+
+            if (_cameraDeviceManager != null || device == CameraDevice.Default)
+            {
+                var deviceInfo = _cameraDeviceManager.SupportedDevices;
+
+                // CameraDeviceManager is not used internally anymore.
+                _cameraDeviceManager.Dispose();
+
                 if (!deviceInfo.Any())
                 {
-                    throw new InvalidOperationException("CDM is supported but, there's no available camera device.");
+                    throw new InvalidOperationException("CameraDeviceManager is supported but, there's no available camera device.");
                 }
 
                 cameraDeviceType = deviceInfo.First().Type;
@@ -110,14 +125,6 @@ namespace Tizen.Multimedia
             CreateNativeCameraDevice(cameraDeviceType, cameraDevice);
         }
 
-        private IEnumerable<CameraDeviceInformation> GetDeviceInformation()
-        {
-            using (var cameraDeviceManager = new CameraDeviceManager())
-            {
-                return cameraDeviceManager.GetDeviceInformation();
-            }
-        }
-
         private void CreateNativeCameraDevice(CameraDeviceType type, CameraDevice device)
         {
             if (type == CameraDeviceType.BuiltIn || type == CameraDeviceType.Usb)
@@ -235,7 +242,7 @@ namespace Tizen.Multimedia
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of the ChangeDevice feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void ChangeDevice(CameraDevice device)
         {
             ValidateState(CameraState.Created);
@@ -295,7 +302,7 @@ namespace Tizen.Multimedia
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StartPreview()
         {
@@ -316,7 +323,7 @@ namespace Tizen.Multimedia
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StopPreview()
         {
@@ -343,7 +350,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StartCapture()
         {
@@ -378,7 +385,7 @@ namespace Tizen.Multimedia
         /// <exception cref="ArgumentOutOfRangeException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StartCapture(int count, int interval, CancellationToken cancellationToken)
         {
@@ -424,7 +431,7 @@ namespace Tizen.Multimedia
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StartFocusing(bool continuous)
         {
@@ -442,7 +449,7 @@ namespace Tizen.Multimedia
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StopFocusing()
         {
@@ -465,7 +472,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StartFaceDetection()
         {
@@ -497,7 +504,7 @@ namespace Tizen.Multimedia
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
         /// <exception cref="NotSupportedException">In case of this feature is not supported.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         /// <exception cref="UnauthorizedAccessException">In case of access to the resources cannot be granted.</exception>
         public void StopFaceDetection()
         {
index 7056ed4..444878f 100644 (file)
@@ -57,6 +57,7 @@ namespace Tizen.Multimedia
             IsMediaPacketPreviewCallbackSupported = IsFeatureSupported(NativeCapabilities.IsMediaPacketPreviewCallbackSupported);
             IsZeroShutterLagSupported = IsFeatureSupported(NativeCapabilities.IsZeroShutterLagSupported);
             IsContinuousCaptureSupported = IsFeatureSupported(NativeCapabilities.IsContinuousCaptureSupported);
+            IsExtraPreviewSupported = IsFeatureSupported(NativeCapabilities.IsExtraPreviewSupported);
             IsHdrCaptureSupported = IsFeatureSupported(NativeCapabilities.IsHdrCaptureSupported);
             IsAntiShakeSupported = IsFeatureSupported(NativeCapabilities.IsAntiShakeSupported);
             IsVideoStabilizationSupported = IsFeatureSupported(NativeCapabilities.IsVideoStabilizationSupported);
@@ -83,98 +84,105 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Gets the face detection feature's supported state.
+        /// Gets the face detection feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsFaceDetectionSupported { get; }
 
         /// <summary>
-        /// Gets the media packet preview callback feature's supported state.
+        /// Gets the media packet preview callback feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsMediaPacketPreviewCallbackSupported { get; }
 
         /// <summary>
-        /// Gets the zero shutter lag feature's supported state.
+        /// Gets the zero shutter lag feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsZeroShutterLagSupported { get; }
 
         /// <summary>
-        /// Gets the continuous capture feature's supported state.
+        /// Gets the continuous capture feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsContinuousCaptureSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the HDR capture.
+        /// Gets the extra preview feature support state.
+        /// </summary>
+        /// <value>true if supported, otherwise false.</value>
+        /// <since_tizen> 10 </since_tizen>
+        public bool IsExtraPreviewSupported { get; }
+
+        /// <summary>
+        /// Gets the HDR capture feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsHdrCaptureSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the anti-shake feature.
+        /// Gets the anti-shake feature feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsAntiShakeSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the video stabilization feature.
+        /// Gets the video stabilization feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsVideoStabilizationSupported { get; }
 
         /// <summary>
-        /// Gets the support state of auto contrast feature.
+        /// Gets the auto contrast feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsAutoContrastSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the brightness feature.
+        /// Gets the brightness feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsBrigtnessSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the exposure feature.
+        /// Gets the exposure feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsExposureSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the zoom feature.
+        /// Gets the zoom feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsZoomSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the pan feature.
+        /// Gets the pan feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsPanSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the tilt feature.
+        /// Gets the tilt feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 4 </since_tizen>
         public bool IsTiltSupported { get; }
 
         /// <summary>
-        /// Gets the support state of the hue feature.
+        /// Gets the hue feature support state.
         /// </summary>
         /// <value>true if supported, otherwise false.</value>
         /// <since_tizen> 5 </since_tizen>
@@ -187,7 +195,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported preview resolutions.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<Size> SupportedPreviewResolutions
         {
             get
@@ -210,7 +218,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported capture resolutions.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<Size> SupportedCaptureResolutions
         {
             get
@@ -233,7 +241,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraPixelFormat"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraPixelFormat> SupportedCapturePixelFormats
         {
             get
@@ -256,7 +264,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraPixelFormat"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraPixelFormat> SupportedPreviewPixelFormats
         {
             get
@@ -279,7 +287,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraFps"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraFps> SupportedPreviewFps
         {
             get
@@ -305,7 +313,7 @@ namespace Tizen.Multimedia
         /// </returns>
         /// <since_tizen> 4 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraFps> GetSupportedPreviewFpsByResolution(int width, int height)
         {
             return GetSupportedPreviewFpsByResolutions(width, height);
@@ -320,7 +328,7 @@ namespace Tizen.Multimedia
         /// </returns>
         /// <since_tizen> 4 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraFps> GetSupportedPreviewFpsByResolution(Size size)
         {
             return GetSupportedPreviewFpsByResolutions(size.Width, size.Height);
@@ -333,7 +341,7 @@ namespace Tizen.Multimedia
         /// It returns a list containing all the supported <see cref="CameraAutoFocusMode"/>.
         /// </returns>
         /// <since_tizen> 4 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraAutoFocusMode> SupportedAutoFocusModes
         {
             get
@@ -356,7 +364,7 @@ namespace Tizen.Multimedia
         /// It returns a list containing all the supported <see cref="CameraExposureMode"/>.
         /// </returns>
         /// <since_tizen> 4 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraExposureMode> SupportedExposureModes
         {
             get
@@ -379,7 +387,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraIsoLevel"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraIsoLevel> SupportedIsoLevels
         {
             get
@@ -402,7 +410,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraTheaterMode"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraTheaterMode> SupportedTheaterModes
         {
             get
@@ -425,7 +433,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraWhiteBalance"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraWhiteBalance> SupportedWhiteBalances
         {
             get
@@ -448,7 +456,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraFlashMode"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraFlashMode> SupportedFlashModes
         {
             get
@@ -471,7 +479,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraSceneMode"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraSceneMode> SupportedSceneModes
         {
             get
@@ -494,7 +502,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraEffectMode"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraEffectMode> SupportedEffects
         {
             get
@@ -517,7 +525,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// An IEnumerable containing all the supported <see cref="Rotation"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<Rotation> SupportedStreamRotations
         {
             get
@@ -540,7 +548,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="Flips"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<Flips> SupportedStreamFlips
         {
             get
@@ -563,7 +571,7 @@ namespace Tizen.Multimedia
         /// <returns>
         /// It returns a list containing all the supported <see cref="CameraPtzType"/>.
         /// </returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public IEnumerable<CameraPtzType> SupportedPtzTypes
         {
             get
index e1f5224..f4c9da5 100644 (file)
  */
 
 using System;
-using System.ComponentModel;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using static Interop.CameraDeviceManager;
 
 namespace Tizen.Multimedia
 {
     /// <summary>
     /// Provides data for the <see cref="CameraDeviceManager.DeviceConnectionChanged"/> event.
     /// </summary>
-    /// <since_tizen> 9 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <since_tizen> 10 </since_tizen>
     public class CameraDeviceConnectionChangedEventArgs : EventArgs
     {
-        internal CameraDeviceConnectionChangedEventArgs(ref CameraDeviceStruct device, bool status)
+        internal CameraDeviceConnectionChangedEventArgs(CameraDeviceInformation deviceInfo, bool status)
         {
-            CameraDeviceInformation = CameraDeviceManager.GetDeviceInformation(device);
+            CameraDeviceInformation = deviceInfo;
             IsConnected = status;
         }
 
         /// <summary>
         /// Gets the camera device information.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public CameraDeviceInformation CameraDeviceInformation { get; }
 
         /// <summary>
-        /// Gets the status of camera device.
+        /// Gets the connection status of camera device.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public bool IsConnected { get; }
     }
 }
index 79810b4..f0a6643 100644 (file)
@@ -1,4 +1,3 @@
-using System.Linq;
 /*
  * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
  *
@@ -18,6 +17,7 @@ using System.Linq;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
+using System.Linq;
 using Native = Interop.CameraDeviceManager;
 
 namespace Tizen.Multimedia
@@ -28,9 +28,8 @@ namespace Tizen.Multimedia
     /// <remarks>
     /// This supports the product infrastructure and is not intended to be used directly from 3rd party application code.
     /// </remarks>
-    /// <since_tizen> 9 </since_tizen>
+    /// <since_tizen> 10 </since_tizen>
     /// <feature> http://tizen.org/feature/camera </feature>
-    [EditorBrowsable(EditorBrowsableState.Never)]
     public class CameraDeviceManager : IDisposable
     {
         private IntPtr _handle;
@@ -42,8 +41,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <exception cref="InvalidOperationException">Invalid operation.</exception>
         /// <exception cref="NotSupportedException">The camera device manager is not supported.</exception>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public CameraDeviceManager()
         {
             Native.Initialize(out _handle).ThrowIfFailed("Failed to initialize CameraDeviceManager");
@@ -52,7 +50,6 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Finalizes an instance of the Camera class.
         /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
         ~CameraDeviceManager()
         {
             Dispose(false);
@@ -61,74 +58,80 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the status whether camera device(usb, network) is connected or not.
         /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <returns>true if usb or network camera is connected.</returns>
+        /// <exception cref="ObjectDisposedException">The CameraDeviceManager already has been disposed.</exception>
+        /// <since_tizen> 10 </since_tizen>
         public bool IsExternalCameraConnected =>
-            GetDeviceInformation().Where(d => d.Type == CameraDeviceType.Usb ||
-                                              d.Type == CameraDeviceType.Network)
-                                  .Any();
+            SupportedDevices.Where(d => d.Type == CameraDeviceType.Usb ||
+                                        d.Type == CameraDeviceType.Network)
+                            .Any();
 
         /// <summary>
-        /// Gets the current camera device information.
+        /// Retrieves all the supported camera devices and returns its information.
         /// </summary>
-        /// <returns></returns>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public IEnumerable<CameraDeviceInformation> GetDeviceInformation()
-        {
-            var deviceList = new Native.CameraDeviceListStruct();
-
-            Native.GetDeviceList(Handle, ref deviceList).
-                ThrowIfFailed("Failed to get camera device list");
-
-            return GetDeviceInformation(deviceList);
-        }
-
-        internal static bool IsSupported
+        /// <returns>
+        /// if camera device exist, returns list of <see cref="CameraDeviceInformation"/>; otherwise returns Enumerable.Empty.
+        /// </returns>
+        /// <exception cref="ArgumentException">Invalid enumeration.</exception>
+        /// <exception cref="ArgumentNullException">name or id is null.</exception>
+        /// <exception cref="ObjectDisposedException">The CameraDeviceManager already has been disposed.</exception>
+        /// <since_tizen> 10 </since_tizen>
+        public IEnumerable<CameraDeviceInformation> SupportedDevices
         {
             get
             {
-                try
+                var deviceList = new List<CameraDeviceInformation>();
+
+                Exception caught = null;
+
+                Native.SupportedDeviceCallback callback = (ref Native.CameraDeviceStruct supportedDevice, IntPtr userData) =>
                 {
-                    using (var cameraDeviceManager = new CameraDeviceManager())
+                    try
                     {
+                        var deviceInfo = new CameraDeviceInformation(supportedDevice.type, supportedDevice.device, supportedDevice.name,
+                            supportedDevice.id, supportedDevice.extraStreamNum);
+                        Log.Debug(CameraLog.Tag, deviceInfo.ToString());
+
+                        deviceList.Add(deviceInfo);
                         return true;
                     }
-                }
-                catch (NotSupportedException)
-                {
-                    Log.Info(CameraLog.Tag,
-                        $"CameraDeviceManager is not supported. Not error.");
-                }
-                return false;
-            }
-        }
+                    catch (Exception e)
+                    {
+                        caught = e;
+                        return false;
+                    }
+                };
 
-        internal static IEnumerable<CameraDeviceInformation> GetDeviceInformation(Native.CameraDeviceListStruct list)
-        {
-            if (list.count == 0)
-            {
-                return Enumerable.Empty<CameraDeviceInformation>();
-            }
+                Native.SupportedDevices(Handle, callback, IntPtr.Zero).
+                    ThrowIfFailed("failed to get supported devices");
 
-            var deviceList = new List<CameraDeviceInformation>();
+                if (caught != null)
+                {
+                    throw caught;
+                }
 
-            for (int i = 0 ; i < list.count ; i++)
-            {
-                deviceList.Add(GetDeviceInformation(list.device[i]));
+                return deviceList.Any() ? deviceList.AsReadOnly() : Enumerable.Empty<CameraDeviceInformation>();
             }
-
-            return deviceList.AsReadOnly();
         }
 
-        internal static CameraDeviceInformation GetDeviceInformation(Native.CameraDeviceStruct device) =>
-            new CameraDeviceInformation(device.Type, device.device, device.name, device.id, device.extraStreamNum);
+        /// <summary>
+        /// Gets the current camera device information.
+        /// Retrieves all the supported camera devices and returns its information.
+        /// </summary>
+        /// <remarks>This method is only for backward compatibility. Please use SupportedDevices instead.</remarks>
+        /// <returns>
+        /// if camera device exist, returns list of <see cref="CameraDeviceInformation"/>; otherwise returns Enumerable.Empty.
+        /// </returns>
+        /// <see also="WebRTCState"/>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public IEnumerable<CameraDeviceInformation> GetDeviceInformation() => SupportedDevices;
 
         private event EventHandler<CameraDeviceConnectionChangedEventArgs> _deviceConnectionChanged;
         /// <summary>
         /// An event that occurs when camera device is connected or disconnected.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <exception cref="ObjectDisposedException">The CameraDeviceManager already has been disposed.</exception>
+        /// <since_tizen> 10 </since_tizen>
         public event EventHandler<CameraDeviceConnectionChangedEventArgs> DeviceConnectionChanged
         {
             add
@@ -163,10 +166,13 @@ namespace Tizen.Multimedia
         private int _connectionCallbackId = -1;
         private void RegisterDeviceConnectionChangedCallback()
         {
-            _deviceConnectionChangedCallback = (ref Native.CameraDeviceStruct device, bool status, IntPtr userData) =>
+            _deviceConnectionChangedCallback = (ref Native.CameraDeviceStruct supportedDevice, bool isConnected, IntPtr userData) =>
             {
-                Log.Debug(CameraLog.Tag, "Invoke DeviceConnectionChanged event");
-                _deviceConnectionChanged?.Invoke(this, new CameraDeviceConnectionChangedEventArgs(ref device, status));
+                var deviceInfo = new CameraDeviceInformation(supportedDevice.type, supportedDevice.device, supportedDevice.name,
+                    supportedDevice.id, supportedDevice.extraStreamNum);
+                Log.Debug(CameraLog.Tag, deviceInfo.ToString());
+
+                _deviceConnectionChanged?.Invoke(this, new CameraDeviceConnectionChangedEventArgs(deviceInfo, isConnected));
             };
 
             Native.SetDeviceConnectionChangedCallback(Handle, _deviceConnectionChangedCallback, IntPtr.Zero, out _connectionCallbackId).
@@ -191,8 +197,7 @@ namespace Tizen.Multimedia
         /// Releases the unmanaged resources used by the camera.
         /// </summary>
         /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         protected virtual void Dispose(bool disposing)
         {
             if (!_disposed)
@@ -219,8 +224,7 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Releases all resources used by the camera.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public void Dispose()
         {
             Dispose(true);
@@ -241,22 +245,20 @@ namespace Tizen.Multimedia
     /// <summary>
     /// Provides the ability to get camera device information.
     /// </summary>
-    /// <since_tizen> 9 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <since_tizen> 10 </since_tizen>
     public struct CameraDeviceInformation
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="CameraDeviceInformation"/> class.
         /// </summary>
-        /// <param name="type"><see cref="CameraDeviceType"/></param>
-        /// <param name="device"><see cref="CameraDevice"/></param>
+        /// <param name="type">The camera type</param>
+        /// <param name="device">The camera device</param>
         /// <param name="name">The name of camera device</param>
         /// <param name="id">The ID of camera device</param>
-        /// <param name="numberOfExtraStream">The number of extra stream</param>
+        /// <param name="numberOfExtraStream">The number of extra streams</param>
         /// <exception cref="ArgumentException">Invalid enumeration.</exception>
         /// <exception cref="ArgumentNullException">name or id is null.</exception>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         internal CameraDeviceInformation(CameraDeviceType type, CameraDevice device, string name, string id, int numberOfExtraStream)
         {
             ValidationUtil.ValidateEnum(typeof(CameraDeviceType), type, nameof(type));
@@ -275,48 +277,42 @@ namespace Tizen.Multimedia
         /// Gets the camera device type.
         /// </summary>
         /// <value><see cref="CameraDeviceType"/></value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public CameraDeviceType Type { get; }
 
         /// <summary>
         /// Gets the <see cref="CameraDevice"/>.
         /// </summary>
         /// <value><see cref="CameraDevice"/></value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public CameraDevice Device { get; }
 
         /// <summary>
         /// Gets the camera device name.
         /// </summary>
         /// <value>The camera device name</value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public string Name { get; }
 
         /// <summary>
-        /// Gets the camera device Id.
+        /// Gets the camera device ID.
         /// </summary>
-        /// <value>The camera device id.</value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <value>The camera device ID.</value>
+        /// <since_tizen> 10 </since_tizen>
         public string Id { get; }
 
         /// <summary>
-        /// Gets the number of extra stream.
+        /// Gets the number of extra streams.
         /// </summary>
-        /// <value>The number of extra stream.</value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <value>The number of extra streams.</value>
+        /// <since_tizen> 10 </since_tizen>
         public int NumberOfExtraStream { get; }
 
         /// <summary>
         /// Returns a string that represents the current object.
         /// </summary>
         /// <returns>A string that represents the current object.</returns>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public override string ToString() =>
             $"Type:{Type.ToString()}, Device:{Device.ToString()}, Name:{Name}, Id:{Id}, NumberOfExtraStream:{NumberOfExtraStream}";
     }
index ac60c1d..5f2f5e4 100644 (file)
@@ -43,7 +43,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <value>A <see cref="CameraDisplayMode"/> that specifies the display mode.</value>
         /// <exception cref="ArgumentException">Display mode type is incorrect.</exception>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         public CameraDisplayMode Mode
         {
             get
@@ -69,7 +69,7 @@ namespace Tizen.Multimedia
         /// <remarks>
         /// This property is meaningful only in overlay or EVAS surface display type.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         public bool Visible
         {
             get
@@ -94,7 +94,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <value>A <see cref="Rotation"/> that specifies the rotation of the camera device.</value>
         /// <exception cref="ArgumentException">Display rotation type is incorrect.</exception>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         public Rotation Rotation
         {
             get
@@ -122,7 +122,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// <value>A <see cref="Flips"/> that specifies the camera flip type.</value>
         /// <exception cref="ArgumentException">Display flip type is incorrect.</exception>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         public Flips Flip
         {
             get
@@ -147,7 +147,7 @@ namespace Tizen.Multimedia
         /// <remarks>
         /// This property is meaningful only in overlay or EVAS surface display type.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException" > The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException" > The camera has already been disposed. </exception>
         public Rectangle RoiArea
         {
             get
index 19f1931..1eee6a7 100644 (file)
@@ -948,8 +948,7 @@ namespace Tizen.Multimedia
     /// <summary>
     /// Enumeration for camera device type
     /// </summary>
-    /// <since_tizen> 9 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <since_tizen> 10 </since_tizen>
     public enum CameraDeviceType
     {
         /// <summary>
index 275e593..aeb9fe1 100644 (file)
@@ -79,7 +79,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetAutoFocusArea(int x, int y)
         {
             Native.SetAutoFocusArea(_camera.GetHandle(), x, y).
@@ -97,7 +97,7 @@ namespace Tizen.Multimedia
         /// </remarks>
         /// /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
         /// <exception cref="InvalidOperationException">In case of any invalid operations.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetAutoFocusArea(Point pos)
         {
             Native.SetAutoFocusArea(_camera.GetHandle(), pos.X, pos.Y).
@@ -109,7 +109,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void ClearFocusArea()
         {
             Native.ClearAutoFocusArea(_camera.GetHandle()).
@@ -121,7 +121,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraAutoFocusMode"/> that specifies the auto focus mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraAutoFocusMode AutoFocusMode
         {
             get
@@ -149,7 +149,7 @@ namespace Tizen.Multimedia
         /// The contrast level of the camera.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int Contrast
         {
             get
@@ -172,7 +172,7 @@ namespace Tizen.Multimedia
         /// If true auto contrast is enabled, otherwise false.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public bool AutoContrast
         {
             get
@@ -217,7 +217,7 @@ namespace Tizen.Multimedia
         /// The hue level of the camera.
         /// </summary>
         /// <since_tizen> 5 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int Hue
         {
             get
@@ -263,7 +263,7 @@ namespace Tizen.Multimedia
         /// The brightness level of the camera.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int Brightness
         {
             get
@@ -308,7 +308,7 @@ namespace Tizen.Multimedia
         /// The exposure value.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int Exposure
         {
             get
@@ -331,7 +331,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraExposureMode"/> that specifies the exposure mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraExposureMode ExposureMode
         {
             get
@@ -381,7 +381,7 @@ namespace Tizen.Multimedia
         /// The range for the zoom level is received from the ZoomRange property.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int ZoomLevel
         {
             get
@@ -426,7 +426,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraWhiteBalance"/> that specifies the white balance mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraWhiteBalance WhiteBalance
         {
             get
@@ -453,7 +453,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraIsoLevel"/> that specifies the ISO level.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraIsoLevel IsoLevel
         {
             get
@@ -480,7 +480,7 @@ namespace Tizen.Multimedia
         /// The range for the image quality is 1 to 100.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int ImageQuality
         {
             get
@@ -509,7 +509,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraFps"/> that specifies the preview frame rate.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraFps PreviewFps
         {
             get
@@ -534,7 +534,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Size PreviewResolution
         {
             get
@@ -560,7 +560,7 @@ namespace Tizen.Multimedia
         /// Depending on the capture resolution aspect ratio and the display resolution,
         /// the recommended preview resolution is determined.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Size RecommendedPreviewResolution
         {
             get
@@ -578,7 +578,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraPixelFormat"/> that specifies the pixel format of the preview data.</value>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraPixelFormat PreviewPixelFormat
         {
             get
@@ -603,7 +603,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Size CaptureResolution
         {
             get
@@ -629,7 +629,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraPixelFormat"/> that specifies the pixel format of captured image.</value>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraPixelFormat CapturePixelFormat
         {
             get
@@ -655,7 +655,7 @@ namespace Tizen.Multimedia
         /// The bit rate of the encoded preview.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int EncodedPreviewBitrate
         {
             get
@@ -677,7 +677,7 @@ namespace Tizen.Multimedia
         /// The GOP(Group Of Pictures) interval of the encoded preview.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int EncodedPreviewGopInterval
         {
             get
@@ -705,7 +705,7 @@ namespace Tizen.Multimedia
         /// If you want to display the preview image on the external display with the full screen mode,
         /// use this property.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraTheaterMode TheaterMode
         {
             get
@@ -730,7 +730,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraEffectMode"/> that specifies the effect mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraEffectMode Effect
         {
             get
@@ -755,7 +755,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraSceneMode"/> that specifies the scene mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraSceneMode SceneMode
         {
             get
@@ -780,7 +780,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraFlashMode"/> that specifies the flash mode.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraFlashMode FlashMode
         {
             get
@@ -804,7 +804,7 @@ namespace Tizen.Multimedia
         /// Gets the camera lens orientation angle.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int LensOrientation
         {
             get
@@ -821,7 +821,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="Rotation"/> that specifies the rotation of camera device.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Rotation StreamRotation
         {
             get
@@ -846,7 +846,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="Flips"/> that specifies the camera flip type.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Flips StreamFlip
         {
             get
@@ -876,7 +876,7 @@ namespace Tizen.Multimedia
         /// so that we eventually arrive at a picture that is representative in both dark and bright areas.
         /// If this attribute is set, then event handler set for the HdrCaptureProgress event is invoked.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraHdrMode HdrMode
         {
             get
@@ -901,7 +901,7 @@ namespace Tizen.Multimedia
         /// If true, the antishake feature is enabled, otherwise false.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public bool AntiShake
         {
             get
@@ -928,7 +928,7 @@ namespace Tizen.Multimedia
         /// If video stabilization is enabled, zero shutter lag is disabled.
         /// This feature is used to record a video.
         /// </remarks>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public bool VideoStabilization
         {
             get
@@ -957,7 +957,7 @@ namespace Tizen.Multimedia
         /// In some countries, this operation is not permitted.
         /// </remarks>
         /// <exception cref="InvalidOperationException">Disabling shutter sound is not permitted.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void DisableShutterSound(bool shutterSound)
         {
             Native.DisableShutterSound(_camera.GetHandle(), shutterSound).
@@ -970,7 +970,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <value>A <see cref="CameraPtzType"/> that specifies the type of the PTZ.</value>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraPtzType PtzType
         {
             set
@@ -990,7 +990,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetPan(CameraPtzMoveType type, int panStep)
         {
             ValidationUtil.ValidateEnum(typeof(CameraPtzMoveType), type, nameof(type));
@@ -1005,7 +1005,7 @@ namespace Tizen.Multimedia
         /// <returns>Returns the camera's horizontal position.</returns>
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int GetPan()
         {
             Native.GetPan(_camera.GetHandle(), out int val).
@@ -1022,7 +1022,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <exception cref="ArgumentException">In case of invalid parameters.</exception>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetTilt(CameraPtzMoveType type, int tiltStep)
         {
             ValidationUtil.ValidateEnum(typeof(CameraPtzMoveType), type, nameof(type));
@@ -1037,7 +1037,7 @@ namespace Tizen.Multimedia
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
         /// <returns>Returns the current vertical position.</returns>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int GetTilt()
         {
             Native.GetTilt(_camera.GetHandle(), out int val).
@@ -1095,7 +1095,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <value>true if EXIF tags are enabled in the JPEG file, otherwise false.</value>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public bool EnableTag
         {
             get
@@ -1117,7 +1117,7 @@ namespace Tizen.Multimedia
         /// The camera image description in the EXIF tag.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public string ImageDescriptionTag
         {
             get
@@ -1147,7 +1147,7 @@ namespace Tizen.Multimedia
         /// The software information in the EXIF tag.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public string SoftwareTag
         {
             get
@@ -1178,7 +1178,7 @@ namespace Tizen.Multimedia
         /// The geo tag(GPS data) in the EXIF tag.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public Location GeoTag
         {
             get
@@ -1201,7 +1201,7 @@ namespace Tizen.Multimedia
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <feature> http://tizen.org/feature/camera </feature>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void RemoveGeoTag()
         {
             Native.RemoveGeotag(_camera.GetHandle()).
@@ -1212,7 +1212,7 @@ namespace Tizen.Multimedia
         /// The camera orientation in the tag.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed of.</exception>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public CameraTagOrientation OrientationTag
         {
             get
@@ -1236,10 +1236,10 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the information of extra preview stream.
         /// </summary>
-        /// <param name="streamId">The stream id.</param>
-        /// <since_tizen> 9 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <param name="streamId">The stream ID.</param>
+        /// <returns>A extra stream information.</returns>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public ExtraPreviewStreamInfo GetExtraPreviewStreamInfo(int streamId)
         {
             GetExtraPreviewStreamFormat(_camera.GetHandle(), streamId, out CameraPixelFormat format,
@@ -1252,9 +1252,8 @@ namespace Tizen.Multimedia
         /// Sets the information of extra preview stream.
         /// </summary>
         /// <param name="info">The extra preview stream information.</param>
-        /// <since_tizen> 9 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetExtraPreviewStreamInfo(ExtraPreviewStreamInfo info)
         {
             SetExtraPreviewStreamFormat(_camera.GetHandle(), info.StreamId, info.Format,
@@ -1262,12 +1261,12 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Gets the bitrate of extra preview with given stream id.
+        /// Gets the bitrate of extra preview with given stream ID.
         /// </summary>
-        /// <param name="streamId">The stream id.</param>
-        /// <since_tizen> 9 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <param name="streamId">The stream ID.</param>
+        /// <returns>A bitrate of extra stream.</returns>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public int GetExtraPreviewBitrate(int streamId)
         {
             Native.GetExtraPreviewBitrate(_camera.GetHandle(), streamId, out int bitrate).
@@ -1277,36 +1276,76 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Sets the bitrate of extra preview with given stream id.
+        /// Sets the bitrate of extra preview with given stream ID.
         /// </summary>
-        /// <param name="streamId">The stream id.</param>
-        /// <param name="bitrate">The bitrate fo extra preview.</param>
-        /// <since_tizen> 9 </since_tizen>
-        /// <exception cref="ObjectDisposedException">The camera already has been disposed.</exception>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <param name="streamId">The stream ID.</param>
+        /// <param name="bitrate">The bitrate for extra preview.</param>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
         public void SetExtraPreviewBitrate(int streamId, int bitrate)
         {
             Native.SetExtraPreviewBitrate(_camera.GetHandle(), streamId, bitrate).
                 ThrowIfFailed("Failed to set extra preview bitrate");
         }
+
+        /// <summary>
+        /// Gets the GOP(Group Of Pictures) interval of extra preview with given stream ID.
+        /// </summary>
+        /// <param name="streamId">The stream ID.</param>
+        /// <returns>A GOP interval of extra preview.</returns>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
+        public int GetExtraPreviewGopInterval(int streamId)
+        {
+            Native.GetExtraPreviewBitrate(_camera.GetHandle(), streamId, out int gopInterval).
+                ThrowIfFailed("Failed to get extra preview gop interval");
+
+            return gopInterval;
+        }
+
+        /// <summary>
+        /// Sets The GOP(Group Of Pictures) interval of extra preview with given stream ID.
+        /// </summary>
+        /// <param name="streamId">The stream ID.</param>
+        /// <param name="gopInterval">The stream ID.</param>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
+        public void SetExtraPreviewGopInterval(int streamId, int gopInterval)
+        {
+            Native.SetExtraPreviewBitrate(_camera.GetHandle(), streamId, gopInterval).
+                ThrowIfFailed("Failed to set extra preview gop interval");
+        }
+
+        /// <summary>
+        /// Gets the rotation of extra preview with given stream ID.
+        /// </summary>
+        /// <param name="streamId">The stream ID.</param>
+        /// <returns>A rotation of extra preview.</returns>
+        /// <since_tizen> 10 </since_tizen>
+        /// <exception cref="ObjectDisposedException">The camera has already been disposed. </exception>
+        public Rotation GetExtraPreviewRotation(int streamId)
+        {
+            Native.GetExtraPreviewRotation(_camera.GetHandle(), streamId, out Rotation rotation).
+                ThrowIfFailed("Failed to get extra preview gop interval");
+
+            return rotation;
+        }
     }
 
     /// <summary>
     /// Provides the ability to get the information of extra preview stream.
     /// </summary>
-    /// <since_tizen> 9 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <since_tizen> 10 </since_tizen>
     public struct ExtraPreviewStreamInfo
     {
         /// <summary>
         /// Initializes a new instance of the <see cref="ExtraPreviewStreamInfo"/> class.
         /// </summary>
-        /// <param name="streamId">The stream id.</param>
+        /// <param name="streamId">The stream ID.</param>
         /// <param name="format">The preview format.</param>
         /// <param name="size">The preview resolution.</param>
-        /// <param name="fps">The fps.</param>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <param name="fps">The FPS.</param>
+        /// <since_tizen> 10 </since_tizen>
         public ExtraPreviewStreamInfo(int streamId, CameraPixelFormat format, Size size, int fps)
         {
             StreamId = streamId;
@@ -1316,43 +1355,38 @@ namespace Tizen.Multimedia
         }
 
         /// <summary>
-        /// Gets the stream Id.
+        /// Gets the stream ID.
         /// </summary>
-        /// <value>The stream Id.</value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int StreamId { get; set;}
+        /// <value>The stream ID.</value>
+        /// <since_tizen> 10 </since_tizen>
+        public int StreamId { get; }
 
         /// <summary>
         /// Gets the extra preview format.
         /// </summary>
-        /// <value></value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <value>The camera pixel format.</value>
+        /// <since_tizen> 10 </since_tizen>
         public CameraPixelFormat Format { get; }
 
         /// <summary>
         /// Gets the extra preview resolution.
         /// </summary>
-        /// <value></value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <value>A resolution of extra preview.</value>
+        /// <since_tizen> 10 </since_tizen>
         public Size Size { get; }
 
         /// <summary>
-        /// Gets the fps.
+        /// Gets the FPS.
         /// </summary>
         /// <value></value>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public int Fps { get; }
 
         /// <summary>
         /// Returns a string that represents the current object.
         /// </summary>
         /// <returns>A string that represents the current object.</returns>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public override string ToString() =>
             $"StreamId:{StreamId}, Format:{Format.ToString()}, Resolution:{Size.Width}x{Size.Height}, Fps:{Fps}";
     }
index 40734e5..8a9660c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
  */
 
 using System;
-using System.ComponentModel;
 
 namespace Tizen.Multimedia
 {
     /// <summary>
     /// Provides data for the <see cref="Camera.ExtraPreview"/> event.
     /// </summary>
-    /// <since_tizen> 9 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <since_tizen> 10 </since_tizen>
     public class ExtraPreviewEventArgs : EventArgs
     {
         internal ExtraPreviewEventArgs(PreviewFrame preview, int streadId)
@@ -35,15 +33,13 @@ namespace Tizen.Multimedia
         /// <summary>
         /// Gets the preview frame data.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public PreviewFrame Preview { get; }
 
         /// <summary>
         /// Gets the stream ID.
         /// </summary>
-        /// <since_tizen> 9 </since_tizen>
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 10 </since_tizen>
         public int StreamId { get; }
     }
 }
index dc82ab3..b108aaa 100644 (file)
@@ -328,7 +328,10 @@ internal static partial class Interop
     internal static partial class CameraDeviceManager
     {
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        internal delegate void DeviceConnectionChangedCallback(ref CameraDeviceStruct device, bool status, IntPtr userData);
+        internal delegate void DeviceConnectionChangedCallback(ref CameraDeviceStruct connectedDevice, bool idConnedted, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate bool SupportedDeviceCallback(ref CameraDeviceStruct supportedDevice, IntPtr userData);
 
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_initialize")]
@@ -337,8 +340,8 @@ internal static partial class Interop
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_deinitialize")]
         internal static extern CameraError Deinitialize(IntPtr handle);
 
-        [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_get_device_list")]
-        internal static extern CameraError GetDeviceList(IntPtr handle, ref CameraDeviceListStruct deviceList);
+        [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_foreach_supported_device")]
+        internal static extern CameraError SupportedDevices(IntPtr handle, SupportedDeviceCallback callback, IntPtr userData);
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_add_device_connection_changed_cb")]
         internal static extern CameraError SetDeviceConnectionChangedCallback(IntPtr handle, DeviceConnectionChangedCallback callback, IntPtr userData, out int id);
@@ -346,12 +349,11 @@ internal static partial class Interop
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_remove_device_connection_changed_cb")]
         internal static extern CameraError UnsetDeviceConnectionChangedCallback(IntPtr handle, int id);
 
-
-        [NativeStruct("camera_device_s", Include="camera_internal.h", PkgConfig="capi-media-camera")]
+        [NativeStruct("camera_device_s", Include="camera.h", PkgConfig="capi-media-camera")]
         [StructLayout(LayoutKind.Sequential)]
         internal struct CameraDeviceStruct
         {
-            internal CameraDeviceType Type;
+            internal CameraDeviceType type;
 
             internal CameraDevice device;
 
@@ -363,15 +365,5 @@ internal static partial class Interop
 
             internal int extraStreamNum;
         }
-
-        [NativeStruct("camera_device_list_s", Include="camera_internal.h", PkgConfig="capi-media-camera")]
-        [StructLayout(LayoutKind.Sequential)]
-        internal struct CameraDeviceListStruct
-        {
-            internal uint count;
-
-            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
-            internal CameraDeviceStruct[] device;
-        }
     }
 }
\ No newline at end of file
index 4743c96..b949bb8 100755 (executable)
@@ -74,21 +74,25 @@ internal static partial class Interop
         internal delegate bool PtzTypeCallback(CameraPtzType type, IntPtr userData);
 
 
-        [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_continuous_capture")]
-        [return: MarshalAs(UnmanagedType.I1)]
-        internal static extern bool IsContinuousCaptureSupported(IntPtr handle);
-
         [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_face_detection")]
         [return: MarshalAs(UnmanagedType.I1)]
         internal static extern bool IsFaceDetectionSupported(IntPtr handle);
 
+        [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_media_packet_preview_cb")]
+        [return: MarshalAs(UnmanagedType.I1)]
+        internal static extern bool IsMediaPacketPreviewCallbackSupported(IntPtr handle);
+
         [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_zero_shutter_lag")]
         [return: MarshalAs(UnmanagedType.I1)]
         internal static extern bool IsZeroShutterLagSupported(IntPtr handle);
 
-        [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_media_packet_preview_cb")]
+        [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_continuous_capture")]
         [return: MarshalAs(UnmanagedType.I1)]
-        internal static extern bool IsMediaPacketPreviewCallbackSupported(IntPtr handle);
+        internal static extern bool IsContinuousCaptureSupported(IntPtr handle);
+
+        [DllImport(Libraries.Camera, EntryPoint = "camera_is_supported_extra_preview")]
+        [return: MarshalAs(UnmanagedType.I1)]
+        internal static extern bool IsExtraPreviewSupported(IntPtr handle);
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_attr_is_supported_hdr_capture")]
         [return: MarshalAs(UnmanagedType.I1)]
index ec177d7..615743f 100644 (file)
@@ -246,5 +246,14 @@ internal static partial class Interop
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_extra_preview_bitrate")]
         internal static extern CameraError GetExtraPreviewBitrate(IntPtr handle, int streamId, out int bitrate);
+
+        [DllImport(Libraries.Camera, EntryPoint = "camera_attr_set_extra_preview_gop_interval")]
+        internal static extern CameraError SetExtraPreviewGopInterval(IntPtr handle, int streamId, int gopInterval);
+
+        [DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_extra_preview_gop_interval")]
+        internal static extern CameraError GetExtraPreviewGopInterval(IntPtr handle, int streamId, out int gopInterval);
+
+        [DllImport(Libraries.Camera, EntryPoint = "camera_attr_get_preview_frame_rotation")]
+        internal static extern CameraError GetExtraPreviewRotation(IntPtr handle, int streamId, out Rotation rotation);
     }
 }