Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ffdc68d5
Commit
ffdc68d5
authored
Jul 24, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Implement IMediaObject::SetOutputType().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f21d13e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
7 deletions
+28
-7
main.c
dlls/dsdmo/main.c
+23
-2
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+5
-5
No files found.
dlls/dsdmo/main.c
View file @
ffdc68d5
...
...
@@ -226,8 +226,29 @@ static HRESULT WINAPI effect_SetInputType(IMediaObject *iface, DWORD index, cons
static
HRESULT
WINAPI
effect_SetOutputType
(
IMediaObject
*
iface
,
DWORD
index
,
const
DMO_MEDIA_TYPE
*
type
,
DWORD
flags
)
{
FIXME
(
"iface %p, index %u, type %p, flags %#x, stub!
\n
"
,
iface
,
index
,
type
,
flags
);
return
E_NOTIMPL
;
struct
effect
*
effect
=
impl_from_IMediaObject
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, index %u, type %p, flags %#x.
\n
"
,
iface
,
index
,
type
,
flags
);
if
(
flags
&
DMO_SET_TYPEF_CLEAR
)
return
S_OK
;
if
(
!
IsEqualGUID
(
&
type
->
majortype
,
&
MEDIATYPE_Audio
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
if
(
!
IsEqualGUID
(
&
type
->
subtype
,
&
MEDIASUBTYPE_PCM
)
&&
!
IsEqualGUID
(
&
type
->
subtype
,
&
MEDIASUBTYPE_IEEE_FLOAT
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
if
(
!
IsEqualGUID
(
&
type
->
formattype
,
&
FORMAT_WaveFormatEx
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
EnterCriticalSection
(
&
effect
->
cs
);
hr
=
memcmp
(
type
->
pbFormat
,
&
effect
->
format
,
sizeof
(
WAVEFORMATEX
))
?
DMO_E_TYPE_NOT_ACCEPTED
:
S_OK
;
LeaveCriticalSection
(
&
effect
->
cs
);
return
hr
;
}
static
HRESULT
WINAPI
effect_GetInputCurrentType
(
IMediaObject
*
iface
,
DWORD
index
,
DMO_MEDIA_TYPE
*
type
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
ffdc68d5
...
...
@@ -254,22 +254,22 @@ static void test_media_types(const GUID *clsid)
build_pcm_format
(
&
wfx
,
depths
[
j
].
format
,
depths
[
j
].
depth
,
sample_rates
[
i
],
3
-
channels
);
hr
=
IMediaObject_SetOutputType
(
dmo
,
0
,
&
mt
,
0
);
todo_wine
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
build_pcm_format
(
&
wfx
,
depths
[
j
].
format
,
depths
[
j
].
depth
,
2
*
sample_rates
[
i
],
channels
);
hr
=
IMediaObject_SetOutputType
(
dmo
,
0
,
&
mt
,
0
);
todo_wine
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
build_pcm_format
(
&
wfx
,
depths
[
j
].
format
,
24
-
depths
[
j
].
depth
,
sample_rates
[
i
],
channels
);
hr
=
IMediaObject_SetOutputType
(
dmo
,
0
,
&
mt
,
0
);
todo_wine
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
ok
(
hr
==
DMO_E_TYPE_NOT_ACCEPTED
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
build_pcm_format
(
&
wfx
,
depths
[
j
].
format
,
depths
[
j
].
depth
,
sample_rates
[
i
],
channels
);
hr
=
IMediaObject_SetOutputType
(
dmo
,
0
,
&
mt
,
0
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
ok
(
hr
==
S_OK
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
hr
=
IMediaObject_SetInputType
(
dmo
,
0
,
NULL
,
DMO_SET_TYPEF_CLEAR
);
...
...
@@ -277,7 +277,7 @@ static void test_media_types(const GUID *clsid)
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
hr
=
IMediaObject_SetOutputType
(
dmo
,
0
,
NULL
,
DMO_SET_TYPEF_CLEAR
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
ok
(
hr
==
S_OK
,
"Got hr %#x for %u Hz, %u channels, format %#x, depth %u.
\n
"
,
hr
,
sample_rates
[
i
],
channels
,
depths
[
j
].
format
,
depths
[
j
].
depth
);
hr
=
IMediaObject_SetInputType
(
dmo
,
0
,
NULL
,
DMO_SET_TYPEF_CLEAR
);
...
...
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