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)
46 -dict1 <dictionary> E.......... set dictionary value
47 -dict2 <dictionary> E.......... set dictionary value (default "happy=':-)'")
49 Testing av_opt_is_set_to_default()
50 name: num default:1 error:
51 name: toggle default:0 error:
52 name: rational default:0 error:
53 name: string default:0 error:
54 name: escape default:0 error:
55 name: flags default:0 error:
56 name: cool default:1 error:Option not found
57 name: lame default:1 error:Option not found
58 name: mu default:1 error:Option not found
59 name: size default:0 error:
60 name: pix_fmt default:0 error:
61 name:sample_fmt default:0 error:
62 name:video_rate default:0 error:
63 name: duration default:0 error:
64 name: color default:0 error:
65 name: cl default:0 error:
66 name: bin default:0 error:
67 name: bin1 default:1 error:
68 name: bin2 default:1 error:
69 name: num64 default:0 error:
70 name: flt default:0 error:
71 name: dbl default:0 error:
72 name: bool1 default:0 error:
73 name: bool2 default:0 error:
74 name: bool3 default:1 error:
75 name: dict1 default:1 error:
76 name: dict2 default:0 error:
77 name: num default:1 error:
78 name: toggle default:1 error:
79 name: rational default:1 error:
80 name: string default:1 error:
81 name: escape default:1 error:
82 name: flags default:1 error:
83 name: cool default:1 error:Option not found
84 name: lame default:1 error:Option not found
85 name: mu default:1 error:Option not found
86 name: size default:1 error:
87 name: pix_fmt default:1 error:
88 name:sample_fmt default:1 error:
89 name:video_rate default:1 error:
90 name: duration default:1 error:
91 name: color default:1 error:
92 name: cl default:1 error:
93 name: bin default:1 error:
94 name: bin1 default:1 error:
95 name: bin2 default:1 error:
96 name: num64 default:1 error:
97 name: flt default:1 error:
98 name: dbl default:1 error:
99 name: bool1 default:1 error:
100 name: bool2 default:1 error:
101 name: bool3 default:1 error:
102 name: dict1 default:1 error:
103 name: dict2 default:1 error:
105 Testing av_opt_get/av_opt_set()
106 name: num get: 0 set: OK get: 0 OK
107 name: toggle get: 1 set: OK get: 1 OK
108 name: rational get: 1/1 set: OK get: 1/1 OK
109 name: string get: default set: OK get: default OK
110 name: escape get: \=, set: OK get: \=, OK
111 name: flags get: 0x00000001 set: OK get: 0x00000001 OK
112 name: size get: 200x300 set: OK get: 200x300 OK
113 name: pix_fmt get: 0bgr set: OK get: 0bgr OK
114 name: sample_fmt get: s16 set: OK get: s16 OK
115 name: video_rate get: 25/1 set: OK get: 25/1 OK
116 name: duration get: 0.001 set: OK get: 0.001 OK
117 name: color get: 0xffc0cbff set: OK get: 0xffc0cbff OK
118 name: cl get: 0x137 set: OK get: 0x137 OK
119 name: bin get: 62696E00 set: OK get: 62696E00 OK
120 name: bin1 get: set: OK get: OK
121 name: bin2 get: set: OK get: OK
122 name: num64 get: 1 set: OK get: 1 OK
123 name: flt get: 0.333333 set: OK get: 0.333333 OK
124 name: dbl get: 0.333333 set: OK get: 0.333333 OK
125 name: bool1 get: auto set: OK get: auto OK
126 name: bool2 get: true set: OK get: true OK
127 name: bool3 get: false set: OK get: false OK
128 name: dict1 get: set: OK get: OK
129 name: dict2 get: happy=\:-) set: OK get: happy=\:-) OK
131 Test av_opt_serialize()
132 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,dict1=,dict2=happy\=\\:-)
133 Setting entry with key 'num' to value '0'
134 Setting entry with key 'toggle' to value '1'
135 Setting entry with key 'rational' to value '1/1'
136 Setting entry with key 'string' to value 'default'
137 Setting entry with key 'escape' to value '\=,'
138 Setting entry with key 'flags' to value '0x00000001'
139 Setting entry with key 'size' to value '200x300'
140 Setting entry with key 'pix_fmt' to value '0bgr'
141 Setting entry with key 'sample_fmt' to value 's16'
142 Setting entry with key 'video_rate' to value '25/1'
143 Setting entry with key 'duration' to value '0.001'
144 Setting entry with key 'color' to value '0xffc0cbff'
145 Setting entry with key 'cl' to value '0x137'
146 Setting entry with key 'bin' to value '62696E00'
147 Setting entry with key 'bin1' to value ''
148 Setting entry with key 'bin2' to value ''
149 Setting entry with key 'num64' to value '1'
150 Setting entry with key 'flt' to value '0.333333'
151 Setting entry with key 'dbl' to value '0.333333'
152 Setting entry with key 'bool1' to value 'auto'
153 Setting entry with key 'bool2' to value 'true'
154 Setting entry with key 'bool3' to value 'false'
155 Setting entry with key 'dict1' to value ''
156 Setting entry with key 'dict2' to value 'happy=\:-)'
157 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,dict1=,dict2=happy\=\\:-)
159 Testing av_set_options_string()
160 Setting options string ''
162 Setting options string ':'
163 Missing key or no key/value separator found after key ':'
165 Setting options string '='
166 Missing key or no key/value separator found after key ''
168 Setting options string 'foo=:'
169 Setting entry with key 'foo' to value ''
172 Setting options string ':=foo'
173 Setting entry with key ':' to value 'foo'
176 Setting options string '=foo'
177 Missing key or no key/value separator found after key ''
179 Setting options string 'foo='
180 Setting entry with key 'foo' to value ''
183 Setting options string 'foo'
184 Missing key or no key/value separator found after key 'foo'
186 Setting options string 'foo=val'
187 Setting entry with key 'foo' to value 'val'
190 Setting options string 'foo==val'
191 Setting entry with key 'foo' to value '=val'
194 Setting options string 'toggle=:'
195 Setting entry with key 'toggle' to value ''
196 Undefined constant or missing '(' in ''
197 Unable to parse option value ""
199 Setting options string 'string=:'
200 Setting entry with key 'string' to value ''
202 Setting options string 'toggle=1 : foo'
203 Setting entry with key 'toggle' to value '1'
204 Missing key or no key/value separator found after key 'foo'
205 Error 'toggle=1 : foo'
206 Setting options string 'toggle=100'
207 Setting entry with key 'toggle' to value '100'
208 Value 100.000000 for parameter 'toggle' out of range [0 - 1]
210 Setting options string 'toggle==1'
211 Setting entry with key 'toggle' to value '=1'
212 Undefined constant or missing '(' in '=1'
213 Unable to parse option value "=1"
215 Setting options string 'flags=+mu-lame : num=42: toggle=0'
216 Setting entry with key 'flags' to value '+mu-lame'
217 Setting entry with key 'num' to value '42'
218 Setting entry with key 'toggle' to value '0'
219 OK 'flags=+mu-lame : num=42: toggle=0'
220 Setting options string 'num=42 : string=blahblah'
221 Setting entry with key 'num' to value '42'
222 Setting entry with key 'string' to value 'blahblah'
223 OK 'num=42 : string=blahblah'
224 Setting options string 'rational=0 : rational=1/2 : rational=1/-1'
225 Setting entry with key 'rational' to value '0'
226 Setting entry with key 'rational' to value '1/2'
227 Setting entry with key 'rational' to value '1/-1'
228 Value -1.000000 for parameter 'rational' out of range [0 - 10]
229 Value -1.000000 for parameter 'rational' out of range [0 - 10]
230 Error 'rational=0 : rational=1/2 : rational=1/-1'
231 Setting options string 'rational=-1/0'
232 Error 'rational=-1/0'
233 Setting options string 'size=1024x768'
234 Setting entry with key 'size' to value '1024x768'
236 Setting options string 'size=pal'
237 Setting entry with key 'size' to value 'pal'
239 Setting options string 'size=bogus'
240 Setting entry with key 'size' to value 'bogus'
241 Unable to parse option value "bogus" as image size
243 Setting options string 'pix_fmt=yuv420p'
244 Setting entry with key 'pix_fmt' to value 'yuv420p'
246 Setting options string 'pix_fmt=2'
247 Setting entry with key 'pix_fmt' to value '2'
249 Setting options string 'pix_fmt=bogus'
250 Setting entry with key 'pix_fmt' to value 'bogus'
251 Unable to parse option value "bogus" as pixel format
252 Error 'pix_fmt=bogus'
253 Setting options string 'sample_fmt=s16'
254 Setting entry with key 'sample_fmt' to value 's16'
256 Setting options string 'sample_fmt=2'
257 Setting entry with key 'sample_fmt' to value '2'
259 Setting options string 'sample_fmt=bogus'
260 Setting entry with key 'sample_fmt' to value 'bogus'
261 Unable to parse option value "bogus" as sample format
262 Error 'sample_fmt=bogus'
263 Setting options string 'video_rate=pal'
264 Setting entry with key 'video_rate' to value 'pal'
266 Setting options string 'video_rate=25'
267 Setting entry with key 'video_rate' to value '25'
269 Setting options string 'video_rate=30000/1001'
270 Setting entry with key 'video_rate' to value '30000/1001'
271 OK 'video_rate=30000/1001'
272 Setting options string 'video_rate=30/1.001'
273 Setting entry with key 'video_rate' to value '30/1.001'
274 OK 'video_rate=30/1.001'
275 Setting options string 'video_rate=bogus'
276 Setting entry with key 'video_rate' to value 'bogus'
277 Undefined constant or missing '(' in 'bogus'
278 Unable to parse option value "bogus" as video rate
279 Error 'video_rate=bogus'
280 Setting options string 'duration=bogus'
281 Setting entry with key 'duration' to value 'bogus'
282 Unable to parse option value "bogus" as duration
283 Error 'duration=bogus'
284 Setting options string 'duration=123.45'
285 Setting entry with key 'duration' to value '123.45'
287 Setting options string 'duration=1\:23\:45.67'
288 Setting entry with key 'duration' to value '1:23:45.67'
289 OK 'duration=1\:23\:45.67'
290 Setting options string 'color=blue'
291 Setting entry with key 'color' to value 'blue'
293 Setting options string 'color=0x223300'
294 Setting entry with key 'color' to value '0x223300'
296 Setting options string 'color=0x42FF07AA'
297 Setting entry with key 'color' to value '0x42FF07AA'
298 OK 'color=0x42FF07AA'
299 Setting options string 'cl=stereo+downmix'
300 Setting entry with key 'cl' to value 'stereo+downmix'
301 OK 'cl=stereo+downmix'
302 Setting options string 'cl=foo'
303 Setting entry with key 'cl' to value 'foo'
304 Unable to parse option value "foo" as channel layout
306 Setting options string 'bin=boguss'
307 Setting entry with key 'bin' to value 'boguss'
309 Setting options string 'bin=111'
310 Setting entry with key 'bin' to value '111'
312 Setting options string 'bin=ffff'
313 Setting entry with key 'bin' to value 'ffff'
315 Setting options string 'num64=bogus'
316 Setting entry with key 'num64' to value 'bogus'
317 Undefined constant or missing '(' in 'bogus'
318 Unable to parse option value "bogus"
320 Setting options string 'num64=44'
321 Setting entry with key 'num64' to value '44'
323 Setting options string 'num64=44.4'
324 Setting entry with key 'num64' to value '44.4'
326 Setting options string 'num64=-1'
327 Setting entry with key 'num64' to value '-1'
328 Value -1.000000 for parameter 'num64' out of range [0 - 100]
330 Setting options string 'num64=101'
331 Setting entry with key 'num64' to value '101'
332 Value 101.000000 for parameter 'num64' out of range [0 - 100]
334 Setting options string 'flt=bogus'
335 Setting entry with key 'flt' to value 'bogus'
336 Undefined constant or missing '(' in 'bogus'
337 Unable to parse option value "bogus"
339 Setting options string 'flt=2'
340 Setting entry with key 'flt' to value '2'
342 Setting options string 'flt=2.2'
343 Setting entry with key 'flt' to value '2.2'
345 Setting options string 'flt=-1'
346 Setting entry with key 'flt' to value '-1'
347 Value -1.000000 for parameter 'flt' out of range [0 - 100]
349 Setting options string 'flt=101'
350 Setting entry with key 'flt' to value '101'
351 Value 101.000000 for parameter 'flt' out of range [0 - 100]
353 Setting options string 'dbl=bogus'
354 Setting entry with key 'dbl' to value 'bogus'
355 Undefined constant or missing '(' in 'bogus'
356 Unable to parse option value "bogus"
358 Setting options string 'dbl=2'
359 Setting entry with key 'dbl' to value '2'
361 Setting options string 'dbl=2.2'
362 Setting entry with key 'dbl' to value '2.2'
364 Setting options string 'dbl=-1'
365 Setting entry with key 'dbl' to value '-1'
366 Value -1.000000 for parameter 'dbl' out of range [0 - 100]
368 Setting options string 'dbl=101'
369 Setting entry with key 'dbl' to value '101'
370 Value 101.000000 for parameter 'dbl' out of range [0 - 100]
372 Setting options string 'bool1=true'
373 Setting entry with key 'bool1' to value 'true'
375 Setting options string 'bool2=auto'
376 Setting entry with key 'bool2' to value 'auto'
378 Setting options string 'dict1='happy=\:-):sad=\:-(''
379 Setting entry with key 'dict1' to value 'happy=\:-):sad=\:-('
380 OK 'dict1='happy=\:-):sad=\:-(''
382 Testing av_opt_set_from_string()
383 Setting options string ''
385 Setting options string '5'
386 Setting 'num' to value '5'
388 Setting options string '5:hello'
389 Setting 'num' to value '5'
390 Setting 'string' to value 'hello'
392 Setting options string '5:hello:size=pal'
393 Setting 'num' to value '5'
394 Setting 'string' to value 'hello'
395 Setting 'size' to value 'pal'
396 OK '5:hello:size=pal'
397 Setting options string '5:size=pal:hello'
398 Setting 'num' to value '5'
399 Setting 'size' to value 'pal'
400 No option name near 'hello'
401 Error '5:size=pal:hello'
402 Setting options string ':'
403 Setting 'num' to value ''
404 Undefined constant or missing '(' in ''
405 Unable to parse option value ""
407 Setting options string '='
408 Setting '' to value ''
411 Setting options string ' 5 : hello : size = pal '
412 Setting 'num' to value '5'
413 Setting 'string' to value 'hello'
414 Setting 'size' to value 'pal'
415 OK ' 5 : hello : size = pal '
416 Setting options string 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42'
417 Setting 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here' to value '42'
418 Option 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here' not found
419 Error 'a_very_long_option_name_that_will_need_to_be_ellipsized_around_here=42'