2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
19 using Tizen.Multimedia;
24 internal static partial class Interop
27 /// Interop for media vision APIs
29 internal static partial class MediaVision
32 /// Interop for barcode detector APIs
34 internal static partial class BarcodeDetector
36 [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_detect")]
37 internal static extern MediaVisionError Detect(IntPtr source, IntPtr engineCfg, Rectangle roi,
38 DetectedCallback detectCb, IntPtr userData = default(IntPtr));
40 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
41 internal delegate void DetectedCallback(
44 [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)]
45 Quadrangle[] locations,
46 [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPStr, SizeParamIndex = 5)]
54 /// Interop for barcode generator APIs
56 internal static partial class BarcodeGenerator
58 [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_generate_source")]
59 internal static extern MediaVisionError GenerateSource(IntPtr engineCfg, string message,
60 BarcodeType type, int qrEncMode, int qrEcc, int qrVersion, IntPtr source);
62 [DllImport(Libraries.MediaVision, EntryPoint = "mv_barcode_generate_image")]
63 internal static extern MediaVisionError GenerateImage(IntPtr engineCfg,
64 string message, int imageWidth, int imageHeight, BarcodeType type,
65 int qrEncMode, int qrEcc, int qrVersion, string imagePath, BarcodeImageFormat imageFormat);