Modify param to avoid build warning
[platform/core/api/mediacodec.git] / include / media_codec_ini.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
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
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16
17 #ifndef __TIZEN_MEDIA_CODEC_INI_H__
18 #define __TIZEN_MEDIA_CODEC_INI_H__
19
20 #include <glib.h>
21 #include <mm_types.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define MEDIA_CODEC_INI_DEFAULT_PATH   "/usr/etc/mmfw_media_codec.ini"
28 #define MEDIA_CODEC_INI_MAX_STRLEN     256
29 #define DEFAULT_PORT "GST_PORT"
30 #define MEDIA_CODEC_MAX_CODEC_TYPE 100
31 #define MEDIA_CODEC_MAX_CODEC_ROLE 4
32
33 #define MEDICODEC_INI_MAX_ELEMENT 10
34 #define MEDIA_CODEC_MAX_VIDEO_CODEC 100
35 #define MEDIA_CODEC_MAX_AUDIO_CODEC 100
36
37
38 typedef enum {
39     GST_PORT = 0,
40     FFMPEG_PORT,
41     CUSTOM_PORT,
42 } port_mode;
43
44 typedef struct {
45     gchar name[MEDIA_CODEC_INI_MAX_STRLEN];
46     gchar mime[MEDIA_CODEC_INI_MAX_STRLEN];
47     gchar format[MEDIA_CODEC_INI_MAX_STRLEN];
48 } codec_info_t;
49
50 typedef struct {
51     gint codec_id;
52     codec_info_t codec_info[MEDIA_CODEC_MAX_CODEC_ROLE];
53 } codec_t;
54
55
56 /* @ mark means the item has tested */
57 typedef struct __mc_ini {
58     port_mode port_type;
59     /* general */
60     gchar port_name[MEDIA_CODEC_INI_MAX_STRLEN];
61     codec_t  codec[MEDIA_CODEC_MAX_CODEC_TYPE];
62 } mc_ini_t;
63
64 /*Default sink ini values*/
65 /* General*/
66
67 /* NOTE : following content should be same with above default values */
68 /* FIXIT : need smarter way to generate default ini file. */
69 /* FIXIT : finally, it should be an external file */
70 #define MEDIA_CODEC_DEFAULT_INI \
71     "\
72 [general] \n\
73 \n\
74 ;Add general config parameters here\n\
75 \n\
76 \n\
77 \n\
78 [port_in_use] \n\
79 \n\
80 ;media_codec_port = GST_PORT \n\
81 ;media_codec_port = FFMPEG_PORT \n\
82 ;media_codec_port = CUSTOM_PORT \n\
83 media_codec_port = GST_PORT \n\
84 \n\
85 [gst_port] \n\
86 \n\
87 ;Add gst port specific config paramters here\n\
88 \n\
89 \n\
90 [custom_port] \n\
91 \n\
92 ;Add custom port specific config paramters here\n\
93 \n\
94 \n\
95 \n\
96 "
97
98 int mc_ini_load(mc_ini_t *ini);
99
100 #ifdef __cplusplus
101 }
102 #endif
103 #endif /*__TIZEN_MEDIA_CODEC_INI_H__*/