2 * Copyright (c) 2011 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.
17 #ifndef __TIZEN_MEDIA_CODEC_INI_H__
18 #define __TIZEN_MEDIA_CODEC_INI_H__
22 #include <media_codec.h>
29 #define MEDIA_CODEC_INI_DEFAULT_PATH SYSCONFDIR"/multimedia/mmfw_media_codec.ini"
30 #define MEDIA_CODEC_INI_MAX_STRLEN 256
31 #define DEFAULT_PORT "GST_PORT"
32 #define MEDIA_CODEC_MAX_CODEC_TYPE 100
33 #define MEDIA_CODEC_MAX_CODEC_ROLE 4
35 #define MEDICODEC_INI_MAX_ELEMENT 10
36 #define MEDIA_CODEC_MAX_VIDEO_CODEC 100
37 #define MEDIA_CODEC_MAX_AUDIO_CODEC 100
39 typedef struct _codec_list_t codec_list_t;
40 typedef struct _codec_info_t codec_info_t;
41 typedef struct _codec_t codec_t;
42 typedef struct _mc_ini_t mc_ini_t;
44 struct _codec_list_t {
45 gchar cname[MEDIA_CODEC_INI_MAX_STRLEN];
46 mediacodec_codec_type_e ctype;
55 struct _codec_info_t {
56 gchar name[MEDIA_CODEC_INI_MAX_STRLEN];
57 gchar mime[MEDIA_CODEC_INI_MAX_STRLEN];
58 gchar format[MEDIA_CODEC_INI_MAX_STRLEN];
63 codec_info_t codec_info[MEDIA_CODEC_MAX_CODEC_ROLE];
67 /* @ mark means the item has tested */
71 gint num_supported_codecs;
74 gchar port_name[MEDIA_CODEC_INI_MAX_STRLEN];
75 codec_t codec[MEDIA_CODEC_MAX_CODEC_TYPE];
78 /*Default sink ini values*/
81 /* NOTE : following content should be same with above default values */
82 /* FIXIT : need smarter way to generate default ini file. */
83 /* FIXIT : finally, it should be an external file */
84 #define MEDIA_CODEC_DEFAULT_INI \
88 ;Add general config parameters here\n\
94 ;media_codec_port = GST_PORT \n\
95 ;media_codec_port = FFMPEG_PORT \n\
96 ;media_codec_port = CUSTOM_PORT \n\
97 media_codec_port = GST_PORT \n\
101 ;Add gst port specific config paramters here\n\
106 ;Add custom port specific config paramters here\n\
112 extern mc_ini_t mc_ini;
114 int mc_ini_load(mc_ini_t *ini);
115 media_format_mimetype_e _mc_convert_media_format_str_to_int(char *sformat);
121 #endif /*__TIZEN_MEDIA_CODEC_INI_H__*/