Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8b054fb3
Commit
8b054fb3
authored
Oct 21, 2015
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32/tests: Add ICSeqFrameCompress tests.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bd4ead0f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
msvfw.c
dlls/msvfw32/tests/msvfw.c
+65
-0
No files found.
dlls/msvfw32/tests/msvfw.c
View file @
8b054fb3
...
@@ -200,8 +200,73 @@ static void test_Locate(void)
...
@@ -200,8 +200,73 @@ static void test_Locate(void)
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
}
static
void
test_ICSeqCompress
(
void
)
{
/* The purpose of this test is to validate sequential frame compressing
* functions. The MRLE codec will be used because Wine supports it and
* it is present in any Windows.
*/
HIC
h
;
DWORD
err
,
vidc
=
mmioFOURCC
(
'v'
,
'i'
,
'd'
,
'c'
),
mrle
=
mmioFOURCC
(
'm'
,
'r'
,
'l'
,
'e'
);
DWORD
i
;
LONG
frame_len
;
BOOL
key_frame
,
ret
;
char
*
frame
;
COMPVARS
pc
;
struct
{
BITMAPINFOHEADER
header
;
RGBQUAD
map
[
256
];
}
input_header
=
{
{
sizeof
(
BITMAPINFOHEADER
),
32
,
1
,
1
,
8
,
0
,
32
*
8
,
0
,
0
,
256
,
256
},
{{
255
,
0
,
0
},
{
0
,
255
,
0
},
{
0
,
0
,
255
},
{
255
,
255
,
255
}}};
PBITMAPINFO
bitmap
=
(
PBITMAPINFO
)
&
input_header
;
static
BYTE
input
[
32
]
=
{
1
,
2
,
3
,
3
,
3
,
3
,
2
,
3
,
1
};
static
const
BYTE
output_kf
[]
=
{
1
,
1
,
1
,
2
,
4
,
3
,
0
,
3
,
2
,
3
,
1
,
0
,
23
,
0
,
0
,
0
,
0
,
1
},
/* key frame*/
output_nkf
[]
=
{
0
,
0
,
0
,
1
};
/* non key frame */
h
=
ICOpen
(
vidc
,
mrle
,
ICMODE_COMPRESS
);
ok
(
h
!=
NULL
,
"Expected non-NULL
\n
"
);
pc
.
cbSize
=
sizeof
(
pc
);
pc
.
dwFlags
=
ICMF_COMPVARS_VALID
;
pc
.
fccType
=
vidc
;
pc
.
fccHandler
=
mrle
;
pc
.
hic
=
h
;
pc
.
lpbiIn
=
NULL
;
pc
.
lpbiOut
=
NULL
;
pc
.
lpBitsOut
=
pc
.
lpBitsPrev
=
pc
.
lpState
=
NULL
;
pc
.
lQ
=
ICQUALITY_DEFAULT
;
pc
.
lKey
=
1
;
pc
.
lDataRate
=
300
;
pc
.
lpState
=
NULL
;
pc
.
cbState
=
0
;
ret
=
ICSeqCompressFrameStart
(
&
pc
,
bitmap
);
ok
(
ret
==
TRUE
,
"Expected TRUE
\n
"
);
/* Check that reserved pointers were allocated */
ok
(
pc
.
lpbiIn
!=
NULL
,
"Expected non-NULL
\n
"
);
ok
(
pc
.
lpbiOut
!=
NULL
,
"Expected non-NULL
\n
"
);
for
(
i
=
0
;
i
<
9
;
i
++
)
{
frame_len
=
0
;
frame
=
ICSeqCompressFrame
(
&
pc
,
0
,
input
,
&
key_frame
,
&
frame_len
);
ok
(
frame
!=
NULL
,
"Frame[%d]: Expected non-NULL
\n
"
,
i
);
if
(
frame_len
==
sizeof
(
output_nkf
))
ok
(
!
memcmp
(
output_nkf
,
frame
,
frame_len
),
"Frame[%d]: Contents do not match
\n
"
,
i
);
else
if
(
frame_len
==
sizeof
(
output_kf
))
ok
(
!
memcmp
(
output_kf
,
frame
,
frame_len
),
"Frame[%d]: Contents do not match
\n
"
,
i
);
else
ok
(
0
,
"Unknown frame size of %d byten
\n
"
,
frame_len
);
}
ICSeqCompressFrameEnd
(
&
pc
);
ICCompressorFree
(
&
pc
);
/* ICCompressorFree already closed the HIC */
err
=
ICClose
(
h
);
ok
(
err
==
ICERR_BADHANDLE
,
"Expected -8, got %d
\n
"
,
err
);
}
START_TEST
(
msvfw
)
START_TEST
(
msvfw
)
{
{
test_OpenCase
();
test_OpenCase
();
test_Locate
();
test_Locate
();
test_ICSeqCompress
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment