4 * Copyright (c) 2000 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hyuntae Kim <ht1211.kim@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __MM_STREAMRECORDER_AUDIO_H__
23 #define __MM_STREAMRECORDER_AUDIO_H__
25 /*=======================================================================================
27 ========================================================================================*/
34 /*=======================================================================================
35 | STRUCTURE DEFINITIONS |
36 ========================================================================================*/
38 * MMStreamRecorder information for audio mode
41 int iAudioEncoder; /**<Encoder */
42 int iSamplingRate; /**< Sampling rate */
43 int iBitDepth; /**< Bit depth */
44 int iBitrate; /**< audio bitrate */
45 int iChannels; /**< audio channels */
46 gboolean b_commiting; /**< Is it commiting now? */
47 gboolean bMuxing; /**< whether muxing */
48 guint64 filesize; /**< current recorded file size */
49 guint64 max_size; /**< max recording size */
50 guint64 max_time; /**< max recording time */
51 int audio_encode_depth; /**< audio depth */
52 guint64 audio_frame_count; /**< current audio frame */
53 } _MMStreamRecorderAudioInfo;
56 * Enumerations for AMR bitrate
58 typedef enum _MMStreamRecorderAMRBitRate {
59 MM_STREAMRECORDER_MR475, /**< MR475 : 4.75 kbit/s */
60 MM_STREAMRECORDER_MR515, /**< MR515 : 5.15 kbit/s */
61 MM_STREAMRECORDER_MR59, /**< MR59 : 5.90 kbit/s */
62 MM_STREAMRECORDER_MR67, /**< MR67 : 6.70 kbit/s */
63 MM_STREAMRECORDER_MR74, /**< MR74 : 7.40 kbit/s */
64 MM_STREAMRECORDER_MR795, /**< MR795 : 7.95 kbit/s */
65 MM_STREAMRECORDER_MR102, /**< MR102 : 10.20 kbit/s */
66 MM_STREAMRECORDER_MR122, /**< MR122 : 12.20 kbit/s */
67 MM_STREAMRECORDER_MRDTX /**< MRDTX */
68 } MMStreamRecorderAMRBitRate;
70 /*=======================================================================================
71 | GLOBAL FUNCTION PROTOTYPES |
72 ========================================================================================*/
74 int _mmstreamrecorder_check_audiocodec_fileformat_compatibility(unsigned int audio_codec, unsigned int file_format);
76 int _mmstreamrecorder_get_amrnb_bitrate_mode(int bitrate);
81 #endif /* __MM_STREAMRECORDER_AUDIO_H__ */