4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YeJin Cho <cho.yejin@samsung.com>, YoungHwan An <younghwan_.an@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_PLAYER_INI_H__
23 #define __MM_PLAYER_INI_H__
27 #include "mm_player_audioeffect.h"
34 #define MM_PLAYER_INI_DEFAULT_PATH "/usr/etc/mmfw_player.ini"
35 #define MM_PLAYER_INI_DEFAULT_AUDIOEFFECT_PATH "/usr/etc/mmfw_player_audio_effect.ini"
37 #define PLAYER_INI() mm_player_ini_get_structure()
39 #define PLAYER_INI_MAX_STRLEN 100
40 #define PLAYER_INI_MAX_PARAM_STRLEN 256
42 /* NOTE : MMPlayer has no initalizing API for library itself
43 * so we cannot decide when those ini values to be released.
44 * this is the reason of all string items are static array.
45 * make it do with malloc when MMPlayerInitialize() API created
46 * before that time, we should be careful with size limitation
47 * of each string item.
50 /* @ mark means the item has tested */
51 typedef struct __mm_player_ini
54 gboolean use_decodebin; // @
55 gchar videosink_element_x[PLAYER_INI_MAX_STRLEN];
56 gchar videosink_element_evas[PLAYER_INI_MAX_STRLEN];
57 gchar videosink_element_fake[PLAYER_INI_MAX_STRLEN];
58 gchar name_of_audiosink[PLAYER_INI_MAX_STRLEN]; // @
59 gchar name_of_drmsrc[PLAYER_INI_MAX_STRLEN]; // @
60 gchar name_of_video_converter[PLAYER_INI_MAX_STRLEN];
61 gboolean skip_rescan; // @
62 gboolean generate_dot; // @
63 gboolean provide_clock; // @
64 gint live_state_change_timeout; // @
65 gint localplayback_state_change_timeout; // @
66 gint delay_before_repeat;
68 gboolean multiple_codec_supported;
70 gchar gst_param[5][PLAYER_INI_MAX_PARAM_STRLEN]; // @
71 gchar exclude_element_keyword[10][PLAYER_INI_MAX_STRLEN];
73 gboolean disable_segtrap;
76 gchar name_of_audio_effect[PLAYER_INI_MAX_STRLEN];
78 gboolean use_audio_effect_preset;
79 gboolean audio_effect_preset_list[MM_AUDIO_EFFECT_PRESET_NUM];
80 gboolean audio_effect_preset_earphone_only_list[MM_AUDIO_EFFECT_PRESET_NUM];
82 gboolean use_audio_effect_custom;
83 gboolean audio_effect_custom_list[MM_AUDIO_EFFECT_CUSTOM_NUM];
84 gboolean audio_effect_custom_earphone_only_list[MM_AUDIO_EFFECT_CUSTOM_NUM];
85 gint audio_effect_custom_eq_band_num;
86 gint audio_effect_custom_eq_band_width[MM_AUDIO_EFFECT_EQ_BAND_NUM_MAX];
87 gint audio_effect_custom_eq_band_freq[MM_AUDIO_EFFECT_EQ_BAND_NUM_MAX];
88 gint audio_effect_custom_ext_num;
89 gint audio_effect_custom_min_level_list[MM_AUDIO_EFFECT_CUSTOM_NUM];
90 gint audio_effect_custom_max_level_list[MM_AUDIO_EFFECT_CUSTOM_NUM];
93 gchar name_of_httpsrc[PLAYER_INI_MAX_STRLEN]; // @
94 gchar http_file_buffer_path[PLAYER_INI_MAX_STRLEN];
95 gdouble http_buffering_limit;
96 guint http_max_size_bytes;
97 gdouble http_buffering_time;
101 gchar name_of_rtspsrc[PLAYER_INI_MAX_STRLEN]; // @
102 guint rtsp_buffering_time;
103 guint rtsp_rebuffering_time;
104 gboolean rtsp_do_typefinding;
105 gboolean rtsp_error_concealment; /* testing purpose */
108 /* default values if each values are not specified in inifile */
110 #define DEFAULT_USE_DECODEBIN FALSE
111 #define DEFAULT_AUDIO_EFFECT_ELEMENT ""
112 #define DEFAULT_USE_AUDIO_EFFECT_PRESET FALSE
113 #define DEFAULT_AUDIO_EFFECT_PRESET_LIST ""
114 #define DEFAULT_AUDIO_EFFECT_PRESET_LIST_EARPHONE_ONLY ""
115 #define DEFAULT_USE_AUDIO_EFFECT_CUSTOM FALSE
116 #define DEFAULT_AUDIO_EFFECT_CUSTOM_LIST ""
117 #define DEFAULT_AUDIO_EFFECT_CUSTOM_LIST_EARPHONE_ONLY ""
118 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EQ_BAND_NUM 0
119 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EQ_BAND_WIDTH ""
120 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EQ_BAND_FREQ ""
121 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EQ_MIN 0
122 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EQ_MAX 0
123 #define DEFAULT_AUDIO_EFFECT_CUSTOM_EXT_NUM 0
124 #define DEFAULT_USE_SINK_HANDLER TRUE
125 #define DEFAULT_SKIP_RESCAN TRUE
126 #define DEFAULT_GENERATE_DOT FALSE
127 #define DEFAULT_PROVIDE_CLOCK TRUE
128 #define DEFAULT_DELAY_BEFORE_REPEAT 50 /* msec */
129 #define DEFAULT_EOS_DELAY 150 /* msec */
130 #define DEFAULT_DRMSRC "drmsrc"
131 #define DEFAULT_VIDEOSINK_X "xvimagesink"
132 #define DEFAULT_VIDEOSINK_EVAS "evasimagesink"
133 #define DEFAULT_VIDEOSINK_FAKE "fakesink"
134 #define DEFAULT_AUDIOSINK "avsysaudiosink"
135 #define DEFAULT_GST_PARAM ""
136 #define DEFAULT_EXCLUDE_KEYWORD ""
137 #define DEFAULT_ASYNC_START TRUE
138 #define DEFAULT_DISABLE_SEGTRAP TRUE
139 #define DEFAULT_VIDEO_CONVERTER ""
140 #define DEFAULT_MULTIPLE_CODEC_SUPPORTED TRUE
141 #define DEFAULT_LIVE_STATE_CHANGE_TIMEOUT 30 /* sec */
142 #define DEFAULT_LOCALPLAYBACK_STATE_CHANGE_TIMEOUT 10 /* sec */
144 #define DEFAULT_HTTPSRC "souphttpsrc"
145 #define DEFAULT_HTTP_FILE_BUFFER_PATH ""
146 #define DEFAULT_HTTP_BUFFERING_LIMIT 99.0 /* percent */
147 #define DEFAULT_HTTP_MAX_SIZE_BYTES 1048576 /* bytes : 1 MBytes */
148 #define DEFAULT_HTTP_BUFFERING_TIME 3.0 /* sec */
149 #define DEFAULT_HTTP_TIMEOUT 30 /* sec */
151 #define DEFAULT_RTSPSRC "secrtspsrc"
152 #define DEFAULT_RTSP_BUFFERING 5000 /* msec */
153 #define DEFAULT_RTSP_REBUFFERING 15000 /* msec */
154 #define DEFAULT_RTSP_DO_TYPEFINDING FALSE
155 #define DEFAULT_RTSP_ERROR_CONCEALMENT TRUE
157 /* NOTE : following content should be same with above default values */
158 /* FIXIT : need smarter way to generate default ini file. */
159 /* FIXIT : finally, it should be an external file */
160 #define MM_PLAYER_DEFAULT_INI \
164 ; if disabled typefind element will used directely \n\
165 use decodebin = no ; async state change problem exist \n\
167 use sink handler = yes \n\
169 disable segtrap = yes ; same effect with --gst-disable-segtrap \n\
171 ; set default video sink but, it can be replaced with others selected by application\n\
172 ; 0:v4l2sink, 1:ximagesink, 2:xvimagesink, 3:fakesink 4:evasimagesink 5:glimagesink\n\
173 videosink element = 2 \n\
175 video converter element = \n\
177 audiosink element = avsysaudiosink \n\
179 drmsrc element = drmsrc \n\
181 ; if yes. gstreamer will not update registry \n\
182 skip rescan = yes \n\
184 delay before repeat = 50 ; msec\n\
186 ; comma separated list of tocken which elemnts has it in it's name will not be used \n\
187 element exclude keyword = \n\
189 async start = yes \n\
191 multiple codec supported = yes \n\
193 ; parameters for initializing gstreamer \n\
200 ; generating dot file representing pipeline state \n\
201 generate dot = no \n\
203 ; parameter for clock provide in audiosink \n\
204 provide clock = yes \n\
206 ; allowed timeout for changing pipeline state \n\
207 live state change timeout = 30 ; sec \n\
208 localplayback state change timeout = 4 ; sec \n\
210 ; delay in msec for sending EOS \n\
211 eos delay = 150 ; msec \n\
216 httppsrc element = souphttpsrc \n\
218 ; if set, use file or not use memory for buffering\n\
219 http file buffer path = /opt/media\n\
221 http buffering limit = 99 ; percent\n\
223 http max size bytes = 1048576 ; bytes\n\
225 http buffering time = 3.0 \n\
227 http timeout = 30 ; sec \n\
232 rtspsrc element = secrtspsrc \n\
234 rtsp buffering time = 5000; msec \n\
236 rtsp rebuffering time = 15000; msec \n\
238 rtsp do typefinding = no; if no, caps on rtspsrc:src pad will be used for autoplugging \n\
240 rtsp error concealment = yes \n\
246 mm_player_ini_load(void);
249 mm_player_ini_get_structure(void);