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
61783928
Commit
61783928
authored
Sep 06, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Better implement H264 MFT GetAttributes and GetOutputStreamAttributes.
parent
5db72186
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
11 deletions
+43
-11
transform.c
dlls/mf/tests/transform.c
+0
-1
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+43
-10
No files found.
dlls/mf/tests/transform.c
View file @
61783928
...
...
@@ -2326,7 +2326,6 @@ static void test_h264_decoder(void)
hr
=
IMFAttributes_SetUINT32
(
attributes
,
&
MF_LOW_LATENCY
,
1
);
ok
(
hr
==
S_OK
,
"SetUINT32 returned %#lx
\n
"
,
hr
);
ret
=
IMFAttributes_Release
(
attributes
);
todo_wine
ok
(
ret
==
1
,
"Release returned %ld
\n
"
,
ret
);
/* no output type is available before an input type is set */
...
...
dlls/winegstreamer/h264_decoder.c
View file @
61783928
...
...
@@ -47,6 +47,9 @@ struct h264_decoder
{
IMFTransform
IMFTransform_iface
;
LONG
refcount
;
IMFAttributes
*
attributes
;
IMFAttributes
*
output_attributes
;
IMFMediaType
*
input_type
;
IMFMediaType
*
output_type
;
...
...
@@ -238,6 +241,10 @@ static ULONG WINAPI transform_Release(IMFTransform *iface)
IMFMediaType_Release
(
decoder
->
input_type
);
if
(
decoder
->
output_type
)
IMFMediaType_Release
(
decoder
->
output_type
);
if
(
decoder
->
output_attributes
)
IMFAttributes_Release
(
decoder
->
output_attributes
);
if
(
decoder
->
attributes
)
IMFAttributes_Release
(
decoder
->
attributes
);
wg_sample_queue_destroy
(
decoder
->
wg_sample_queue
);
free
(
decoder
);
...
...
@@ -305,8 +312,15 @@ static HRESULT WINAPI transform_GetOutputStreamInfo(IMFTransform *iface, DWORD i
static
HRESULT
WINAPI
transform_GetAttributes
(
IMFTransform
*
iface
,
IMFAttributes
**
attributes
)
{
FIXME
(
"iface %p, attributes %p stub!
\n
"
,
iface
,
attributes
);
return
MFCreateAttributes
(
attributes
,
0
);
struct
h264_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
FIXME
(
"iface %p, attributes %p semi-stub!
\n
"
,
iface
,
attributes
);
if
(
!
attributes
)
return
E_POINTER
;
IMFAttributes_AddRef
((
*
attributes
=
decoder
->
attributes
));
return
S_OK
;
}
static
HRESULT
WINAPI
transform_GetInputStreamAttributes
(
IMFTransform
*
iface
,
DWORD
id
,
IMFAttributes
**
attributes
)
...
...
@@ -315,11 +329,19 @@ static HRESULT WINAPI transform_GetInputStreamAttributes(IMFTransform *iface, DW
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
transform_GetOutputStreamAttributes
(
IMFTransform
*
iface
,
DWORD
id
,
IMFAttributes
**
attributes
)
static
HRESULT
WINAPI
transform_GetOutputStreamAttributes
(
IMFTransform
*
iface
,
DWORD
id
,
IMFAttributes
**
attributes
)
{
FIXME
(
"iface %p, id %#lx, attributes %p stub!
\n
"
,
iface
,
id
,
attributes
);
return
E_NOTIMPL
;
struct
h264_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
FIXME
(
"iface %p, id %#lx, attributes %p semi-stub!
\n
"
,
iface
,
id
,
attributes
);
if
(
!
attributes
)
return
E_POINTER
;
if
(
id
)
return
MF_E_INVALIDSTREAMNUMBER
;
IMFAttributes_AddRef
((
*
attributes
=
decoder
->
output_attributes
));
return
S_OK
;
}
static
HRESULT
WINAPI
transform_DeleteInputStream
(
IMFTransform
*
iface
,
DWORD
id
)
...
...
@@ -708,13 +730,24 @@ HRESULT h264_decoder_create(REFIID riid, void **ret)
decoder
->
wg_format
.
u
.
video
.
fps_n
=
30000
;
decoder
->
wg_format
.
u
.
video
.
fps_d
=
1001
;
if
(
FAILED
(
hr
=
MFCreateAttributes
(
&
decoder
->
attributes
,
16
)))
goto
failed
;
if
(
FAILED
(
hr
=
IMFAttributes_SetUINT32
(
decoder
->
attributes
,
&
MF_LOW_LATENCY
,
0
)))
goto
failed
;
if
(
FAILED
(
hr
=
MFCreateAttributes
(
&
decoder
->
output_attributes
,
0
)))
goto
failed
;
if
(
FAILED
(
hr
=
wg_sample_queue_create
(
&
decoder
->
wg_sample_queue
)))
{
free
(
decoder
);
return
hr
;
}
goto
failed
;
*
ret
=
&
decoder
->
IMFTransform_iface
;
TRACE
(
"Created decoder %p
\n
"
,
*
ret
);
return
S_OK
;
failed:
if
(
decoder
->
output_attributes
)
IMFAttributes_Release
(
decoder
->
output_attributes
);
if
(
decoder
->
attributes
)
IMFAttributes_Release
(
decoder
->
attributes
);
free
(
decoder
);
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