Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Recorder / Interop / Interop.RecorderSettings.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 RecorderSettings
24     {
25         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_channel")]
26         internal static extern RecorderError GetAudioChannel(IntPtr handle, out int channelCount);
27
28         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_channel")]
29         internal static extern RecorderError SetAudioChannel(IntPtr handle, int channelCount);
30
31         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_device")]
32         internal static extern RecorderError GetAudioDevice(IntPtr handle, out RecorderAudioDevice device);
33
34         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_device")]
35         internal static extern RecorderError SetAudioDevice(IntPtr handle, RecorderAudioDevice device);
36
37         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_audio_level")]
38         internal static extern RecorderError GetAudioLevel(IntPtr handle, out double dB);
39
40         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_samplerate")]
41         internal static extern RecorderError GetAudioSampleRate(IntPtr handle, out int sampleRate);
42
43         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_samplerate")]
44         internal static extern RecorderError SetAudioSampleRate(IntPtr handle, int sampleRate);
45
46         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_encoder_bitrate")]
47         internal static extern RecorderError GetAudioEncoderBitrate(IntPtr handle, out int bitRate);
48
49         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_encoder_bitrate")]
50         internal static extern RecorderError SetAudioEncoderBitrate(IntPtr handle, int bitRate);
51
52         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_video_encoder_bitrate")]
53         internal static extern RecorderError GetVideoEncoderBitrate(IntPtr handle, out int bitRate);
54
55         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_video_encoder_bitrate")]
56         internal static extern RecorderError SetVideoEncoderBitrate(IntPtr handle, int bitRate);
57
58         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_audio_encoder")]
59         internal static extern RecorderError GetAudioEncoder(IntPtr handle, out RecorderAudioCodec codec);
60
61         [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_audio_encoder")]
62         internal static extern RecorderError SetAudioEncoder(IntPtr handle, RecorderAudioCodec codec);
63
64         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_video_encoder")]
65         internal static extern RecorderError GetVideoEncoder(IntPtr handle, out RecorderVideoCodec codec);
66
67         [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_video_encoder")]
68         internal static extern RecorderError SetVideoEncoder(IntPtr handle, RecorderVideoCodec codec);
69
70         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_file_format")]
71         internal static extern RecorderError GetFileFormat(IntPtr handle, out RecorderFileFormat format);
72
73         [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_file_format")]
74         internal static extern RecorderError SetFileFormat(IntPtr handle, RecorderFileFormat format);
75
76         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_filename")]
77         internal static extern RecorderError GetFileName(IntPtr handle, out IntPtr path);
78
79         [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_filename")]
80         internal static extern RecorderError SetFileName(IntPtr handle, string path);
81
82         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_size_limit")]
83         internal static extern RecorderError GetSizeLimit(IntPtr handle, out int kbyte);
84
85         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_size_limit")]
86         internal static extern RecorderError SetSizeLimit(IntPtr handle, int kbyte);
87
88         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_time_limit")]
89         internal static extern RecorderError GetTimeLimit(IntPtr handle, out int second);
90
91         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_time_limit")]
92         internal static extern RecorderError SetTimeLimit(IntPtr handle, int second);
93
94         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_is_muted")]
95         [return: MarshalAs(UnmanagedType.I1)]
96         internal static extern bool GetMute(IntPtr handle);
97
98         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_mute")]
99         internal static extern RecorderError SetMute(IntPtr handle, bool enable);
100
101         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_recording_motion_rate")]
102         internal static extern RecorderError GetMotionRate(IntPtr handle, out double motionRate);
103
104         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_recording_motion_rate")]
105         internal static extern RecorderError SetMotionRate(IntPtr handle, double motionRate);
106
107         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_orientation_tag")]
108         internal static extern RecorderError GetOrientationTag(IntPtr handle, out Rotation orientation);
109
110         [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_orientation_tag")]
111         internal static extern RecorderError SetOrientationTag(IntPtr handle, Rotation orientation);
112
113         [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_video_resolution")]
114         internal static extern RecorderError GetVideoResolution(IntPtr handle, out int width, out int height);
115
116         [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_video_resolution")]
117         internal static extern RecorderError SetVideoResolution(IntPtr handle, int width, int height);
118     }
119 }