4 * Copyright (c) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, ByungWook Jang <bw.jang@samsung.com>,
7 * Manoj Kumar K <manojkumar.k@samsung.com>, Hyunil Park <hyunil46.park@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #ifndef __MM_WFD_SINK_INI_H__
24 #define __MM_WFD_SINK_INI_H__
32 /* NOTE : Wi-Fi Display Sink has no initalizing API for library itself
33 * so we cannot decide when those ini values to be released.
34 * this is the reason of all string items are static array.
35 * make it do with malloc when MMWFDSinkCreate() API created
36 * before that time, we should be careful with size limitation
37 * of each string item.
40 #define MM_WFD_SINK_INI_DEFAULT_PATH SYSCONFDIR"/multimedia/mmfw_wfd_sink.ini"
42 #define WFD_SINK_INI_MAX_STRLEN 256
43 #define WFD_SINK_INI_MAX_ELEMENT 10
48 guint video_native_resolution;
49 guint64 video_cea_support;
50 guint64 video_vesa_support;
51 guint64 video_hh_support;
55 gint video_vertical_resolution;
56 gint video_horizontal_resolution;
57 gint video_minimum_slicing;
58 gint video_slice_enc_param;
59 gint video_framerate_control_support;
60 gint video_non_transcoding_support;
67 guint audio_sampling_frequency;
72 guint audio_lpcm_mode;
79 guint video_native_resolution;
80 gint video_non_transcoding_support;
84 guint64 video_cea_support;
85 guint64 video_vesa_support;
86 guint64 video_hh_support;
90 gint video_vertical_resolution;
91 gint video_horizontal_resolution;
92 gint video_minimum_slicing;
93 gint video_slice_enc_param;
94 gint video_framerate_control_support;
99 gint hdcp_content_protection;
101 } WFDHDCPContentProtection;
103 typedef struct __mm_wfd_sink_ini {
105 gchar gst_param[5][WFD_SINK_INI_MAX_STRLEN];
106 gint state_change_timeout;
108 gint jitter_buffer_latency;
109 gint video_sink_max_lateness;
111 gboolean audio_sink_async;
112 gboolean video_sink_async;
113 gboolean enable_retransmission;
114 gboolean enable_reset_basetime;
115 gchar user_agent[WFD_SINK_INI_MAX_STRLEN];
118 gboolean generate_dot;
119 gboolean dump_rtsp_message;
120 gboolean trace_buffers;
121 gboolean trace_first_buffer;
122 gboolean trace_buffers_of_wfdsrc;
123 gboolean dump_ts_data;
124 gboolean dump_rtp_data;
127 gchar name_of_source[WFD_SINK_INI_MAX_STRLEN];
128 gchar name_of_tsdemux[WFD_SINK_INI_MAX_STRLEN];
129 gchar name_of_audio_hdcp[WFD_SINK_INI_MAX_STRLEN];
130 gchar name_of_aac_parser[WFD_SINK_INI_MAX_STRLEN];
131 gchar name_of_aac_decoder[WFD_SINK_INI_MAX_STRLEN];
132 gchar name_of_ac3_parser[WFD_SINK_INI_MAX_STRLEN];
133 gchar name_of_ac3_decoder[WFD_SINK_INI_MAX_STRLEN];
134 gchar name_of_lpcm_converter[WFD_SINK_INI_MAX_STRLEN];
135 gchar name_of_lpcm_filter[WFD_SINK_INI_MAX_STRLEN];
136 gchar name_of_audio_resampler[WFD_SINK_INI_MAX_STRLEN];
137 gchar name_of_audio_volume[WFD_SINK_INI_MAX_STRLEN];
138 gchar name_of_audio_sinkbin_queue[WFD_SINK_INI_MAX_STRLEN];
139 gchar name_of_audio_sink[WFD_SINK_INI_MAX_STRLEN];
140 gchar name_of_video_hdcp[WFD_SINK_INI_MAX_STRLEN];
141 gchar name_of_video_h264_parser[WFD_SINK_INI_MAX_STRLEN];
142 gchar name_of_video_h264_decoder[WFD_SINK_INI_MAX_STRLEN];
143 gchar name_of_video_h265_parser[WFD_SINK_INI_MAX_STRLEN];
144 gchar name_of_video_h265_decoder[WFD_SINK_INI_MAX_STRLEN];
145 gchar name_of_video_converter[WFD_SINK_INI_MAX_STRLEN];
146 gchar name_of_video_filter[WFD_SINK_INI_MAX_STRLEN];
147 gchar name_of_video_sink[WFD_SINK_INI_MAX_STRLEN];
148 gchar name_of_video_evas_sink[WFD_SINK_INI_MAX_STRLEN];
150 /* audio parameter for reponse of M3 request */
151 WFDAudioCodecs wfd_audio_codecs;
153 /* video parameter for reponse of M3 request */
154 WFDVideoFormats wfd_video_formats;
156 /* hdcp parameter for reponse of M3 request */
157 WFDHDCPContentProtection wfd_content_protection;
159 /* audio parameter for reponse of R2 M3 request */
160 WFD2AudioCodecs wfd2_audio_codecs;
162 /* video parameter for reponse of R2 M3 request */
163 WFD2VideoFormats wfd2_video_formats;
164 WFD2VideoCodecSpec wfd2_video_h264_info;
165 WFD2VideoCodecSpec wfd2_video_h265_info;
168 #define MM_WFD_SINK_DEFAULT_INI \
171 ; parameters for initializing gstreamer\n\
172 ; DEFAULT SET(--gst-debug=2, *wfd*:5)\n\
173 gstparam1 = --gst-debug=2, *wfd*:5, *wfdtsdemux:1, *wfdrtpbuffer:1\n\
179 ; generating dot file representing pipeline state\n\
180 ; do export GST_DEBUG_DUMP_DOT_DIR=[dot file path] in the shell\n\
183 ; enable pad probe\n\
184 enable pad probe = no\n\
186 ; enable wfdsrc inner pad probe\n\
187 enable wfdsrc pad probe = no\n\
189 ; enable ts data dump(eg. /var/tmp/*.ts)\n\
190 enable ts data dump = no\n\
192 ; allowed timeout for changing pipeline state\n\
193 state change timeout = 5 ; sec\n\
195 ; set debug property to wfdsrc plugin for debugging rtsp message\n\
196 set debug property = yes\n\
198 ; for asm function enable = yes, disable = no\n\
201 ; 0: default value set by wfdsrc element, other: user define value.\n\
202 jitter buffer latency=10\n\
204 ; for retransmission request enable = yes, disable = no\n\
205 enable retransmission = no\n\
207 ; for reset basetime, enable = yes, disable = no\n\
208 enable reset basetime = yes\n\
210 ; Maximum number of nanoseconds that a buffer can be late before it is dropped by videosink(-1 unlimited)\n\
211 video sink max lateness=20000000\n\
213 ; nanoseconds to be added to buffertimestamp by sink elements\n\
214 sink ts offset=150000000\n\
216 ; if no, go asynchronously to PAUSED without preroll \n\
217 audio sink async=no\n\
219 ; if no, go asynchronously to PAUSED without preroll \n\
220 video sink async=no\n\
223 user agent = TIZEN3_0/WFD-SINK\n\
229 wfdsrc element = wfdsrc\n\
231 tsdemux element = wfdtsdemux\n\
233 audio hdcp element = \n\
235 aac parser element = aacparse\n\
237 aac decoder element = avdec_aac\n\
239 ac3 parser element = ac3parse\n\
241 ac3 decoder element =\n\
243 lpcm converter element =\n\
245 lpcm filter element = capsfilter\n\
247 audio resampler element = audioconvert\n\
249 audio volume element =\n\
251 audio sinkbin queue element = queue\n\
253 audio sink element = pulsesink\n\
255 video hdcp element =\n\
257 video h264 parser element = h264parse\n\
259 video h265 parser element = \n\
261 video h264 decoder element = avdec_h264\n\
263 video h265 decoder element = \n\
265 video converter element =\n\
267 video filter element =\n\
269 video sink element = waylandsink\n\
273 [wfd audio codecs]\n\
274 ; 0x1: LPCM, 0x2: aac, 0x4: ac3\n\
275 ;default aac and LPCM\n\
280 ;0x1 : 48000khz, 0x2: 44100khz\n\
281 audio sampling frequency=0x3\n\
283 ; 0x1:2 channels, 0x2:4 channels, 0x4:6channels, 0x8:8channels\n\
284 audio channels=0x1\n\
288 [wfd video formats]\n\
289 ; 0: H264CBP 1: H264CHP\n\
292 video native resolution = 0x20\n\
294 video cea support=0x842b\n\
296 video vesa support=0x1\n\
298 video hh support=0x555\n\
300 ; 0x1:base, 0x2:high\n\
303 ; 0x1:level_3_1, 0x2:level_3_2, 0x4:level_4, 0x8:level_4_1, 0x10:level_4_2\n\
308 video vertical resolution=720\n\
310 video horizontal resolution=1280\n\
312 video minimum slicesize=0\n\
314 video slice encoding params=200\n\
316 video framerate control support=11\n\
320 [wfd hdcp content protection]\n\
321 ;0x0:none, 0x1:HDCP_2.0, 0x2:HDCP_2.1\n\
322 hdcp content protection=0x0\n\
329 mm_wfd_sink_ini_load(mm_wfd_sink_ini_t *ini, const char *path);
332 mm_wfd_sink_ini_unload(mm_wfd_sink_ini_t *ini);