mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 03:12:08 +00:00
887d74c47e
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
Testing av_parse_video_rate()
|
|
'-inf' -> -1/0 ERROR
|
|
'inf' -> 1/0 ERROR
|
|
'nan' -> 0/0 ERROR
|
|
'123/0' -> 1/0 ERROR
|
|
'-123 / 0' -> -1/0 ERROR
|
|
'' -> 0/0 ERROR
|
|
'/' -> 0/0 ERROR
|
|
' 123 / 321' -> 41/107 OK
|
|
'foo/foo' -> 0/0 ERROR
|
|
'foo/1' -> 0/0 ERROR
|
|
'1/foo' -> 1/0 ERROR
|
|
'0/0' -> 0/0 ERROR
|
|
'/0' -> 0/0 ERROR
|
|
'1/' -> 1/0 ERROR
|
|
'1' -> 1/1 OK
|
|
'0' -> 0/1 ERROR
|
|
'-123/123' -> -1/1 ERROR
|
|
'-foo' -> 0/0 ERROR
|
|
'123.23' -> 12323/100 OK
|
|
'.23' -> 23/100 OK
|
|
'-.23' -> -23/100 ERROR
|
|
'-0.234' -> -117/500 ERROR
|
|
'-0.0000001' -> -1/10000000 ERROR
|
|
' 21332.2324 ' -> 917286/43 OK
|
|
' -21332.2324 ' -> -917286/43 ERROR
|
|
|
|
Testing av_parse_color()
|
|
bikeshed -> R(80) G(64) B(140) A(59)
|
|
RaNdOm -> R(185) G(88) B(148) A(94)
|
|
foo -> error
|
|
red -> R(255) G(0) B(0) A(255)
|
|
Red -> error
|
|
RED -> R(255) G(0) B(0) A(255)
|
|
Violet -> R(238) G(130) B(238) A(255)
|
|
Yellow -> R(255) G(255) B(0) A(255)
|
|
Red -> R(255) G(0) B(0) A(255)
|
|
0x000000 -> R(0) G(0) B(0) A(255)
|
|
0x0000000 -> error
|
|
0xff000000 -> R(255) G(0) B(0) A(0)
|
|
0x3e34ff -> R(62) G(52) B(255) A(255)
|
|
0x3e34ffaa -> R(62) G(52) B(255) A(170)
|
|
0xffXXee -> error
|
|
0xfoobar -> error
|
|
0xffffeeeeeeee -> error
|
|
#ff0000 -> R(255) G(0) B(0) A(255)
|
|
#ffXX00 -> error
|
|
ff0000 -> R(255) G(0) B(0) A(255)
|
|
ffXX00 -> error
|
|
red@foo -> error
|
|
random@10 -> error
|
|
0xff0000@1.0 -> R(255) G(0) B(0) A(255)
|
|
red@ -> error
|
|
red@0xfff -> error
|
|
red@0xf -> R(255) G(0) B(0) A(15)
|
|
red@2 -> error
|
|
red@0.1 -> R(255) G(0) B(0) A(25)
|
|
red@-1 -> error
|
|
red@0.5 -> R(255) G(0) B(0) A(127)
|
|
red@1.0 -> R(255) G(0) B(0) A(255)
|
|
red@256 -> error
|
|
red@10foo -> error
|
|
red@-1.0 -> error
|
|
red@-0.0 -> R(255) G(0) B(0) A(0)
|
|
|
|
Testing av_small_strptime()
|
|
fmt:'%Y-%m-%d' spec:'2012-12-21' -> 2012-12-21 00:00:00
|
|
fmt:'%Y - %m - %d' spec:'2012-12-21' -> 2012-12-21 00:00:00
|
|
fmt:'%Y-%m-%d %H:%M:%S' spec:'2012-12-21 20:12:21' -> 2012-12-21 20:12:21
|
|
fmt:' %Y - %m - %d %H : %M : %S' spec:' 2012 - 12 - 21 20 : 12 : 21' -> 2012-12-21 20:12:21
|
|
|
|
Testing av_parse_time()
|
|
(now is 2012-03-17 09:14:13 +0100, local time is UTC+1)
|
|
now -> 1331972053.000000 = 2012-03-17T08:14:13Z
|
|
12:35:46 -> 1331984146.000000 = 2012-03-17T11:35:46Z
|
|
2000-12-20 0:02:47.5z -> 977270567.500000 = 2000-12-20T00:02:47Z
|
|
2000-12-20T010247.6 -> 977270567.600000 = 2000-12-20T00:02:47Z
|
|
2:34:56.79 -> +9296790000
|
|
-1:23:45.67 -> -5025670000
|
|
42.1729 -> +42172900
|
|
-1729.42 -> -1729420000
|
|
12:34 -> +754000000
|