Release 4.0.0-preview1-00221
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Metadata / Interop / Interop.MetadataExtractor.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 using System;
18 using System.Runtime.InteropServices;
19 using Tizen.Multimedia;
20
21 internal static partial class Interop
22 {
23     internal static partial class MetadataExtractor
24     {
25         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_create")]
26         internal static extern MetadataExtractorError Create(out IntPtr handle);
27
28         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_path")]
29         internal static extern MetadataExtractorError SetPath(IntPtr handle, string path);
30
31         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_set_buffer")]
32         internal static extern MetadataExtractorError SetBuffer(IntPtr handle, IntPtr buffer, int size);
33
34         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_destroy")]
35         internal static extern MetadataExtractorError Destroy(IntPtr handle);
36
37         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_metadata")]
38         internal static extern MetadataExtractorError GetMetadata(IntPtr handle, MetadataExtractorAttr attribute, out IntPtr value);
39
40         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_artwork")]
41         internal static extern MetadataExtractorError GetArtwork(IntPtr handle, out IntPtr artwork,
42             out int size, out IntPtr mimeType);
43
44         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame")]
45         internal static extern MetadataExtractorError GetFrame(IntPtr handle, out IntPtr frame, out int size);
46
47         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_synclyrics")]
48         internal static extern MetadataExtractorError GetSynclyrics(IntPtr handle, int index,
49             out uint timeStamp, out IntPtr lyrics);
50
51         [DllImport(Libraries.MetadataExtractor, EntryPoint = "metadata_extractor_get_frame_at_time")]
52         internal static extern MetadataExtractorError GetFrameAtTime(IntPtr handle, uint timeStamp,
53             bool isAccurate, out IntPtr frame, out int size);
54     }
55 }