14 channel_layout=311=311
20 TestContext AVOptions:
21 -num <int> E....... set num (from 0 to 100) (default 0)
22 -toggle <int> E....... set toggle (from 0 to 1) (default 1)
23 -rational <rational> E....... set rational (from 0 to 10) (default 1/1)
24 -string <string> E....... set string (default "default")
25 -escape <string> E....... set escape str (default "\=,")
26 -flags <flags> E....... set flags (default cool)
27 cool E....... set cool flag
28 lame E....... set lame flag
29 mu E....... set mu flag
30 -size <image_size> E....... set size (default "200x300")
31 -pix_fmt <pix_fmt> E....... set pixfmt (default 0bgr)
32 -sample_fmt <sample_fmt> E....... set samplefmt (default s16)
33 -video_rate <video_rate> E....... set videorate (default "25")
34 -duration <duration> E....... set duration (default 0.001)
35 -color <color> E....... set color (default "pink")
36 -cl <channel_layout> E....... set channel layout (default 0x137)
37 -bin <binary> E....... set binary value
38 -bin1 <binary> E....... set binary value
39 -bin2 <binary> E....... set binary value
40 -num64 <int64> E....... set num 64bit (from 0 to 100) (default 1)
41 -flt <float> E....... set float (from 0 to 100) (default 0.333333)
42 -dbl <double> E....... set double (from 0 to 100) (default 0.333333)
43 -bool1 <boolean> E....... set boolean value (default auto)
44 -bool2 <boolean> E....... set boolean value (default true)
45 -bool3 <boolean> E....... set boolean value (default false)
47 Testing av_opt_is_set_to_default()
48 name: num default:1 error:
49 name: toggle default:0 error:
50 name: rational default:0 error:
51 name: string default:0 error:
52 name: escape default:0 error:
53 name: flags default:0 error:
54 name: cool default:1 error:Option not found
55 name: lame default:1 error:Option not found
56 name: mu default:1 error:Option not found
57 name: size default:0 error:
58 name: pix_fmt default:0 error:
59 name:sample_fmt default:0 error:
60 name:video_rate default:0 error:
61 name: duration default:0 error:
62 name: color default:0 error:
63 name: cl default:0 error:
64 name: bin default:0 error:
65 name: bin1 default:1 error:
66 name: bin2 default:1 error:
67 name: num64 default:0 error:
68 name: flt default:0 error:
69 name: dbl default:0 error:
70 name: bool1 default:0 error:
71 name: bool2 default:0 error:
72 name: bool3 default:1 error:
73 name: num default:1 error:
74 name: toggle default:1 error:
75 name: rational default:1 error:
76 name: string default:1 error:
77 name: escape default:1 error:
78 name: flags default:1 error:
79 name: cool default:1 error:Option not found
80 name: lame default:1 error:Option not found
81 name: mu default:1 error:Option not found
82 name: size default:1 error:
83 name: pix_fmt default:1 error:
84 name:sample_fmt default:1 error:
85 name:video_rate default:1 error:
86 name: duration default:1 error:
87 name: color default:1 error:
88 name: cl default:1 error:
89 name: bin default:1 error:
90 name: bin1 default:1 error:
91 name: bin2 default:1 error:
92 name: num64 default:1 error:
93 name: flt default:1 error:
94 name: dbl default:1 error:
95 name: bool1 default:1 error:
96 name: bool2 default:1 error:
97 name: bool3 default:1 error:
99 Test av_opt_serialize()
100 num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
101 Setting entry with key 'num' to value '0'
102 Setting entry with key 'toggle' to value '1'
103 Setting entry with key 'rational' to value '1/1'
104 Setting entry with key 'string' to value 'default'
105 Setting entry with key 'escape' to value '\=,'
106 Setting entry with key 'flags' to value '0x00000001'
107 Setting entry with key 'size' to value '200x300'
108 Setting entry with key 'pix_fmt' to value '0bgr'
109 Setting entry with key 'sample_fmt' to value 's16'
110 Setting entry with key 'video_rate' to value '25/1'
111 Setting entry with key 'duration' to value '0.001'
112 Setting entry with key 'color' to value '0xffc0cbff'
113 Setting entry with key 'cl' to value '0x137'
114 Setting entry with key 'bin' to value '62696E00'
115 Setting entry with key 'bin1' to value ''
116 Setting entry with key 'bin2' to value ''
117 Setting entry with key 'num64' to value '1'
118 Setting entry with key 'flt' to value '0.333333'
119 Setting entry with key 'dbl' to value '0.333333'
120 Setting entry with key 'bool1' to value 'auto'
121 Setting entry with key 'bool2' to value 'true'
122 Setting entry with key 'bool3' to value 'false'
123 num=0,toggle=1,rational=1/1,string=default,escape=\\\=\,,flags=0x00000001,size=200x300,pix_fmt=0bgr,sample_fmt=s16,video_rate=25/1,duration=0.001,color=0xffc0cbff,cl=0x137,bin=62696E00,bin1=,bin2=,num64=1,flt=0.333333,dbl=0.333333,bool1=auto,bool2=true,bool3=false
125 Testing av_set_options_string()
126 Setting options string ''
128 Setting options string ':'
129 Missing key or no key/value separator found after key ':'
131 Setting options string '='
132 Missing key or no key/value separator found after key ''
134 Setting options string 'foo=:'
135 Setting entry with key 'foo' to value ''
138 Setting options string ':=foo'
139 Setting entry with key ':' to value 'foo'
142 Setting options string '=foo'
143 Missing key or no key/value separator found after key ''
145 Setting options string 'foo='
146 Setting entry with key 'foo' to value ''
149 Setting options string 'foo'
150 Missing key or no key/value separator found after key 'foo'
152 Setting options string 'foo=val'
153 Setting entry with key 'foo' to value 'val'
156 Setting options string 'foo==val'
157 Setting entry with key 'foo' to value '=val'
160 Setting options string 'toggle=:'
161 Setting entry with key 'toggle' to value ''
162 Undefined constant or missing '(' in ''
163 Unable to parse option value ""
165 Setting options string 'string=:'
166 Setting entry with key 'string' to value ''
168 Setting options string 'toggle=1 : foo'
169 Setting entry with key 'toggle' to value '1'
170 Missing key or no key/value separator found after key 'foo'
171 Error 'toggle=1 : foo'
172 Setting options string 'toggle=100'
173 Setting entry with key 'toggle' to value '100'
174 Value 100.000000 for parameter 'toggle' out of range [0 - 1]
176 Setting options string 'toggle==1'
177 Setting entry with key 'toggle' to value '=1'
178 Undefined constant or missing '(' in '=1'
179 Unable to parse option value "=1"
181 Setting options string 'flags=+mu-lame : num=42: toggle=0'
182 Setting entry with key 'flags' to value '+mu-lame'
183 Setting entry with key 'num' to value '42'
184 Setting entry with key 'toggle' to value '0'
185 OK 'flags=+mu-lame : num=42: toggle=0'
186 Setting options string 'num=42 : string=blahblah'
187 Setting entry with key 'num' to value '42'
188 Setting entry with key 'string' to value 'blahblah'
189 OK 'num=42 : string=blahblah'
190 Setting options string 'rational=0 : rational=1/2 : rational=1/-1'
191 Setting entry with key 'rational' to value '0'
192 Setting entry with key 'rational' to value '1/2'
193 Setting entry with key 'rational' to value '1/-1'
194 Value -1.000000 for parameter 'rational' out of range [0 - 10]
195 Value -1.000000 for parameter 'rational' out of range [0 - 10]
196 Error 'rational=0 : rational=1/2 : rational=1/-1'
197 Setting options string 'rational=-1/0'
198 Error 'rational=-1/0'
199 Setting options string 'size=1024x768'
200 Setting entry with key 'size' to value '1024x768'
202 Setting options string 'size=pal'
203 Setting entry with key 'size' to value 'pal'
205 Setting options string 'size=bogus'
206 Setting entry with key 'size' to value 'bogus'
207 Unable to parse option value "bogus" as image size
209 Setting options string 'pix_fmt=yuv420p'
210 Setting entry with key 'pix_fmt' to value 'yuv420p'
212 Setting options string 'pix_fmt=2'
213 Setting entry with key 'pix_fmt' to value '2'
215 Setting options string 'pix_fmt=bogus'
216 Setting entry with key 'pix_fmt' to value 'bogus'
217 Unable to parse option value "bogus" as pixel format
218 Error 'pix_fmt=bogus'
219 Setting options string 'sample_fmt=s16'
220 Setting entry with key 'sample_fmt' to value 's16'
222 Setting options string 'sample_fmt=2'
223 Setting entry with key 'sample_fmt' to value '2'
225 Setting options string 'sample_fmt=bogus'
226 Setting entry with key 'sample_fmt' to value 'bogus'
227 Unable to parse option value "bogus" as sample format
228 Error 'sample_fmt=bogus'
229 Setting options string 'video_rate=pal'
230 Setting entry with key 'video_rate' to value 'pal'
232 Setting options string 'video_rate=25'
233 Setting entry with key 'video_rate' to value '25'
235 Setting options string 'video_rate=30000/1001'
236 Setting entry with key 'video_rate' to value '30000/1001'
237 OK 'video_rate=30000/1001'
238 Setting options string 'video_rate=30/1.001'
239 Setting entry with key 'video_rate' to value '30/1.001'
240 OK 'video_rate=30/1.001'
241 Setting options string 'video_rate=bogus'
242 Setting entry with key 'video_rate' to value 'bogus'
243 Undefined constant or missing '(' in 'bogus'
244 Unable to parse option value "bogus" as video rate
245 Error 'video_rate=bogus'
246 Setting options string 'duration=bogus'
247 Setting entry with key 'duration' to value 'bogus'
248 Unable to parse option value "bogus" as duration
249 Error 'duration=bogus'
250 Setting options string 'duration=123.45'
251 Setting entry with key 'duration' to value '123.45'
253 Setting options string 'duration=1\:23\:45.67'
254 Setting entry with key 'duration' to value '1:23:45.67'
255 OK 'duration=1\:23\:45.67'
256 Setting options string 'color=blue'
257 Setting entry with key 'color' to value 'blue'
259 Setting options string 'color=0x223300'
260 Setting entry with key 'color' to value '0x223300'
262 Setting options string 'color=0x42FF07AA'
263 Setting entry with key 'color' to value '0x42FF07AA'
264 OK 'color=0x42FF07AA'
265 Setting options string 'cl=stereo+downmix'
266 Setting entry with key 'cl' to value 'stereo+downmix'
267 OK 'cl=stereo+downmix'
268 Setting options string 'cl=foo'
269 Setting entry with key 'cl' to value 'foo'
270 Unable to parse option value "foo" as channel layout
272 Setting options string 'bin=boguss'
273 Setting entry with key 'bin' to value 'boguss'
275 Setting options string 'bin=111'
276 Setting entry with key 'bin' to value '111'
278 Setting options string 'bin=ffff'
279 Setting entry with key 'bin' to value 'ffff'
281 Setting options string 'num64=bogus'
282 Setting entry with key 'num64' to value 'bogus'
283 Undefined constant or missing '(' in 'bogus'
284 Unable to parse option value "bogus"
286 Setting options string 'num64=44'
287 Setting entry with key 'num64' to value '44'
289 Setting options string 'num64=44.4'
290 Setting entry with key 'num64' to value '44.4'
292 Setting options string 'num64=-1'
293 Setting entry with key 'num64' to value '-1'
294 Value -1.000000 for parameter 'num64' out of range [0 - 100]
296 Setting options string 'num64=101'
297 Setting entry with key 'num64' to value '101'
298 Value 101.000000 for parameter 'num64' out of range [0 - 100]
300 Setting options string 'flt=bogus'
301 Setting entry with key 'flt' to value 'bogus'
302 Undefined constant or missing '(' in 'bogus'
303 Unable to parse option value "bogus"
305 Setting options string 'flt=2'
306 Setting entry with key 'flt' to value '2'
308 Setting options string 'flt=2.2'
309 Setting entry with key 'flt' to value '2.2'
311 Setting options string 'flt=-1'
312 Setting entry with key 'flt' to value '-1'
313 Value -1.000000 for parameter 'flt' out of range [0 - 100]
315 Setting options string 'flt=101'
316 Setting entry with key 'flt' to value '101'
317 Value 101.000000 for parameter 'flt' out of range [0 - 100]
319 Setting options string 'dbl=bogus'
320 Setting entry with key 'dbl' to value 'bogus'
321 Undefined constant or missing '(' in 'bogus'
322 Unable to parse option value "bogus"
324 Setting options string 'dbl=2'
325 Setting entry with key 'dbl' to value '2'
327 Setting options string 'dbl=2.2'
328 Setting entry with key 'dbl' to value '2.2'
330 Setting options string 'dbl=-1'
331 Setting entry with key 'dbl' to value '-1'
332 Value -1.000000 for parameter 'dbl' out of range [0 - 100]
334 Setting options string 'dbl=101'
335 Setting entry with key 'dbl' to value '101'
336 Value 101.000000 for parameter 'dbl' out of range [0 - 100]
338 Setting options string 'bool1=true'
339 Setting entry with key 'bool1' to value 'true'
341 Setting options string 'bool2=auto'
342 Setting entry with key 'bool2' to value 'auto'
345 Testing av_opt_set_from_string()
346 Setting options string ''
348 Setting options string '5'
349 Setting 'num' to value '5'
351 Setting options string '5:hello'
352 Setting 'num' to value '5'
353 Setting 'string' to value 'hello'
355 Setting options string '5:hello:size=pal'
356 Setting 'num' to value '5'
357 Setting 'string' to value 'hello'
358 Setting 'size' to value 'pal'
359 OK '5:hello:size=pal'
360 Setting options string '5:size=pal:hello'
361 Setting 'num' to value '5'
362 Setting 'size' to value 'pal'
363 No option name near 'hello'
364 Error '5:size=pal:hello'
365 Setting options string ':'
366 Setting 'num' to value ''
367 Undefined constant or missing '(' in ''
368 Unable to parse option value ""
370 Setting options string '='
371 Setting '' to value ''
374 Setting options string ' 5 : hello : size = pal '
375 Setting 'num' to value '5'
376 Setting 'string' to value 'hello'
377 Setting 'size' to value 'pal'
378 OK ' 5 : hello : size = pal '
379 Setting options string 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42'
380 Setting 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here' to value '42'
381 Option 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here' not found
382 Error 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42'