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
44ef5177
Commit
44ef5177
authored
Jan 24, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Add more tests for parser media types.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a9acdef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
11 deletions
+91
-11
avisplit.c
dlls/quartz/tests/avisplit.c
+31
-2
mpegsplit.c
dlls/quartz/tests/mpegsplit.c
+44
-9
waveparser.c
dlls/quartz/tests/waveparser.c
+16
-0
No files found.
dlls/quartz/tests/avisplit.c
View file @
44ef5177
...
...
@@ -526,14 +526,21 @@ static void test_media_types(void)
{
static
const
VIDEOINFOHEADER
expect_vih
=
{
{
0
},
{
0
},
0
,
0
,
1000
*
10000
,
{
sizeof
(
BITMAPINFOHEADER
),
32
,
24
,
1
,
12
,
mmioFOURCC
(
'I'
,
'4'
,
'2'
,
'0'
),
32
*
24
*
12
/
8
}
.
AvgTimePerFrame
=
1000
*
10000
,
.
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
),
.
bmiHeader
.
biWidth
=
32
,
.
bmiHeader
.
biHeight
=
24
,
.
bmiHeader
.
biPlanes
=
1
,
.
bmiHeader
.
biBitCount
=
12
,
.
bmiHeader
.
biCompression
=
mmioFOURCC
(
'I'
,
'4'
,
'2'
,
'0'
),
.
bmiHeader
.
biSizeImage
=
32
*
24
*
12
/
8
,
};
const
WCHAR
*
filename
=
load_resource
(
L"test.avi"
);
IBaseFilter
*
filter
=
create_avi_splitter
();
AM_MEDIA_TYPE
mt
=
{{
0
}},
*
pmt
;
IEnumMediaTypes
*
enummt
;
VIDEOINFOHEADER
*
vih
;
IFilterGraph2
*
graph
;
HRESULT
hr
;
ULONG
ref
;
...
...
@@ -630,6 +637,28 @@ static void test_media_types(void)
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
formattype
=
FORMAT_VideoInfo
;
vih
=
(
VIDEOINFOHEADER
*
)
pmt
->
pbFormat
;
vih
->
AvgTimePerFrame
=
10000
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
vih
->
AvgTimePerFrame
=
1000
*
10000
;
vih
->
dwBitRate
=
1000000
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
vih
->
dwBitRate
=
0
;
SetRect
(
&
vih
->
rcSource
,
0
,
0
,
32
,
24
);
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
SetRect
(
&
vih
->
rcSource
,
0
,
0
,
0
,
0
);
vih
->
bmiHeader
.
biCompression
=
BI_RGB
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
vih
->
bmiHeader
.
biCompression
=
mmioFOURCC
(
'I'
,
'4'
,
'2'
,
'0'
);
CoTaskMemFree
(
pmt
->
pbFormat
);
CoTaskMemFree
(
pmt
);
...
...
dlls/quartz/tests/mpegsplit.c
View file @
44ef5177
...
...
@@ -529,7 +529,9 @@ static void test_media_types(void)
const
WCHAR
*
filename
=
load_resource
(
L"test.mp3"
);
AM_MEDIA_TYPE
mt
=
{{
0
}},
*
pmt
,
expect_mt
=
{{
0
}};
IBaseFilter
*
filter
=
create_mpeg_splitter
();
MPEGLAYER3WAVEFORMAT
*
mp3wfx
;
IEnumMediaTypes
*
enummt
;
MPEG1WAVEFORMAT
*
wfx
;
IFilterGraph2
*
graph
;
HRESULT
hr
;
ULONG
ref
;
...
...
@@ -595,41 +597,47 @@ static void test_media_types(void)
mt
.
subtype
=
MEDIASUBTYPE_MPEG1Video
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1VideoCD
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1System
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1AudioPayload
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1Payload
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1Packet
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
subtype
=
MEDIASUBTYPE_MPEG1Audio
;
mt
.
majortype
=
MEDIATYPE_Audio
;
mt
.
subtype
=
MEDIASUBTYPE_MPEG1Audio
;
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_Stream
;
mt
.
formattype
=
FORMAT_None
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
formattype
=
FORMAT_VideoInfo
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
formattype
=
FORMAT_WaveFormatEx
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
mt
.
bFixedSizeSamples
=
TRUE
;
mt
.
bTemporalCompression
=
TRUE
;
mt
.
lSampleSize
=
123
;
mt
.
formattype
=
FORMAT_WaveFormatEx
;
hr
=
IPin_QueryAccept
(
pin
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -688,6 +696,9 @@ static void test_media_types(void)
pmt
->
majortype
=
MEDIATYPE_Video
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
majortype
=
GUID_NULL
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
majortype
=
MEDIATYPE_Audio
;
pmt
->
subtype
=
MEDIASUBTYPE_MPEG1Audio
;
...
...
@@ -709,6 +720,18 @@ static void test_media_types(void)
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
formattype
=
FORMAT_WaveFormatEx
;
wfx
=
(
MPEG1WAVEFORMAT
*
)
pmt
->
pbFormat
;
wfx
->
fwHeadLayer
=
ACM_MPEG_LAYER2
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
wfx
->
fwHeadLayer
=
ACM_MPEG_LAYER3
;
wfx
->
wfx
.
wFormatTag
=
WAVE_FORMAT_MPEGLAYER3
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
wfx
->
wfx
.
wFormatTag
=
WAVE_FORMAT_MPEG
;
CoTaskMemFree
(
pmt
->
pbFormat
);
CoTaskMemFree
(
pmt
);
...
...
@@ -786,6 +809,18 @@ static void test_media_types(void)
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
pmt
->
formattype
=
FORMAT_WaveFormatEx
;
mp3wfx
=
(
MPEGLAYER3WAVEFORMAT
*
)
pmt
->
pbFormat
;
mp3wfx
->
fdwFlags
=
MPEGLAYER3_FLAG_PADDING_OFF
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mp3wfx
->
fdwFlags
=
MPEGLAYER3_FLAG_PADDING_ISO
;
mp3wfx
->
wfx
.
wFormatTag
=
WAVE_FORMAT_MPEG
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
mp3wfx
->
wfx
.
wFormatTag
=
WAVE_FORMAT_MPEGLAYER3
;
CoTaskMemFree
(
pmt
->
pbFormat
);
CoTaskMemFree
(
pmt
);
...
...
dlls/quartz/tests/waveparser.c
View file @
44ef5177
...
...
@@ -20,6 +20,7 @@
#define COBJMACROS
#include "dshow.h"
#include "mmreg.h"
#include "wine/test.h"
static
IBaseFilter
*
create_wave_parser
(
void
)
...
...
@@ -525,6 +526,7 @@ static void test_media_types(void)
AM_MEDIA_TYPE
mt
=
{{
0
}},
*
pmt
;
IEnumMediaTypes
*
enummt
;
IFilterGraph2
*
graph
;
WAVEFORMATEX
*
wfx
;
HRESULT
hr
;
ULONG
ref
;
IPin
*
pin
;
...
...
@@ -619,6 +621,20 @@ static void test_media_types(void)
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
wfx
=
(
WAVEFORMATEX
*
)
pmt
->
pbFormat
;
wfx
->
nChannels
=
wfx
->
nBlockAlign
=
2
;
wfx
->
nAvgBytesPerSec
=
44100
*
2
;
wfx
->
nBlockAlign
=
2
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
*
wfx
=
expect_wfx
;
wfx
->
wFormatTag
=
WAVE_FORMAT_IMA_ADPCM
;
hr
=
IPin_QueryAccept
(
pin
,
pmt
);
todo_wine
ok
(
hr
==
S_FALSE
,
"Got hr %#x.
\n
"
,
hr
);
*
wfx
=
expect_wfx
;
CoTaskMemFree
(
pmt
->
pbFormat
);
CoTaskMemFree
(
pmt
);
...
...
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