[Camera] Fix CameraDeviceManager bug (#5959)
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 20 Feb 2024 04:38:10 +0000 (13:38 +0900)
committerGitHub <noreply@github.com>
Tue, 20 Feb 2024 04:38:10 +0000 (13:38 +0900)
src/Tizen.Multimedia.Camera/Camera/CameraDeviceManager.cs
src/Tizen.Multimedia.Camera/Interop/Interop.Camera.cs

index 0918110..f56f674 100644 (file)
@@ -145,7 +145,7 @@ namespace Tizen.Multimedia
         {
             ValidationUtil.ValidateEnum(typeof(CameraDevice), device, nameof(device));
 
-            Native.GetProductId(Handle, out ushort productId).ThrowIfFailed("failed to get product ID");
+            Native.GetProductId(Handle, device, out ushort productId).ThrowIfFailed("failed to get product ID");
 
             return productId;
         }
@@ -160,7 +160,7 @@ namespace Tizen.Multimedia
         {
             ValidationUtil.ValidateEnum(typeof(CameraDevice), device, nameof(device));
 
-            Native.GetVendorId(Handle, out ushort vendorId).ThrowIfFailed("failed to get vendor ID");
+            Native.GetVendorId(Handle, device, out ushort vendorId).ThrowIfFailed("failed to get vendor ID");
 
             return vendorId;
         }
index 75998ed..26a8f2a 100644 (file)
@@ -351,10 +351,10 @@ internal static partial class Interop
         internal static extern CameraError UnsetDeviceConnectionChangedCallback(IntPtr handle, int id);
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_get_product_id")]
-        internal static extern CameraError GetProductId(IntPtr handle, out ushort id);
+        internal static extern CameraError GetProductId(IntPtr handle, CameraDevice  device, out ushort id);
 
         [DllImport(Libraries.Camera, EntryPoint = "camera_device_manager_get_vendor_id")]
-        internal static extern CameraError GetVendorId(IntPtr handle, out ushort id);
+        internal static extern CameraError GetVendorId(IntPtr handle, CameraDevice  device, out ushort id);
 
         [NativeStruct("camera_device_s", Include="camera.h", PkgConfig="capi-media-camera")]
         [StructLayout(LayoutKind.Sequential)]