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
1e3d4a1d
Commit
1e3d4a1d
authored
Jan 31, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement _GetInputStatus() for h264 decoder transform.
parent
efb819c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
transform.c
dlls/mf/tests/transform.c
+31
-0
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+9
-2
No files found.
dlls/mf/tests/transform.c
View file @
1e3d4a1d
...
@@ -3505,6 +3505,7 @@ static void test_h264_decoder(void)
...
@@ -3505,6 +3505,7 @@ static void test_h264_decoder(void)
IMFMediaType
*
media_type
;
IMFMediaType
*
media_type
;
IMFTransform
*
transform
;
IMFTransform
*
transform
;
ULONG
i
,
ret
,
ref
;
ULONG
i
,
ret
,
ref
;
DWORD
flags
;
HRESULT
hr
;
HRESULT
hr
;
hr
=
CoInitialize
(
NULL
);
hr
=
CoInitialize
(
NULL
);
...
@@ -3541,6 +3542,11 @@ static void test_h264_decoder(void)
...
@@ -3541,6 +3542,11 @@ static void test_h264_decoder(void)
hr
=
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
0
,
&
media_type
);
hr
=
IMFTransform_GetOutputAvailableType
(
transform
,
0
,
0
,
&
media_type
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetOutputAvailableType returned %#lx
\n
"
,
hr
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"GetOutputAvailableType returned %#lx
\n
"
,
hr
);
flags
=
0xdeadbeef
;
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
MF_E_TRANSFORM_TYPE_NOT_SET
,
"Got %#lx
\n
"
,
hr
);
ok
(
flags
==
0xdeadbeef
,
"Got flags %#lx.
\n
"
,
flags
);
/* setting output media type first doesn't work */
/* setting output media type first doesn't work */
check_mft_set_output_type
(
transform
,
output_type_desc
,
MF_E_TRANSFORM_TYPE_NOT_SET
);
check_mft_set_output_type
(
transform
,
output_type_desc
,
MF_E_TRANSFORM_TYPE_NOT_SET
);
check_mft_get_output_current_type
(
transform
,
NULL
);
check_mft_get_output_current_type
(
transform
,
NULL
);
...
@@ -3629,12 +3635,20 @@ static void test_h264_decoder(void)
...
@@ -3629,12 +3635,20 @@ static void test_h264_decoder(void)
ret
=
IMFSample_Release
(
output_sample
);
ret
=
IMFSample_Release
(
output_sample
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
flags
=
0
;
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"Got %#lx
\n
"
,
hr
);
ok
(
flags
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Got flags %#lx.
\n
"
,
flags
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
input_sample
,
0
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
input_sample
,
0
);
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ret
=
IMFSample_Release
(
input_sample
);
ret
=
IMFSample_Release
(
input_sample
);
ok
(
ret
<=
1
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
<=
1
,
"Release returned %lu
\n
"
,
ret
);
input_sample
=
next_h264_sample
(
&
h264_encoded_data
,
&
h264_encoded_data_len
);
input_sample
=
next_h264_sample
(
&
h264_encoded_data
,
&
h264_encoded_data_len
);
flags
=
0
;
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"Got %#lx
\n
"
,
hr
);
ok
(
flags
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Got flags %#lx.
\n
"
,
flags
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
input_sample
,
0
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
input_sample
,
0
);
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ProcessInput returned %#lx
\n
"
,
hr
);
ret
=
IMFSample_Release
(
input_sample
);
ret
=
IMFSample_Release
(
input_sample
);
...
@@ -3757,6 +3771,23 @@ static void test_h264_decoder(void)
...
@@ -3757,6 +3771,23 @@ static void test_h264_decoder(void)
ret
=
IMFSample_Release
(
output_sample
);
ret
=
IMFSample_Release
(
output_sample
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
do
{
flags
=
0
;
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"Got %#lx
\n
"
,
hr
);
ok
(
flags
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Got flags %#lx.
\n
"
,
flags
);
hr
=
IMFTransform_ProcessInput
(
transform
,
0
,
input_sample
,
0
);
ok
(
hr
==
S_OK
||
hr
==
MF_E_NOTACCEPTING
,
"Got %#lx
\n
"
,
hr
);
input_sample
=
next_h264_sample
(
&
h264_encoded_data
,
&
h264_encoded_data_len
);
}
while
(
hr
==
S_OK
);
ok
(
hr
==
MF_E_NOTACCEPTING
,
"Got %#lx
\n
"
,
hr
);
flags
=
0
;
hr
=
IMFTransform_GetInputStatus
(
transform
,
0
,
&
flags
);
ok
(
hr
==
S_OK
,
"Got %#lx
\n
"
,
hr
);
ok
(
flags
==
MFT_INPUT_STATUS_ACCEPT_DATA
,
"Got flags %#lx.
\n
"
,
flags
);
ret
=
IMFTransform_Release
(
transform
);
ret
=
IMFTransform_Release
(
transform
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ok
(
ret
==
0
,
"Release returned %lu
\n
"
,
ret
);
ret
=
IMFSample_Release
(
input_sample
);
ret
=
IMFSample_Release
(
input_sample
);
...
...
dlls/winegstreamer/h264_decoder.c
View file @
1e3d4a1d
...
@@ -548,8 +548,15 @@ static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD
...
@@ -548,8 +548,15 @@ static HRESULT WINAPI transform_GetOutputCurrentType(IMFTransform *iface, DWORD
static
HRESULT
WINAPI
transform_GetInputStatus
(
IMFTransform
*
iface
,
DWORD
id
,
DWORD
*
flags
)
static
HRESULT
WINAPI
transform_GetInputStatus
(
IMFTransform
*
iface
,
DWORD
id
,
DWORD
*
flags
)
{
{
FIXME
(
"iface %p, id %#lx, flags %p stub!
\n
"
,
iface
,
id
,
flags
);
struct
h264_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, id %#lx, flags %p.
\n
"
,
iface
,
id
,
flags
);
if
(
!
decoder
->
wg_transform
)
return
MF_E_TRANSFORM_TYPE_NOT_SET
;
*
flags
=
MFT_INPUT_STATUS_ACCEPT_DATA
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
transform_GetOutputStatus
(
IMFTransform
*
iface
,
DWORD
*
flags
)
static
HRESULT
WINAPI
transform_GetOutputStatus
(
IMFTransform
*
iface
,
DWORD
*
flags
)
...
...
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