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
ddf7026d
Commit
ddf7026d
authored
Sep 03, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Support MFT_SET_TYPE_TEST_ONLY flag in the MF transforms.
parent
d4e6a01f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
5 deletions
+23
-5
transform.c
dlls/mf/tests/transform.c
+0
-2
color_convert.c
dlls/winegstreamer/color_convert.c
+4
-0
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+4
-0
resampler.c
dlls/winegstreamer/resampler.c
+4
-0
video_processor.c
dlls/winegstreamer/video_processor.c
+4
-0
wma_decoder.c
dlls/winegstreamer/wma_decoder.c
+7
-3
No files found.
dlls/mf/tests/transform.c
View file @
ddf7026d
...
...
@@ -278,7 +278,6 @@ static void check_mft_set_input_type_required_(int line, IMFTransform *transform
hr
=
IMFTransform_SetInputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok_
(
__FILE__
,
line
)(
hr
==
S_OK
,
"SetInputType returned %#lx.
\n
"
,
hr
);
ref
=
IMFMediaType_Release
(
media_type
);
todo_wine_if
(
ref
==
1
)
ok_
(
__FILE__
,
line
)(
!
ref
,
"Release returned %lu
\n
"
,
ref
);
}
...
...
@@ -309,7 +308,6 @@ static void check_mft_set_output_type_required_(int line, IMFTransform *transfor
hr
=
IMFTransform_SetOutputType
(
transform
,
0
,
media_type
,
MFT_SET_TYPE_TEST_ONLY
);
ok_
(
__FILE__
,
line
)(
hr
==
S_OK
,
"SetOutputType returned %#lx.
\n
"
,
hr
);
ref
=
IMFMediaType_Release
(
media_type
);
todo_wine_if
(
ref
==
1
)
ok_
(
__FILE__
,
line
)(
!
ref
,
"Release returned %lu
\n
"
,
ref
);
}
...
...
dlls/winegstreamer/color_convert.c
View file @
ddf7026d
...
...
@@ -401,6 +401,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
break
;
if
(
i
==
ARRAY_SIZE
(
input_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
!
impl
->
input_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
impl
->
input_type
)))
return
hr
;
...
...
@@ -444,6 +446,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
break
;
if
(
i
==
ARRAY_SIZE
(
output_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
!
impl
->
output_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
impl
->
output_type
)))
return
hr
;
...
...
dlls/winegstreamer/h264_decoder.c
View file @
ddf7026d
...
...
@@ -419,6 +419,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
break
;
if
(
i
==
ARRAY_SIZE
(
h264_decoder_input_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
decoder
->
output_type
)
{
...
...
@@ -469,6 +471,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
||
(
frame_size
>>
32
)
!=
decoder
->
wg_format
.
u
.
video
.
width
||
(
UINT32
)
frame_size
!=
decoder
->
wg_format
.
u
.
video
.
height
)
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
decoder
->
output_type
)
IMFMediaType_Release
(
decoder
->
output_type
);
...
...
dlls/winegstreamer/resampler.c
View file @
ddf7026d
...
...
@@ -383,6 +383,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
if
(
FAILED
(
hr
=
check_media_type
(
type
)))
return
hr
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
!
impl
->
input_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
impl
->
input_type
)))
return
hr
;
...
...
@@ -414,6 +416,8 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
if
(
FAILED
(
hr
=
check_media_type
(
type
)))
return
hr
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
!
impl
->
output_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
impl
->
output_type
)))
return
hr
;
...
...
dlls/winegstreamer/video_processor.c
View file @
ddf7026d
...
...
@@ -376,6 +376,8 @@ static HRESULT WINAPI video_processor_SetInputType(IMFTransform *iface, DWORD id
break
;
if
(
i
==
ARRAY_SIZE
(
input_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
impl
->
input_type
)
IMFMediaType_Release
(
impl
->
input_type
);
...
...
@@ -413,6 +415,8 @@ static HRESULT WINAPI video_processor_SetOutputType(IMFTransform *iface, DWORD i
break
;
if
(
i
==
ARRAY_SIZE
(
output_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
impl
->
output_type
)
IMFMediaType_Release
(
impl
->
output_type
);
...
...
dlls/winegstreamer/wma_decoder.c
View file @
ddf7026d
...
...
@@ -387,6 +387,8 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
if
(
FAILED
(
IMFMediaType_GetItemType
(
type
,
&
MF_MT_AUDIO_NUM_CHANNELS
,
&
item_type
))
||
item_type
!=
MF_ATTRIBUTE_UINT32
)
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
!
decoder
->
input_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
decoder
->
input_type
)))
return
hr
;
...
...
@@ -443,9 +445,6 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
return
hr
;
}
if
(
FAILED
(
IMFMediaType_SetUINT32
(
decoder
->
input_type
,
&
MF_MT_AUDIO_BITS_PER_SAMPLE
,
sample_size
)))
return
MF_E_INVALIDMEDIATYPE
;
if
(
FAILED
(
IMFMediaType_GetItemType
(
type
,
&
MF_MT_AUDIO_AVG_BYTES_PER_SECOND
,
&
item_type
))
||
item_type
!=
MF_ATTRIBUTE_UINT32
)
return
MF_E_INVALIDMEDIATYPE
;
...
...
@@ -461,6 +460,11 @@ static HRESULT WINAPI transform_SetOutputType(IMFTransform *iface, DWORD id, IMF
if
(
FAILED
(
IMFMediaType_GetItemType
(
type
,
&
MF_MT_AUDIO_BLOCK_ALIGNMENT
,
&
item_type
))
||
item_type
!=
MF_ATTRIBUTE_UINT32
)
return
MF_E_INVALIDMEDIATYPE
;
if
(
flags
&
MFT_SET_TYPE_TEST_ONLY
)
return
S_OK
;
if
(
FAILED
(
IMFMediaType_SetUINT32
(
decoder
->
input_type
,
&
MF_MT_AUDIO_BITS_PER_SAMPLE
,
sample_size
)))
return
MF_E_INVALIDMEDIATYPE
;
if
(
!
decoder
->
output_type
&&
FAILED
(
hr
=
MFCreateMediaType
(
&
decoder
->
output_type
)))
return
hr
;
...
...
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