Change flag for some attributes
[platform/core/multimedia/libmm-camcorder.git] / src / include / mm_camcorder_audiorec.h
1 /*
2  * libmm-camcorder
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jeongmo Yang <jm80.yang@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  */
21
22 #ifndef __MM_CAMCORDER_AUDIOREC_H__
23 #define __MM_CAMCORDER_AUDIOREC_H__
24
25 /*=======================================================================================
26 | INCLUDE FILES                                                                         |
27 ========================================================================================*/
28 #include <mm_types.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /*=======================================================================================
35 | STRUCTURE DEFINITIONS                                                                 |
36 ========================================================================================*/
37 /**
38  * MMCamcorder information for audio mode
39  */
40 typedef struct {
41         int iSamplingRate;              /**< Sampling rate */
42         int iBitDepth;                  /**< Bit depth */
43         int iChannels;                  /**< audio channels */
44         char *filename;                 /**< recorded file name */
45         gboolean b_commiting;           /**< Is it commiting now? */
46         gboolean bMuxing;               /**< whether muxing */
47         guint64 filesize;               /**< current recorded file size */
48         guint64 max_size;               /**< max recording size */
49         guint64 max_time;               /**< max recording time */
50         int fileformat;                 /**< recording file format */
51 } _MMCamcorderAudioInfo;
52
53 /*=======================================================================================
54 | GLOBAL FUNCTION PROTOTYPES                                                            |
55 ========================================================================================*/
56 /**
57  * This function creates audio pipeline for audio recording.
58  *
59  * @param[in]   handle          Handle of camcorder.
60  * @return      This function returns MM_ERROR_NONE on success, or others on failure.
61  * @remarks
62  * @see         _mmcamcorder_destroy_audio_pipeline()
63  *
64  */
65 int _mmcamcorder_create_audio_pipeline(MMHandleType handle);
66
67 /**
68  * This function destroy audio pipeline.
69  *
70  * @param[in]   handle          Handle of camcorder.
71  * @return      void
72  * @remarks
73  * @see         _mmcamcorder_destroy_pipeline()
74  *
75  */
76 void _mmcamcorder_destroy_audio_pipeline(MMHandleType handle);
77
78 /**
79  * This function runs command for audio recording.
80  *
81  * @param[in]   handle          Handle of camcorder.
82  * @param[in]   command         audio recording command.
83  * @return      This function returns MM_ERROR_NONE on success, or others on failure.
84  * @remarks
85  * @see
86  *
87  */
88 int _mmcamcorder_audio_command(MMHandleType handle, int command);
89
90 /**
91  * This function handles EOS(end of stream) when audio recording is finished.
92  *
93  * @param[in]   handle          Handle of camcorder.
94  * @return      This function returns TRUE on success, or FALSE on failure.
95  * @remarks
96  * @see
97  *
98  */
99 int _mmcamcorder_audio_handle_eos(MMHandleType handle);
100
101 #ifdef __cplusplus
102 }
103 #endif
104 #endif /* __MM_CAMCORDER_AUDIOREC_H__ */