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
226f8b7c
Commit
226f8b7c
authored
May 25, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement MF_LOW_LATENCY attribute and latency query.
parent
036166fa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+4
-0
unixlib.h
dlls/winegstreamer/unixlib.h
+1
-0
wg_transform.c
dlls/winegstreamer/wg_transform.c
+23
-0
No files found.
dlls/winegstreamer/h264_decoder.c
View file @
226f8b7c
...
@@ -88,6 +88,7 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder)
...
@@ -88,6 +88,7 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder)
};
};
struct
wg_format
input_format
;
struct
wg_format
input_format
;
struct
wg_format
output_format
;
struct
wg_format
output_format
;
UINT32
low_latency
;
if
(
decoder
->
wg_transform
)
if
(
decoder
->
wg_transform
)
wg_transform_destroy
(
decoder
->
wg_transform
);
wg_transform_destroy
(
decoder
->
wg_transform
);
...
@@ -109,6 +110,9 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder)
...
@@ -109,6 +110,9 @@ static HRESULT try_create_wg_transform(struct h264_decoder *decoder)
output_format
.
u
.
video
.
fps_d
=
0
;
output_format
.
u
.
video
.
fps_d
=
0
;
output_format
.
u
.
video
.
fps_n
=
0
;
output_format
.
u
.
video
.
fps_n
=
0
;
if
(
SUCCEEDED
(
IMFAttributes_GetUINT32
(
decoder
->
attributes
,
&
MF_LOW_LATENCY
,
&
low_latency
)))
attrs
.
low_latency
=
!!
low_latency
;
if
(
!
(
decoder
->
wg_transform
=
wg_transform_create
(
&
input_format
,
&
output_format
,
&
attrs
)))
if
(
!
(
decoder
->
wg_transform
=
wg_transform_create
(
&
input_format
,
&
output_format
,
&
attrs
)))
return
E_FAIL
;
return
E_FAIL
;
...
...
dlls/winegstreamer/unixlib.h
View file @
226f8b7c
...
@@ -309,6 +309,7 @@ struct wg_transform_attrs
...
@@ -309,6 +309,7 @@ struct wg_transform_attrs
{
{
UINT32
output_plane_align
;
UINT32
output_plane_align
;
UINT32
input_queue_length
;
UINT32
input_queue_length
;
BOOL
low_latency
;
};
};
struct
wg_transform_create_params
struct
wg_transform_create_params
...
...
dlls/winegstreamer/wg_transform.c
View file @
226f8b7c
...
@@ -101,6 +101,26 @@ static GstFlowReturn transform_sink_chain_cb(GstPad *pad, GstObject *parent, Gst
...
@@ -101,6 +101,26 @@ static GstFlowReturn transform_sink_chain_cb(GstPad *pad, GstObject *parent, Gst
return
GST_FLOW_OK
;
return
GST_FLOW_OK
;
}
}
static
gboolean
transform_src_query_latency
(
struct
wg_transform
*
transform
,
GstQuery
*
query
)
{
GST_LOG
(
"transform %p, query %p"
,
transform
,
query
);
gst_query_set_latency
(
query
,
transform
->
attrs
.
low_latency
,
0
,
0
);
return
true
;
}
static
gboolean
transform_src_query_cb
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
{
struct
wg_transform
*
transform
=
gst_pad_get_element_private
(
pad
);
switch
(
query
->
type
)
{
case
GST_QUERY_LATENCY
:
return
transform_src_query_latency
(
transform
,
query
);
default:
return
gst_pad_query_default
(
pad
,
parent
,
query
);
}
}
static
gboolean
transform_sink_query_cb
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
static
gboolean
transform_sink_query_cb
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
{
{
struct
wg_transform
*
transform
=
gst_pad_get_element_private
(
pad
);
struct
wg_transform
*
transform
=
gst_pad_get_element_private
(
pad
);
...
@@ -312,6 +332,9 @@ NTSTATUS wg_transform_create(void *args)
...
@@ -312,6 +332,9 @@ NTSTATUS wg_transform_create(void *args)
if
(
!
transform
->
my_src
)
if
(
!
transform
->
my_src
)
goto
out
;
goto
out
;
gst_pad_set_element_private
(
transform
->
my_src
,
transform
);
gst_pad_set_query_function
(
transform
->
my_src
,
transform_src_query_cb
);
if
(
!
(
transform
->
output_caps
=
wg_format_to_caps
(
&
output_format
)))
if
(
!
(
transform
->
output_caps
=
wg_format_to_caps
(
&
output_format
)))
goto
out
;
goto
out
;
if
(
!
(
template
=
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
transform
->
output_caps
)))
if
(
!
(
template
=
gst_pad_template_new
(
"sink"
,
GST_PAD_SINK
,
GST_PAD_ALWAYS
,
transform
->
output_caps
)))
...
...
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