c6f1e1e1e5edbcbd1734bff8ff87eca893871283
[platform/core/multimedia/libmm-common.git] / include / mm_types.h
1 /*
2  * libmm-common
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jonghyuk Choi <jhchoi.choi@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 /**
23  * This file declares common data structure of multimedia framework.
24  *
25  * @file                mm_types.h
26  * @author
27  * @version             1.0
28  * @brief               This file declares common data structure of multimedia framework.
29  */
30
31 /**
32         @addtogroup COMMON
33         @{
34  */
35
36 #ifndef __MM_TYPES_H__
37 #define __MM_TYPES_H__
38
39 #include <stdbool.h>
40
41
42 #ifdef __cplusplus
43         extern "C" {
44 #endif
45
46
47 #define MM_MAX_FILENAME_LEN     256                     /**< Maximum length of the file name */
48 #define MM_MAX_URL_LEN          2048    /**< Maximum length of the maximum URL */
49
50 /**
51  * @def Defines range of logical volume factor.
52  * It's for logical volume control in player.
53  * So, don't use this one for media volume.
54  * range : 0 ~ 1.0 (1.0 = 100%)
55  */
56 #define MM_VOLUME_LEVEL_MIN     0       /**< Minimum factor of volume */
57 #define MM_VOLUME_LEVEL_MAX     1.0     /**< Maximum factor of volume */
58
59 /**
60  * Multimedia Framework handle type.
61  */
62 typedef void *MMHandleType;             /**< Handle type */
63
64
65 /**
66  * Enumerations of video capture devices.
67  */
68 enum MMVideoDeviceType {
69         MM_VIDEO_DEVICE_NONE = -1,      /**< No camera */
70         MM_VIDEO_DEVICE_CAMERA0,        /**< Primary camera */
71         MM_VIDEO_DEVICE_CAMERA1,        /**< Secondary camera */
72         MM_VIDEO_DEVICE_CAMERA2,        /**< Third camera */
73         MM_VIDEO_DEVICE_CAMERA3,        /**< 4th camera */
74         MM_VIDEO_DEVICE_CAMERA4,        /**< 5th camera */
75         MM_VIDEO_DEVICE_CAMERA5,        /**< 6th camera */
76         MM_VIDEO_DEVICE_CAMERA6,        /**< 7th camera */
77         MM_VIDEO_DEVICE_CAMERA7,        /**< 8th camera */
78         MM_VIDEO_DEVICE_CAMERA8,        /**< 9th camera */
79         MM_VIDEO_DEVICE_CAMERA9,        /**< 10th camera */
80         MM_VIDEO_DEVICE_NUM,            /**< Number of video capture devices */
81 };
82
83 /**
84  * Enumerations of audio capture devices.
85  */
86 enum MMAudioDeviceType {
87         MM_AUDIO_DEVICE_MIC,    /**< Mic device */
88         MM_AUDIO_DEVICE_MODEM,  /**< Modem */
89         MM_AUDIO_DEVICE_RADIO,  /**< Radio */
90         MM_AUDIO_DEVICE_NUM,    /**< Number of audio capture devices */
91 };
92
93 /**
94  * Enumerations of display surfaces.
95  */
96 typedef enum {
97         MM_DISPLAY_SURFACE_OVERLAY,            /**< Overlay surface - default */
98         MM_DISPLAY_SURFACE_EVAS,               /**< Evas object surface */
99         MM_DISPLAY_SURFACE_GL,                 /**< GL surface */
100         MM_DISPLAY_SURFACE_NULL,               /**< This just disposes of buffers */
101         MM_DISPLAY_SURFACE_REMOTE,             /**< Daemon client surface */
102         MM_DISPLAY_SURFACE_NUM,                /**< number of enum */
103 } MMDisplaySurfaceType;
104
105 /**
106  * Enumerations of display modes.
107  */
108 enum MMDisplayModeType {
109         MM_DISPLAY_MODE_DEFAULT,                                        /**< default - primary display(UI+Video) + secondary display(UI+Video) if available */
110         MM_DISPLAY_MODE_PRI_VIDEO_ON_AND_SEC_VIDEO_FULL_SCREEN,         /**< primary display(UI+Video) + secondary display(Video Full Screen) if available */
111         MM_DISPLAY_MODE_PRI_VIDEO_OFF_AND_SEC_VIDEO_FULL_SCREEN,        /**< primary display(UI only) + secondary display(Video Full Screen) if available */
112         MM_DISPLAY_MODE_NUM,                                            /**< number of enum */
113 };
114
115 /**
116  * Enumerations of display devices.
117  */
118 enum MMDisplayDeviceType {
119         MM_DISPLAY_DEVICE_MAINLCD,             /**< Main LCD - default */
120         MM_DISPLAY_DEVICE_SUBLCD,              /**< Sub LCD */
121         MM_DISPLAY_DEVICE_TVOUT,               /**< TV out */
122         MM_DISPLAY_DEVICE_MAINLCD_AND_SUBLCD,  /**< Main LCD and Sub LCD */
123         MM_DISPLAY_DEVICE_MAINLCD_AND_TVOUT,   /**< Main LCD and TV */
124         MM_DISPLAY_DEVICE_NUM,                 /**< number of enum */
125 };
126
127 /**
128  * Enumerations of display scales.
129  */
130 enum MMDisplayScaleType {
131         MM_DISPLAY_SCALE_DEFAULT,               /**< Default size */
132         MM_DISPLAY_SCALE_DOUBLE_LENGTH, /**< Expand width, height to double size */
133         MM_DISPLAY_SCALE_TRIPLE_LENGTH, /**< Expand width, height to triple size */
134         MM_DISPLAY_SCALE_NUM,                   /**< Number of display scales */
135 };
136
137 /**
138  * Enumerations of storage.
139  */
140 enum MMStorageType {
141         MM_STORAGE_INTERNAL,                    /**< Internal storage */
142         MM_STORAGE_EXTERNAL,                    /**< External storage such as memory card */
143         MM_STORAGE_NUM,                                 /**< Number of storage type */
144 };
145
146 /**
147  * Enumerations for quality.
148  */
149 enum MMQualityType {
150         MM_QUALITY_LOW,         /**< Low quality */
151         MM_QUALITY_HIGH,        /**< High quality */
152         MM_QUALITY_NUM,         /**< Number of quality type */
153 };
154
155 /**
156  * Enumerations of channel type.
157  */
158 enum MMVolumeChannelType {
159         MM_VOLUME_CHANNEL_LEFT,         /**< Left channel */
160         MM_VOLUME_CHANNEL_RIGHT,                /**< Right channel */
161         MM_VOLUME_CHANNEL_NUM,          /**< Numbers of channels */
162         MM_CHANNEL_LEFT = MM_VOLUME_CHANNEL_LEFT,               /**< Left channel */
163         MM_CHANNEL_RIGHT = MM_VOLUME_CHANNEL_RIGHT,             /**< Right channel */
164         MM_CHANNEL_NUM = MM_VOLUME_CHANNEL_NUM,         /**< Numbers of channels */
165 };
166
167 /*
168  * Enumerations of SW Volume Gain.
169  */
170 enum MMSoftwareVolumeGainType {
171         MM_SOUND_VOLUME_GAIN_DEFAULT    = 0,            /**< Volume gain for Default */
172         MM_SOUND_VOLUME_GAIN_DIALER             = 1<<8,         /**< Volume gain for Dialer */
173         MM_SOUND_VOLUME_GAIN_TOUCH              = 2<<8,         /**< Volume gain for Touch */
174         MM_SOUND_VOLUME_GAIN_AF                 = 3<<8,         /**< Volume gain for AF */
175         MM_SOUND_VOLUME_GAIN_SHUTTER1   = 4<<8,         /**< Volume gain for Shutter1 */
176         MM_SOUND_VOLUME_GAIN_SHUTTER2   = 5<<8,         /**< Volume gain for Shutter2 */
177         MM_SOUND_VOLUME_GAIN_CAMCORDING = 6<<8,         /**< Volume gain for Camcording */
178         MM_SOUND_VOLUME_GAIN_MIDI               = 7<<8,         /**< Volume gain for Midi */
179         MM_SOUND_VOLUME_GAIN_BOOTING    = 8<<8,         /**< Volume gain for Booting */
180         MM_SOUND_VOLUME_GAIN_VIDEO              = 9<<8,         /**< Volume gain for Video */
181         MM_SOUND_VOLUME_GAIN_TTS                = 10<<8,        /**< Volume gain for TTS */
182         MM_SOUND_VOLUME_GAIN_NUM
183 };
184
185 #define MM_SOUND_PRIORITY_ALLOW_MIX     (0x80) /**< This define has deprecated */
186 /*
187  * Enumerations of Sound Priority.
188  */
189 enum MMSoundPriorityType {
190         MM_SOUND_PRIORITY_0,            /**< This enum has deprecated */
191         MM_SOUND_PRIORITY_1,            /**< This enum has deprecated */
192         MM_SOUND_PRIORITY_2,            /**< This enum has deprecated */
193         MM_SOUND_PRIORITY_3,            /**< This enum has deprecated */
194         MM_SOUND_PRIORITY_4,            /**< This enum has deprecated */
195         MM_SOUND_PRIORITY_5,            /**< This enum has deprecated */
196         MM_SOUND_PRIORITY_NUM,
197 };
198
199 /**
200  * Enumerations of video codec.
201  */
202 enum MMVideoCodecType {
203         MM_VIDEO_CODEC_INVALID = -1,    /**< Invalid codec type */
204         MM_VIDEO_CODEC_NONE,                    /**< None (will be deprecated) */
205         MM_VIDEO_CODEC_H263,                    /**< H263 codec         */
206         MM_VIDEO_CODEC_H264,                    /**< H264 codec         */
207         MM_VIDEO_CODEC_H26L,                    /**< H26L codec         */
208         MM_VIDEO_CODEC_MPEG4,                   /**< MPEG4 codec        */
209         MM_VIDEO_CODEC_MPEG1,                   /**< MPEG1 codec        */
210         MM_VIDEO_CODEC_WMV,                     /**< WMV codec          */
211         MM_VIDEO_CODEC_DIVX,                    /**< DIVX codec         */
212         MM_VIDEO_CODEC_XVID,                    /**< XVID codec         */
213         MM_VIDEO_CODEC_H261,                            /**< H261 codec                                                                         */
214         MM_VIDEO_CODEC_H262,                            /**< H262/MPEG2-part2 codec                                                     */
215         MM_VIDEO_CODEC_H263V2,                          /**< H263v2 codec                                                                       */
216         MM_VIDEO_CODEC_H263V3,                          /**< H263v3 codec                                                                       */
217         MM_VIDEO_CODEC_MJPEG,                           /**< Motion JPEG Video codec                                            */
218         MM_VIDEO_CODEC_MPEG2,                           /**< MPEG2 codec                                                                        */
219         MM_VIDEO_CODEC_MPEG4_SIMPLE,        /**< MPEG4 part-2 Simple profile codec                              */
220         MM_VIDEO_CODEC_MPEG4_ADV_SIMPLE,    /**< MPEG4 part-2 Advanced Simple profile codec             */
221         MM_VIDEO_CODEC_MPEG4_MAIN,                      /**< MPEG4 part-2 Main profile codec                            */
222         MM_VIDEO_CODEC_MPEG4_CORE,                      /**< MPEG4 part-2 Core profile codec                            */
223         MM_VIDEO_CODEC_MPEG4_ACE,                       /**< MPEG4 part-2 Adv Coding Eff profile codec          */
224         MM_VIDEO_CODEC_MPEG4_ARTS,                      /**< MPEG4 part-2 Adv RealTime Simple profile codec     */
225         MM_VIDEO_CODEC_MPEG4_AVC,                       /**< MPEG4 part-10 (h.264) codec                                        */
226         MM_VIDEO_CODEC_REAL,                            /**< Real video                                                                         */
227         MM_VIDEO_CODEC_VC1,                                     /**< VC-1 video                                                                         */
228         MM_VIDEO_CODEC_AVS,                                     /**< AVS video                                                                          */
229         MM_VIDEO_CODEC_CINEPAK,                         /**< Cinepak video      codec                                                   */
230         MM_VIDEO_CODEC_INDEO,                           /**< Indeo video        codec                                                   */
231         MM_VIDEO_CODEC_THEORA,                          /**< Theora video       codec                                                   */
232         MM_VIDEO_CODEC_FLV,                                     /**< Adobe Flash Video  codec                                           */
233         MM_VIDEO_CODEC_AV1,                                     /**< AOMedia Video 1    codec                                           */
234         MM_VIDEO_CODEC_NUM,                                     /**< Number of video codec type */
235 };
236
237 /**
238  * Enumerations of audio codec.
239  */
240 enum MMAudioCodecType {
241         MM_AUDIO_CODEC_INVALID = -1,    /**< Invalid codec type */
242         MM_AUDIO_CODEC_AMR,                     /**< AMR codec          */
243         MM_AUDIO_CODEC_G723_1,                  /**< G723.1 codec       */
244         MM_AUDIO_CODEC_MP3,                     /**< MP3 codec          */
245         MM_AUDIO_CODEC_OGG,                     /**< OGG codec          */
246         MM_AUDIO_CODEC_AAC,                     /**< AAC codec          */
247         MM_AUDIO_CODEC_WMA,                     /**< WMA codec          */
248         MM_AUDIO_CODEC_MMF,                     /**< MMF codec          */
249         MM_AUDIO_CODEC_ADPCM,                   /**< ADPCM codec        */
250         MM_AUDIO_CODEC_WAVE,                    /**< WAVE codec         */
251         MM_AUDIO_CODEC_WAVE_NEW,                        /**< WAVE codec         */
252         MM_AUDIO_CODEC_MIDI,                    /**< MIDI codec         */
253         MM_AUDIO_CODEC_IMELODY,         /**< IMELODY codec      */
254         MM_AUDIO_CODEC_MXMF,
255         MM_AUDIO_CODEC_MPA,                     /**< MPEG1-Layer1 codec                                         */
256         MM_AUDIO_CODEC_MP2,                     /**< MPEG1-Layer2 codec                                         */
257         MM_AUDIO_CODEC_G711,            /**< G711 codec                                                         */
258         MM_AUDIO_CODEC_G722,            /**< G722 wideband speech codec                         */
259         MM_AUDIO_CODEC_G722_1,          /**< G722.1 codec                                                       */
260         MM_AUDIO_CODEC_G722_2,          /**< G722.2  (AMR-WB) codec                                     */
261         MM_AUDIO_CODEC_G723,            /**< G723 wideband speech codec                         */
262         MM_AUDIO_CODEC_G726,            /**< G726 (ADPCM) codec                                         */
263         MM_AUDIO_CODEC_G728,            /**< G728 speech codec                                          */
264         MM_AUDIO_CODEC_G729,            /**< G729 codec                                                         */
265         MM_AUDIO_CODEC_G729A,           /**< G729a codec                                                        */
266         MM_AUDIO_CODEC_G729_1,          /**< G729.1 codec                                                       */
267         MM_AUDIO_CODEC_REAL,            /**< Real audio                                                         */
268         MM_AUDIO_CODEC_AAC_LC,          /**< AAC-Low complexity codec                           */
269         MM_AUDIO_CODEC_AAC_MAIN,        /**< AAC-Main profile codec                                     */
270         MM_AUDIO_CODEC_AAC_SRS,         /**< AAC-Scalable sample rate codec                     */
271         MM_AUDIO_CODEC_AAC_LTP,         /**< AAC-Long term prediction codec                     */
272         MM_AUDIO_CODEC_AAC_HE_V1,       /**< AAC-High Efficiency v1 codec                       */
273         MM_AUDIO_CODEC_AAC_HE_V2,       /**< AAC-High efficiency v2 codec                       */
274         MM_AUDIO_CODEC_AC3,                     /**< DolbyDigital codec                                         */
275         MM_AUDIO_CODEC_ALAC,            /**< Apple Lossless audio codec                         */
276         MM_AUDIO_CODEC_ATRAC,           /**< Sony proprietary audio codec                       */
277         MM_AUDIO_CODEC_SPEEX,           /**< SPEEX audio codec                                          */
278         MM_AUDIO_CODEC_VORBIS,          /**< Vorbis audio codec                                         */
279         MM_AUDIO_CODEC_AIFF,        /**< AIFF codec                                                             */
280         MM_AUDIO_CODEC_AU,              /**< AU codec                                                           */
281         MM_AUDIO_CODEC_NONE,                    /**< None (will be deprecated) */
282         MM_AUDIO_CODEC_PCM,                     /**< PCM codec */
283         MM_AUDIO_CODEC_ALAW,                    /**< ALAW codec */
284         MM_AUDIO_CODEC_MULAW,                   /**< MULAW codec */
285         MM_AUDIO_CODEC_MS_ADPCM,        /**< MS ADPCM codec */
286         MM_AUDIO_CODEC_FLAC,                    /**< Free Lossless audio codec                          */
287         MM_AUDIO_CODEC_NUM,                     /**< Number of audio codec type */
288 };
289
290 /**
291  * Enumerations of image codec.
292  */
293 enum MMImageCodecType {
294         MM_IMAGE_CODEC_INVALID = -1,/**< Invalid codec type */
295         MM_IMAGE_CODEC_JPEG,        /**< JPEG codec */
296         MM_IMAGE_CODEC_PNG,         /**< PNG codec              */
297         MM_IMAGE_CODEC_BMP,         /**< BMP codec              */
298         MM_IMAGE_CODEC_WBMP,        /**< WBMP codec             */
299         MM_IMAGE_CODEC_TIFF,        /**< TIFF codec             */
300         MM_IMAGE_CODEC_PCX,         /**< PCX codec              */
301         MM_IMAGE_CODEC_GIF,         /**< GIF codec              */
302         MM_IMAGE_CODEC_ICO,         /**< ICO codec              */
303         MM_IMAGE_CODEC_RAS,         /**< RAS codec              */
304         MM_IMAGE_CODEC_TGA,         /**< TGA codec              */
305         MM_IMAGE_CODEC_XBM,         /**< XBM codec              */
306         MM_IMAGE_CODEC_XPM,         /**< XPM codec              */
307         MM_IMAGE_CODEC_SRW,         /**< SRW (Samsung standard RAW) */
308         MM_IMAGE_CODEC_JPEG_SRW,    /**< JPEG + SRW */
309         MM_IMAGE_CODEC_NUM,         /**< Number of image codecs */
310 };
311
312 /**
313  * Enumerations of file container format.
314  */
315 enum MMFileFormatType {
316         MM_FILE_FORMAT_INVALID = -1,    /**< Invalid file format */
317         MM_FILE_FORMAT_3GP,                     /**< 3GP file format */
318         MM_FILE_FORMAT_ASF,                     /**< Advanced Systems File file format */
319         MM_FILE_FORMAT_AVI,                     /**< Audio Video Interleaved file format */
320         MM_FILE_FORMAT_MATROSKA,        /**< MATROSAK file format */
321         MM_FILE_FORMAT_MP4,                     /**< MP4 file format */
322         MM_FILE_FORMAT_OGG,                     /**< OGG file format */
323         MM_FILE_FORMAT_NUT,                     /**< NUT file format */
324         MM_FILE_FORMAT_QT,                      /**< MOV file format */
325         MM_FILE_FORMAT_REAL,            /**< RealMedia file format */
326         MM_FILE_FORMAT_AMR,                     /**< AMR file format */
327         MM_FILE_FORMAT_AAC,                     /**< AAC file format */
328         MM_FILE_FORMAT_MP3,                     /**< MP3 file format */
329         MM_FILE_FORMAT_AIFF,            /**< AIFF file format */
330         MM_FILE_FORMAT_AU,                      /**< Audio file format */
331         MM_FILE_FORMAT_WAV,                     /**< WAV file format */
332         MM_FILE_FORMAT_MID,                     /**< MID file format */
333         MM_FILE_FORMAT_MMF,                     /**< MMF file format */
334         MM_FILE_FORMAT_DIVX,            /**< DivX file format */
335         MM_FILE_FORMAT_FLV,                     /**< Flash video file format */
336         MM_FILE_FORMAT_VOB,                     /**< DVD-Video Object file format */
337         MM_FILE_FORMAT_IMELODY,         /**< IMelody file format */
338         MM_FILE_FORMAT_WMA,             /**< WMA file format */
339         MM_FILE_FORMAT_WMV,             /**< WMV file format */
340         MM_FILE_FORMAT_JPG,             /**< JPEG file format */
341         MM_FILE_FORMAT_FLAC,            /**< FLAC file format */
342         MM_FILE_FORMAT_M2TS,            /**< MPEG2-Transport Stream file format */
343         MM_FILE_FORMAT_M2PS,                    /**< MPEG2-Program Stream file format */
344         MM_FILE_FORMAT_M1VIDEO,         /**< MPEG1-Video file format */
345         MM_FILE_FORMAT_M1AUDIO,         /**< MPEG1-Audio file format */
346         MM_FILE_FORMAT_APE,             /**< APE file format */
347         MM_FILE_FORMAT_NUM,             /**< Number of file format type */
348 };
349
350 /**
351  * Enumerations of display layers.
352  */
353 typedef enum {
354         MM_VIDEO_LAYER_PRIMARY,         /**< Primary of the video layer */
355         MM_VIDEO_LAYER_OVERLAY,         /**< Overlay of the video layer */
356         MM_VIDEO_LAYER_NUM              /**< Number of the video layer */
357 } MMVideoLayerType;
358
359 /**
360  * Enumerations of Pixel formats
361  */
362 typedef enum {
363         MM_PIXEL_FORMAT_INVALID = -1,   /**< Invalid pixel format */
364         MM_PIXEL_FORMAT_NV12,           /**< NV12 pixel format */
365         MM_PIXEL_FORMAT_NV12T,          /**< NV12 Tiled pixel format */
366         MM_PIXEL_FORMAT_NV16,           /**< NV16 pixel format */
367         MM_PIXEL_FORMAT_NV21,           /**< NV21 pixel format */
368         MM_PIXEL_FORMAT_YUYV,           /**< YUYV(YUY2) pixel format */
369         MM_PIXEL_FORMAT_UYVY,           /**< UYVY pixel format */
370         MM_PIXEL_FORMAT_422P,           /**< YUV422(Y:U:V) planar pixel format */
371         MM_PIXEL_FORMAT_I420,           /**< I420 pixel format */
372         MM_PIXEL_FORMAT_YV12,           /**< YV12 pixel format */
373         MM_PIXEL_FORMAT_RGB565,         /**< RGB565 pixel format */
374         MM_PIXEL_FORMAT_RGB888,         /**< RGB888 pixel format */
375         MM_PIXEL_FORMAT_RGBA,           /**< RGBA pixel format */
376         MM_PIXEL_FORMAT_ARGB,           /**< ARGB pixel format */
377         MM_PIXEL_FORMAT_ENCODED,        /**< Encoded pixel format : JPEG */
378         MM_PIXEL_FORMAT_ITLV_JPEG_UYVY, /**< FIXME: JPEG+UYVY Interleaved format */
379         MM_PIXEL_FORMAT_ENCODED_H264,   /**< Encoded pixel format : H.264 */
380         MM_PIXEL_FORMAT_INVZ,           /**< Depth pixel format : INVZ */
381         MM_PIXEL_FORMAT_ENCODED_MJPEG,  /**< Encoded pixel format : MJPEG */
382         MM_PIXEL_FORMAT_ENCODED_VP8,    /**< Encoded pixel format : VP8 */
383         MM_PIXEL_FORMAT_ENCODED_VP9,    /**< Encoded pixel format : VP9 */
384         MM_PIXEL_FORMAT_NUM             /**< Number of the pixel format */
385 } MMPixelFormatType;
386
387 /**
388  * Enumerations of video input rotation type.
389  */
390 typedef enum {
391         MM_VIDEO_INPUT_ROTATION_NONE,   /**< No rotation of the display */
392         MM_VIDEO_INPUT_ROTATION_90,             /**< 90 degree rotation */
393         MM_VIDEO_INPUT_ROTATION_180,    /**< 180 degree rotation */
394         MM_VIDEO_INPUT_ROTATION_270,    /**< 270 degree rotation */
395         MM_VIDEO_INPUT_ROTATION_NUM             /**< Number of the rotation */
396 } MMVideoInputRotationType;
397
398 /**
399  * Enumerations of display rotation type.
400  */
401 typedef enum {
402         MM_DISPLAY_ROTATION_NONE,       /**< No rotation of the display */
403         MM_DISPLAY_ROTATION_90,         /**< 90 degree rotation */
404         MM_DISPLAY_ROTATION_180,        /**< 180 degree rotation */
405         MM_DISPLAY_ROTATION_270,        /**< 270 degree rotation */
406         MM_DISPLAY_ROTATION_NUM         /**< Number of the rotation */
407 } MMDisplayRotationType;
408
409 /**
410  * Enumerations of flip type.
411  */
412 typedef enum {
413         MM_FLIP_NONE,                   /**< No Flip */
414         MM_FLIP_HORIZONTAL,             /**< Horizontal flip */
415         MM_FLIP_VERTICAL,               /**< Vertical flip */
416         MM_FLIP_BOTH,                   /**< Horizontal and Vertical flip */
417         MM_FLIP_NUM                     /**< Number of flip */
418 } MMFlipType;
419
420 /**
421  * Enumerations of streaming type.
422  */
423 typedef enum {
424         STREAMING_SERVICE_VOD,                  /**< Streaming is vod */
425         STREAMING_SERVICE_LIVE,                 /**< Streaming is live stream */
426         STREAMING_SERVICE_NONE,                 /**< Not an streaming */
427         STREAMING_SERVICE_NUM,                  /**< Number of the streaming type */
428 } MMStreamingType;
429
430 /**
431  * Resolution
432  */
433 typedef struct {
434         int width;              /**< width */
435         int height;             /**< height */
436 } MMResolutionType;
437
438 /**
439  * Type definition of rectangle.
440  * This will be deprecated.
441  */
442 typedef struct {
443         int x;          /**< Start x point */
444         int y;          /**< Start y point */
445         int width;      /**< width */
446         int height;     /**< height */
447 } MMRectType;
448
449 #define BT_ADDR_LEN 18          /**< Length of BT address */
450 /**
451  * bluetooth information.
452  */
453 typedef struct {
454         int mode;                                               /**< BT enable/disable */
455         char addr[BT_ADDR_LEN];                 /**< BT device address */
456 } MMBluetoothType;
457
458
459 /**
460  * Enumerations of bluetooth mode
461  */
462 enum MMBluetoothMode {
463         MM_BLUETOOTH_DISABLE = 0,
464         MM_BLUETOOTH_ENABLE
465 };
466
467 /*
468  * Enumerations of sound path policy
469  */
470 enum MMAudioRoutePolicy {
471         MM_AUDIOROUTE_USE_EXTERNAL_SETTING = -1,
472         MM_AUDIOROUTE_PLAYBACK_NORMAL,
473         MM_AUDIOROUTE_PLAYBACK_ALERT,
474         MM_AUDIOROUTE_PLAYBACK_HEADSET_ONLY,
475         MM_AUDIOROUTE_CAPTURE_NORMAL = 0,
476         MM_AUDIOROUTE_CAPTURE_MAINMIC_ONLY,
477         MM_AUDIOROUTE_CAPTURE_STEREOMIC_ONLY,
478 };
479
480 /*
481  * Enumerations of display geometry method
482  */
483 typedef enum  {
484         MM_DISPLAY_METHOD_LETTER_BOX = 0,
485         MM_DISPLAY_METHOD_ORIGIN_SIZE,
486         MM_DISPLAY_METHOD_FULL_SCREEN,
487         MM_DISPLAY_METHOD_CROPPED_FULL,
488         MM_DISPLAY_METHOD_ORIGIN_OR_LETTER,
489         MM_DISPLAY_METHOD_CUSTOM_ROI,
490         MM_DISPLAY_METHOD_NUM
491 } MMDisplayGeometryMethod;
492
493 /*
494  * Enumerations of ROI mode of display geometry method
495  */
496 typedef enum  {
497         MM_DISPLAY_METHOD_CUSTOM_ROI_FULL_SCREEN = 0,
498         MM_DISPLAY_METHOD_CUSTOM_ROI_LETER_BOX
499 } MMDisplayGeometryMethodRoiMode;
500
501
502 #define MM_VIDEO_BUFFER_PLANE_MAX   4   /**< Max num of video buffer plane */
503 /*
504  * Enumerations of multimedia video buffer type
505  */
506 typedef enum {
507         MM_VIDEO_BUFFER_TYPE_PHYSICAL_ADDRESS = 0,
508         MM_VIDEO_BUFFER_TYPE_DMABUF_FD,
509         MM_VIDEO_BUFFER_TYPE_TBM_BO
510 } MMVideoBufferType;
511
512 typedef struct {
513         void *paddr[MM_VIDEO_BUFFER_PLANE_MAX];         /**< physical address */
514         int dmabuf_fd[MM_VIDEO_BUFFER_PLANE_MAX];       /**< dmabuf fd */
515         void *bo[MM_VIDEO_BUFFER_PLANE_MAX];            /**< TBM bo */
516 } MMVideoBufferHandle;
517
518 /*
519  * Type definition of multimedia video buffer
520  */
521 typedef struct {
522         MMVideoBufferType type;                                 /**< buffer type
523                                                                                                                                 - The field of handle that type indicates should be filled,
524                                                                                                                                   and other fields of handle are optional. */
525         MMPixelFormatType format;                               /**< buffer type */
526         int plane_num;                                          /**< number of planes */
527         int width[MM_VIDEO_BUFFER_PLANE_MAX];                   /**< width of buffer */
528         int height[MM_VIDEO_BUFFER_PLANE_MAX];                  /**< height of buffer */
529         int stride_width[MM_VIDEO_BUFFER_PLANE_MAX];            /**< stride width of buffer */
530         int stride_height[MM_VIDEO_BUFFER_PLANE_MAX];           /**< stride height of buffer */
531         int size[MM_VIDEO_BUFFER_PLANE_MAX];                    /**< size of planes */
532         void *data[MM_VIDEO_BUFFER_PLANE_MAX];                  /**< data pointer(user address) of planes */
533         int handle_num;                                         /**< number of buffer handle */
534         int handle_size[MM_VIDEO_BUFFER_PLANE_MAX];             /**< size of handles */
535         MMVideoBufferHandle handle;                             /**< handle of buffer */
536         int is_secured;                                         /**< secured buffer flag. ex) TrustZone memory, user can not access it. */
537         int flush_request;                                      /**< flush request flag
538                                                                                                                                 - If this flag is TRUE, sink element will make copy of last buffer,
539                                                                                                                                   and it will return all buffers from src element.
540                                                                                                                                   Then, src element can restart without changing pipeline state. */
541         MMRectType crop;                                        /**< crop information of buffer */
542 } MMVideoBuffer;
543
544
545 #ifdef __cplusplus
546         }
547 #endif
548
549
550 #endif  /* __MM_TYPES_H__ */