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