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;
21 internal static partial class Interop
23 internal static partial class RecorderSettings
25 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_channel")]
26 internal static extern RecorderError GetAudioChannel(IntPtr handle, out int channelCount);
28 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_channel")]
29 internal static extern RecorderError SetAudioChannel(IntPtr handle, int channelCount);
31 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_device")]
32 internal static extern RecorderError GetAudioDevice(IntPtr handle, out RecorderAudioDevice device);
34 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_device")]
35 internal static extern RecorderError SetAudioDevice(IntPtr handle, RecorderAudioDevice device);
37 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_audio_level")]
38 internal static extern RecorderError GetAudioLevel(IntPtr handle, out double dB);
40 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_samplerate")]
41 internal static extern RecorderError GetAudioSampleRate(IntPtr handle, out int sampleRate);
43 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_samplerate")]
44 internal static extern RecorderError SetAudioSampleRate(IntPtr handle, int sampleRate);
46 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_audio_encoder_bitrate")]
47 internal static extern RecorderError GetAudioEncoderBitrate(IntPtr handle, out int bitRate);
49 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_audio_encoder_bitrate")]
50 internal static extern RecorderError SetAudioEncoderBitrate(IntPtr handle, int bitRate);
52 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_video_encoder_bitrate")]
53 internal static extern RecorderError GetVideoEncoderBitrate(IntPtr handle, out int bitRate);
55 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_video_encoder_bitrate")]
56 internal static extern RecorderError SetVideoEncoderBitrate(IntPtr handle, int bitRate);
58 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_audio_encoder")]
59 internal static extern RecorderError GetAudioEncoder(IntPtr handle, out RecorderAudioCodec codec);
61 [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_audio_encoder")]
62 internal static extern RecorderError SetAudioEncoder(IntPtr handle, RecorderAudioCodec codec);
64 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_video_encoder")]
65 internal static extern RecorderError GetVideoEncoder(IntPtr handle, out RecorderVideoCodec codec);
67 [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_video_encoder")]
68 internal static extern RecorderError SetVideoEncoder(IntPtr handle, RecorderVideoCodec codec);
70 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_file_format")]
71 internal static extern RecorderError GetFileFormat(IntPtr handle, out RecorderFileFormat format);
73 [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_file_format")]
74 internal static extern RecorderError SetFileFormat(IntPtr handle, RecorderFileFormat format);
76 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_filename")]
77 internal static extern RecorderError GetFileName(IntPtr handle, out IntPtr path);
79 [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_filename")]
80 internal static extern RecorderError SetFileName(IntPtr handle, string path);
82 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_size_limit")]
83 internal static extern RecorderError GetSizeLimit(IntPtr handle, out int kbyte);
85 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_size_limit")]
86 internal static extern RecorderError SetSizeLimit(IntPtr handle, int kbyte);
88 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_time_limit")]
89 internal static extern RecorderError GetTimeLimit(IntPtr handle, out int second);
91 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_time_limit")]
92 internal static extern RecorderError SetTimeLimit(IntPtr handle, int second);
94 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_is_muted")]
95 [return: MarshalAs(UnmanagedType.I1)]
96 internal static extern bool GetMute(IntPtr handle);
98 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_mute")]
99 internal static extern RecorderError SetMute(IntPtr handle, bool enable);
101 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_recording_motion_rate")]
102 internal static extern RecorderError GetMotionRate(IntPtr handle, out double motionRate);
104 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_recording_motion_rate")]
105 internal static extern RecorderError SetMotionRate(IntPtr handle, double motionRate);
107 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_get_orientation_tag")]
108 internal static extern RecorderError GetOrientationTag(IntPtr handle, out Rotation orientation);
110 [DllImport(Libraries.Recorder, EntryPoint = "recorder_attr_set_orientation_tag")]
111 internal static extern RecorderError SetOrientationTag(IntPtr handle, Rotation orientation);
113 [DllImport(Libraries.Recorder, EntryPoint = "recorder_get_video_resolution")]
114 internal static extern RecorderError GetVideoResolution(IntPtr handle, out int width, out int height);
116 [DllImport(Libraries.Recorder, EntryPoint = "recorder_set_video_resolution")]
117 internal static extern RecorderError SetVideoResolution(IntPtr handle, int width, int height);