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
c37109a5
Commit
c37109a5
authored
Feb 21, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp3dmod: Implement IMediaObject::GetInputType().
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5d4ff559
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
mp3dmod.c
dlls/mp3dmod/mp3dmod.c
+12
-2
mp3dmod.c
dlls/mp3dmod/tests/mp3dmod.c
+31
-0
No files found.
dlls/mp3dmod/mp3dmod.c
View file @
c37109a5
...
...
@@ -163,9 +163,19 @@ static HRESULT WINAPI MediaObject_GetOutputStreamInfo(IMediaObject *iface, DWORD
static
HRESULT
WINAPI
MediaObject_GetInputType
(
IMediaObject
*
iface
,
DWORD
index
,
DWORD
type_index
,
DMO_MEDIA_TYPE
*
type
)
{
FIXME
(
"(%p)->(%d, %d, %p) stub!
\n
"
,
iface
,
index
,
type_index
,
type
);
TRACE
(
"iface %p, index %u, type_index %u, type %p.
\n
"
,
iface
,
index
,
type_index
,
type
);
return
E_NOTIMPL
;
if
(
type_index
)
return
DMO_E_NO_MORE_ITEMS
;
type
->
majortype
=
WMMEDIATYPE_Audio
;
type
->
subtype
=
WMMEDIASUBTYPE_MP3
;
type
->
formattype
=
GUID_NULL
;
type
->
pUnk
=
NULL
;
type
->
cbFormat
=
0
;
type
->
pbFormat
=
NULL
;
return
S_OK
;
}
static
HRESULT
WINAPI
MediaObject_GetOutputType
(
IMediaObject
*
iface
,
DWORD
index
,
DWORD
type_index
,
DMO_MEDIA_TYPE
*
type
)
...
...
dlls/mp3dmod/tests/mp3dmod.c
View file @
c37109a5
...
...
@@ -314,6 +314,36 @@ static void test_stream_info(void)
IMediaObject_Release
(
dmo
);
}
static
void
test_media_types
(
void
)
{
DMO_MEDIA_TYPE
mt
;
IMediaObject
*
dmo
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_CMP3DecMediaObject
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
memset
(
&
mt
,
0xcc
,
sizeof
(
DMO_MEDIA_TYPE
));
hr
=
IMediaObject_GetInputType
(
dmo
,
0
,
0
,
&
mt
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
IsEqualGUID
(
&
mt
.
majortype
,
&
MEDIATYPE_Audio
),
"Got major type %s.
\n
"
,
wine_dbgstr_guid
(
&
mt
.
majortype
));
ok
(
IsEqualGUID
(
&
mt
.
subtype
,
&
WMMEDIASUBTYPE_MP3
),
"Got subtype %s.
\n
"
,
wine_dbgstr_guid
(
&
mt
.
subtype
));
ok
(
mt
.
bFixedSizeSamples
==
0xcccccccc
,
"Got fixed size %d.
\n
"
,
mt
.
bFixedSizeSamples
);
ok
(
mt
.
bTemporalCompression
==
0xcccccccc
,
"Got temporal compression %d.
\n
"
,
mt
.
bTemporalCompression
);
ok
(
mt
.
lSampleSize
==
0xcccccccc
,
"Got sample size %u.
\n
"
,
mt
.
lSampleSize
);
ok
(
IsEqualGUID
(
&
mt
.
formattype
,
&
GUID_NULL
),
"Got format type %s.
\n
"
,
wine_dbgstr_guid
(
&
mt
.
formattype
));
ok
(
!
mt
.
pUnk
,
"Got pUnk %p.
\n
"
,
mt
.
pUnk
);
ok
(
!
mt
.
cbFormat
,
"Got format size %u.
\n
"
,
mt
.
cbFormat
);
ok
(
!
mt
.
pbFormat
,
"Got format block %p.
\n
"
,
mt
.
pbFormat
);
hr
=
IMediaObject_GetInputType
(
dmo
,
0
,
1
,
&
mt
);
ok
(
hr
==
DMO_E_NO_MORE_ITEMS
,
"Got hr %#x.
\n
"
,
hr
);
IMediaObject_Release
(
dmo
);
}
START_TEST
(
mp3dmod
)
{
IMediaObject
*
dmo
;
...
...
@@ -333,6 +363,7 @@ START_TEST(mp3dmod)
test_convert
();
test_aggregation
();
test_stream_info
();
test_media_types
();
CoUninitialize
();
}
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