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
10fa32a3
Commit
10fa32a3
authored
Jun 26, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qcap/tests: Add some more tests for AVI mux media types.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bd44602a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
31 deletions
+123
-31
avimux.c
dlls/qcap/tests/avimux.c
+123
-0
qcap.c
dlls/qcap/tests/qcap.c
+0
-31
No files found.
dlls/qcap/tests/avimux.c
View file @
10fa32a3
...
@@ -434,6 +434,128 @@ static void test_pin_info(void)
...
@@ -434,6 +434,128 @@ static void test_pin_info(void)
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
}
static
void
test_media_types
(
void
)
{
IBaseFilter
*
filter
=
create_avi_mux
();
AM_MEDIA_TYPE
mt
=
{},
*
pmt
;
VIDEOINFOHEADER
vih
=
{};
IEnumMediaTypes
*
enummt
;
WAVEFORMATEX
wfx
=
{};
HRESULT
hr
;
ULONG
ref
;
IPin
*
pin
;
IBaseFilter_FindPin
(
filter
,
source_id
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
pmt
->
majortype
,
&
MEDIATYPE_Stream
),
"Got major type %s
\n
"
,
wine_dbgstr_guid
(
&
pmt
->
majortype
));
ok
(
IsEqualGUID
(
&
pmt
->
subtype
,
&
MEDIASUBTYPE_Avi
),
"Got subtype %s
\n
"
,
wine_dbgstr_guid
(
&
pmt
->
subtype
));
ok
(
pmt
->
bFixedSizeSamples
==
TRUE
,
"Got fixed size %d.
\n
"
,
pmt
->
bFixedSizeSamples
);
ok
(
!
pmt
->
bTemporalCompression
,
"Got temporal compression %d.
\n
"
,
pmt
->
bTemporalCompression
);
ok
(
pmt
->
lSampleSize
==
1
,
"Got sample size %u.
\n
"
,
pmt
->
lSampleSize
);
ok
(
IsEqualGUID
(
&
pmt
->
formattype
,
&
GUID_NULL
),
"Got format type %s.
\n
"
,
wine_dbgstr_guid
(
&
pmt
->
formattype
));
ok
(
!
pmt
->
pUnk
,
"Got pUnk %p.
\n
"
,
pmt
->
pUnk
);
ok
(
!
pmt
->
cbFormat
,
"Got format size %u.
\n
"
,
pmt
->
cbFormat
);
ok
(
!
pmt
->
pbFormat
,
"Got format block %u.
\n
"
,
pmt
->
cbFormat
);
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
bFixedSizeSamples
=
FALSE
;
pmt
->
bTemporalCompression
=
TRUE
;
pmt
->
lSampleSize
=
123
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
majortype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
majortype
=
MEDIATYPE_Video
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
majortype
=
MEDIATYPE_Stream
;
pmt
->
subtype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
subtype
=
MEDIASUBTYPE_RGB8
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
subtype
=
MEDIASUBTYPE_Avi
;
CoTaskMemFree
(
pmt
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
IEnumMediaTypes_Release
(
enummt
);
IPin_Release
(
pin
);
IBaseFilter_FindPin
(
filter
,
sink0_id
,
&
pin
);
hr
=
IPin_EnumMediaTypes
(
pin
,
&
enummt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
enummt
,
1
,
&
pmt
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
IEnumMediaTypes_Release
(
enummt
);
mt
.
majortype
=
MEDIATYPE_Audio
;
mt
.
formattype
=
FORMAT_WaveFormatEx
;
mt
.
cbFormat
=
sizeof
(
wfx
);
mt
.
pbFormat
=
(
BYTE
*
)
&
wfx
;
wfx
.
nBlockAlign
=
1
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_RGB8
;
mt
.
bFixedSizeSamples
=
TRUE
;
mt
.
bTemporalCompression
=
TRUE
;
mt
.
lSampleSize
=
123
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
MEDIATYPE_Video
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
MEDIATYPE_Interleaved
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
MEDIATYPE_Video
;
mt
.
formattype
=
FORMAT_VideoInfo
;
mt
.
cbFormat
=
sizeof
(
vih
);
mt
.
pbFormat
=
(
BYTE
*
)
&
vih
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
MEDIATYPE_Audio
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
majortype
=
MEDIATYPE_Interleaved
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
IPin_Release
(
pin
);
ref
=
IBaseFilter_Release
(
filter
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
}
static
void
test_seeking
(
void
)
static
void
test_seeking
(
void
)
{
{
IBaseFilter
*
filter
=
create_avi_mux
();
IBaseFilter
*
filter
=
create_avi_mux
();
...
@@ -577,6 +699,7 @@ START_TEST(avimux)
...
@@ -577,6 +699,7 @@ START_TEST(avimux)
test_enum_pins
();
test_enum_pins
();
test_find_pin
();
test_find_pin
();
test_pin_info
();
test_pin_info
();
test_media_types
();
test_seeking
();
test_seeking
();
CoUninitialize
();
CoUninitialize
();
...
...
dlls/qcap/tests/qcap.c
View file @
10fa32a3
...
@@ -1365,11 +1365,9 @@ static void test_AviMux(char *arg)
...
@@ -1365,11 +1365,9 @@ static void test_AviMux(char *arg)
VIDEOINFO
videoinfo
;
VIDEOINFO
videoinfo
;
IPin
*
avimux_in
,
*
avimux_out
,
*
pin
;
IPin
*
avimux_in
,
*
avimux_out
,
*
pin
;
AM_MEDIA_TYPE
source_media_type
;
AM_MEDIA_TYPE
source_media_type
;
AM_MEDIA_TYPE
*
media_type
;
PIN_DIRECTION
dir
;
PIN_DIRECTION
dir
;
IBaseFilter
*
avimux
;
IBaseFilter
*
avimux
;
IEnumPins
*
ep
;
IEnumPins
*
ep
;
IEnumMediaTypes
*
emt
;
IMemInputPin
*
memin
;
IMemInputPin
*
memin
;
ALLOCATOR_PROPERTIES
props
;
ALLOCATOR_PROPERTIES
props
;
IMemAllocator
*
memalloc
;
IMemAllocator
*
memalloc
;
...
@@ -1405,35 +1403,6 @@ static void test_AviMux(char *arg)
...
@@ -1405,35 +1403,6 @@ static void test_AviMux(char *arg)
ok
(
dir
==
PINDIR_INPUT
,
"dir = %d
\n
"
,
dir
);
ok
(
dir
==
PINDIR_INPUT
,
"dir = %d
\n
"
,
dir
);
IEnumPins_Release
(
ep
);
IEnumPins_Release
(
ep
);
hr
=
IPin_EnumMediaTypes
(
avimux_out
,
&
emt
);
ok
(
hr
==
S_OK
,
"EnumMediaTypes returned %x
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
emt
,
1
,
&
media_type
,
NULL
);
ok
(
hr
==
S_OK
,
"Next returned %x
\n
"
,
hr
);
ok
(
IsEqualIID
(
&
media_type
->
majortype
,
&
MEDIATYPE_Stream
),
"majortype = %s
\n
"
,
wine_dbgstr_guid
(
&
media_type
->
majortype
));
ok
(
IsEqualIID
(
&
media_type
->
subtype
,
&
MEDIASUBTYPE_Avi
),
"subtype = %s
\n
"
,
wine_dbgstr_guid
(
&
media_type
->
subtype
));
ok
(
media_type
->
bFixedSizeSamples
,
"bFixedSizeSamples = %x
\n
"
,
media_type
->
bFixedSizeSamples
);
ok
(
!
media_type
->
bTemporalCompression
,
"bTemporalCompression = %x
\n
"
,
media_type
->
bTemporalCompression
);
ok
(
media_type
->
lSampleSize
==
1
,
"lSampleSize = %d
\n
"
,
media_type
->
lSampleSize
);
ok
(
IsEqualIID
(
&
media_type
->
formattype
,
&
GUID_NULL
),
"formattype = %s
\n
"
,
wine_dbgstr_guid
(
&
media_type
->
formattype
));
ok
(
!
media_type
->
pUnk
,
"pUnk = %p
\n
"
,
media_type
->
pUnk
);
ok
(
!
media_type
->
cbFormat
,
"cbFormat = %d
\n
"
,
media_type
->
cbFormat
);
ok
(
!
media_type
->
pbFormat
,
"pbFormat = %p
\n
"
,
media_type
->
pbFormat
);
CoTaskMemFree
(
media_type
);
hr
=
IEnumMediaTypes_Next
(
emt
,
1
,
&
media_type
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Next returned %x
\n
"
,
hr
);
IEnumMediaTypes_Release
(
emt
);
hr
=
IPin_EnumMediaTypes
(
avimux_in
,
&
emt
);
ok
(
hr
==
S_OK
,
"EnumMediaTypes returned %x
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Reset
(
emt
);
ok
(
hr
==
S_OK
,
"Reset returned %x
\n
"
,
hr
);
hr
=
IEnumMediaTypes_Next
(
emt
,
1
,
&
media_type
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Next returned %x
\n
"
,
hr
);
IEnumMediaTypes_Release
(
emt
);
hr
=
IPin_ReceiveConnection
(
avimux_in
,
&
source_filter
.
IPin_iface
,
NULL
);
hr
=
IPin_ReceiveConnection
(
avimux_in
,
&
source_filter
.
IPin_iface
,
NULL
);
ok
(
hr
==
E_POINTER
,
"ReceiveConnection returned %x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"ReceiveConnection returned %x
\n
"
,
hr
);
...
...
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