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
d596f972
Commit
d596f972
authored
Nov 17, 2022
by
Ziqing Hui
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement media_object_GetInputType for WMV decoder.
parent
8844d424
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
10 deletions
+35
-10
transform.c
dlls/mf/tests/transform.c
+0
-8
wmv_decoder.c
dlls/winegstreamer/wmv_decoder.c
+35
-2
No files found.
dlls/mf/tests/transform.c
View file @
d596f972
...
...
@@ -4563,30 +4563,22 @@ static void test_wmv_decoder_media_object(void)
check_dmo_media_type
(
&
media_type
,
&
expected_input_types
[
i
]);
winetest_pop_context
();
}
todo_wine
ok
(
i
==
ARRAY_SIZE
(
expected_input_types
),
"%lu input types.
\n
"
,
i
);
/* Test GetInputType with invalid arguments. */
hr
=
IMediaObject_GetInputType
(
media_object
,
0
,
ARRAY_SIZE
(
expected_input_types
)
-
1
,
&
media_type
);
todo_wine
ok
(
hr
==
S_OK
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
0
,
ARRAY_SIZE
(
expected_input_types
),
&
media_type
);
todo_wine
ok
(
hr
==
DMO_E_NO_MORE_ITEMS
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
1
,
0
,
&
media_type
);
todo_wine
ok
(
hr
==
DMO_E_INVALIDSTREAMINDEX
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
0
,
0
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
1
,
ARRAY_SIZE
(
expected_input_types
),
&
media_type
);
todo_wine
ok
(
hr
==
DMO_E_INVALIDSTREAMINDEX
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
0
,
ARRAY_SIZE
(
expected_input_types
),
NULL
);
todo_wine
ok
(
hr
==
DMO_E_NO_MORE_ITEMS
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_GetInputType
(
media_object
,
1
,
0
,
NULL
);
todo_wine
ok
(
hr
==
DMO_E_INVALIDSTREAMINDEX
,
"GetInputType returned unexpected hr %#lx.
\n
"
,
hr
);
ret
=
IMediaObject_Release
(
media_object
);
...
...
dlls/winegstreamer/wmv_decoder.c
View file @
d596f972
...
...
@@ -19,6 +19,7 @@
#include "mfapi.h"
#include "mferror.h"
#include "mediaerr.h"
#include "mfobjects.h"
#include "mftransform.h"
#include "wmcodecdsp.h"
...
...
@@ -28,6 +29,23 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
extern
const
GUID
MFVideoFormat_VC1S
;
DEFINE_GUID
(
MFVideoFormat_WMV_Unknown
,
0x7ce12ca9
,
0xbfbf
,
0x43d9
,
0x9d
,
0x00
,
0x82
,
0xb8
,
0xed
,
0x54
,
0x31
,
0x6b
);
static
const
GUID
*
const
wmv_decoder_input_types
[]
=
{
&
MFVideoFormat_WMV1
,
&
MFVideoFormat_WMV2
,
&
MEDIASUBTYPE_WMVA
,
&
MEDIASUBTYPE_WMVP
,
&
MEDIASUBTYPE_WVP2
,
&
MFVideoFormat_WMV_Unknown
,
&
MFVideoFormat_WVC1
,
&
MFVideoFormat_WMV3
,
&
MFVideoFormat_VC1S
,
};
struct
wmv_decoder
{
IUnknown
IUnknown_inner
;
...
...
@@ -345,8 +363,23 @@ static HRESULT WINAPI media_object_GetOutputStreamInfo(IMediaObject *iface, DWOR
static
HRESULT
WINAPI
media_object_GetInputType
(
IMediaObject
*
iface
,
DWORD
index
,
DWORD
type_index
,
DMO_MEDIA_TYPE
*
type
)
{
FIXME
(
"iface %p, index %lu, type_index %lu, type %p stub!
\n
"
,
iface
,
index
,
type_index
,
type
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, index %lu, type_index %lu, type %p.
\n
"
,
iface
,
index
,
type_index
,
type
);
if
(
index
>
0
)
return
DMO_E_INVALIDSTREAMINDEX
;
if
(
type_index
>=
ARRAY_SIZE
(
wmv_decoder_input_types
))
return
DMO_E_NO_MORE_ITEMS
;
if
(
!
type
)
return
S_OK
;
memset
(
type
,
0
,
sizeof
(
*
type
));
type
->
majortype
=
MFMediaType_Video
;
type
->
subtype
=
*
wmv_decoder_input_types
[
type_index
];
type
->
bFixedSizeSamples
=
FALSE
;
type
->
bTemporalCompression
=
TRUE
;
type
->
lSampleSize
=
0
;
return
S_OK
;
}
static
HRESULT
WINAPI
media_object_GetOutputType
(
IMediaObject
*
iface
,
DWORD
index
,
DWORD
type_index
,
...
...
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