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
b95a05da
Commit
b95a05da
authored
Dec 19, 2022
by
Ziqing Hui
Committed by
Alexandre Julliard
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement SetOutputType for WMV decoder.
parent
fcf09bf1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
transform.c
dlls/mf/tests/transform.c
+0
-2
wmv_decoder.c
dlls/winegstreamer/wmv_decoder.c
+39
-2
No files found.
dlls/mf/tests/transform.c
View file @
b95a05da
...
...
@@ -5077,14 +5077,12 @@ static void test_wmv_decoder_media_object(void)
hr
=
IMediaObject_SetInputType
(
media_object
,
0
,
NULL
,
DMO_SET_TYPEF_CLEAR
);
ok
(
hr
==
S_OK
,
"SetInputType returned %#lx.
\n
"
,
hr
);
hr
=
IMediaObject_SetOutputType
(
media_object
,
0
,
&
media_type
,
0
);
todo_wine
ok
(
hr
==
DMO_E_TYPE_NOT_SET
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
/* Test SetOutputType after setting input type. */
init_dmo_media_type_video
(
input_type
,
&
expected_input_types
[
0
].
subtype
,
16
,
16
);
hr
=
IMediaObject_SetInputType
(
media_object
,
0
,
input_type
,
0
);
ok
(
hr
==
S_OK
,
"SetInputType returned %#lx.
\n
"
,
hr
);
todo_wine
check_dmo_set_output_type
(
media_object
,
&
MEDIASUBTYPE_RGB24
);
ret
=
IMediaObject_Release
(
media_object
);
...
...
dlls/winegstreamer/wmv_decoder.c
View file @
b95a05da
...
...
@@ -81,6 +81,7 @@ struct wmv_decoder
LONG
refcount
;
struct
wg_format
input_format
;
struct
wg_format
output_format
;
};
static
bool
wg_format_is_set
(
struct
wg_format
*
format
)
...
...
@@ -513,8 +514,44 @@ static HRESULT WINAPI media_object_SetInputType(IMediaObject *iface, DWORD index
static
HRESULT
WINAPI
media_object_SetOutputType
(
IMediaObject
*
iface
,
DWORD
index
,
const
DMO_MEDIA_TYPE
*
type
,
DWORD
flags
)
{
FIXME
(
"iface %p, index %lu, type %p, flags %#lx stub!
\n
"
,
iface
,
index
,
type
,
flags
);
return
E_NOTIMPL
;
struct
wmv_decoder
*
decoder
=
impl_from_IMediaObject
(
iface
);
struct
wg_format
wg_format
;
unsigned
int
i
;
TRACE
(
"iface %p, index %lu, type %p, flags %#lx,
\n
"
,
iface
,
index
,
type
,
flags
);
if
(
index
>
0
)
return
DMO_E_INVALIDSTREAMINDEX
;
if
(
!
type
)
{
if
(
flags
&
DMO_SET_TYPEF_CLEAR
)
{
memset
(
&
decoder
->
output_format
,
0
,
sizeof
(
decoder
->
output_format
));
return
S_OK
;
}
return
E_POINTER
;
}
if
(
!
wg_format_is_set
(
&
decoder
->
input_format
))
return
DMO_E_TYPE_NOT_SET
;
if
(
!
IsEqualGUID
(
&
type
->
majortype
,
&
MEDIATYPE_Video
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
wmv_decoder_output_types
);
++
i
)
if
(
IsEqualGUID
(
&
type
->
subtype
,
wmv_decoder_output_types
[
i
].
subtype
))
break
;
if
(
i
==
ARRAY_SIZE
(
wmv_decoder_output_types
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
if
(
!
amt_to_wg_format
((
const
AM_MEDIA_TYPE
*
)
type
,
&
wg_format
))
return
DMO_E_TYPE_NOT_ACCEPTED
;
if
(
!
(
flags
&
DMO_SET_TYPEF_TEST_ONLY
))
decoder
->
output_format
=
wg_format
;
return
S_OK
;
}
static
HRESULT
WINAPI
media_object_GetInputCurrentType
(
IMediaObject
*
iface
,
DWORD
index
,
DMO_MEDIA_TYPE
*
type
)
...
...
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