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
97555dff
Commit
97555dff
authored
Aug 16, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Sep 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Add push_event wrapper.
parent
aa15f41d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
14 deletions
+29
-14
unix_private.h
dlls/winegstreamer/unix_private.h
+1
-0
unixlib.c
dlls/winegstreamer/unixlib.c
+14
-0
wg_parser.c
dlls/winegstreamer/wg_parser.c
+6
-6
wg_transform.c
dlls/winegstreamer/wg_transform.c
+8
-8
No files found.
dlls/winegstreamer/unix_private.h
View file @
97555dff
...
...
@@ -39,6 +39,7 @@ extern GstElement *find_element(GstElementFactoryListType type, GstCaps *src_cap
extern
bool
append_element
(
GstElement
*
container
,
GstElement
*
element
,
GstElement
**
first
,
GstElement
**
last
)
DECLSPEC_HIDDEN
;
extern
bool
link_src_to_element
(
GstPad
*
src_pad
,
GstElement
*
element
)
DECLSPEC_HIDDEN
;
extern
bool
link_element_to_sink
(
GstElement
*
element
,
GstPad
*
sink_pad
)
DECLSPEC_HIDDEN
;
extern
bool
push_event
(
GstPad
*
pad
,
GstEvent
*
event
)
DECLSPEC_HIDDEN
;
/* wg_format.c */
...
...
dlls/winegstreamer/unixlib.c
View file @
97555dff
...
...
@@ -202,6 +202,20 @@ bool link_element_to_sink(GstElement *element, GstPad *sink_pad)
return
!
ret
;
}
bool
push_event
(
GstPad
*
pad
,
GstEvent
*
event
)
{
if
(
!
gst_pad_push_event
(
pad
,
event
))
{
const
gchar
*
type_name
=
gst_event_type_get_name
(
GST_EVENT_TYPE
(
event
));
gchar
*
pad_name
=
gst_pad_get_name
(
pad
);
GST_ERROR
(
"Failed to push %s event %p to pad %s."
,
type_name
,
event
,
pad_name
);
g_free
(
pad_name
);
return
false
;
}
return
true
;
}
NTSTATUS
wg_init_gstreamer
(
void
*
arg
)
{
char
arg0
[]
=
"wine"
;
...
...
dlls/winegstreamer/wg_parser.c
View file @
97555dff
...
...
@@ -258,7 +258,7 @@ static NTSTATUS wg_parser_stream_enable(void *args)
gst_util_set_object_arg
(
G_OBJECT
(
stream
->
flip
),
"method"
,
flip
?
"vertical-flip"
:
"none"
);
}
gst_pad_
push_event
(
stream
->
my_sink
,
gst_event_new_reconfigure
());
push_event
(
stream
->
my_sink
,
gst_event_new_reconfigure
());
return
S_OK
;
}
...
...
@@ -450,7 +450,7 @@ static NTSTATUS wg_parser_stream_seek(void *args)
if
((
stop_flags
&
AM_SEEKING_PositioningBitsMask
)
==
AM_SEEKING_NoPositioning
)
stop_type
=
GST_SEEK_TYPE_NONE
;
if
(
!
gst_pad_
push_event
(
get_stream
(
params
->
stream
)
->
my_sink
,
gst_event_new_seek
(
params
->
rate
,
GST_FORMAT_TIME
,
if
(
!
push_event
(
get_stream
(
params
->
stream
)
->
my_sink
,
gst_event_new_seek
(
params
->
rate
,
GST_FORMAT_TIME
,
flags
,
start_type
,
params
->
start_pos
*
100
,
stop_type
,
params
->
stop_pos
*
100
)))
GST_ERROR
(
"Failed to seek.
\n
"
);
...
...
@@ -480,7 +480,7 @@ static NTSTATUS wg_parser_stream_notify_qos(void *args)
if
(
!
(
event
=
gst_event_new_qos
(
params
->
underflow
?
GST_QOS_TYPE_UNDERFLOW
:
GST_QOS_TYPE_OVERFLOW
,
params
->
proportion
,
params
->
diff
*
100
,
stream_time
)))
GST_ERROR
(
"Failed to create QOS event.
\n
"
);
gst_pad_
push_event
(
stream
->
my_sink
,
event
);
push_event
(
stream
->
my_sink
,
event
);
return
S_OK
;
}
...
...
@@ -1292,7 +1292,7 @@ static void *push_data(void *arg)
gst_buffer_unref
(
buffer
);
gst_pad_
push_event
(
parser
->
my_src
,
gst_event_new_eos
());
push_event
(
parser
->
my_src
,
gst_event_new_eos
());
GST_DEBUG
(
"Stopping push thread."
);
...
...
@@ -1421,7 +1421,7 @@ static gboolean src_perform_seek(struct wg_parser *parser, GstEvent *event)
{
flush_event
=
gst_event_new_flush_start
();
gst_event_set_seqnum
(
flush_event
,
seqnum
);
gst_pad_
push_event
(
parser
->
my_src
,
flush_event
);
push_event
(
parser
->
my_src
,
flush_event
);
if
(
thread
)
gst_pad_set_active
(
parser
->
my_src
,
1
);
}
...
...
@@ -1433,7 +1433,7 @@ static gboolean src_perform_seek(struct wg_parser *parser, GstEvent *event)
{
flush_event
=
gst_event_new_flush_stop
(
TRUE
);
gst_event_set_seqnum
(
flush_event
,
seqnum
);
gst_pad_
push_event
(
parser
->
my_src
,
flush_event
);
push_event
(
parser
->
my_src
,
flush_event
);
if
(
thread
)
gst_pad_set_active
(
parser
->
my_src
,
1
);
}
...
...
dlls/winegstreamer/wg_transform.c
View file @
97555dff
...
...
@@ -443,10 +443,10 @@ NTSTATUS wg_transform_create(void *args)
goto
out
;
if
(
!
(
event
=
gst_event_new_stream_start
(
"stream"
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
out
;
if
(
!
(
event
=
gst_event_new_caps
(
src_caps
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
out
;
/* We need to use GST_FORMAT_TIME here because it's the only format
...
...
@@ -455,7 +455,7 @@ NTSTATUS wg_transform_create(void *args)
transform
->
segment
.
start
=
0
;
transform
->
segment
.
stop
=
-
1
;
if
(
!
(
event
=
gst_event_new_segment
(
&
transform
->
segment
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
out
;
gst_caps_unref
(
src_caps
);
...
...
@@ -531,7 +531,7 @@ NTSTATUS wg_transform_set_output_format(void *args)
value
=
"none"
;
gst_util_set_object_arg
(
G_OBJECT
(
transform
->
video_flip
),
"method"
,
value
);
}
if
(
!
gst_pad_
push_event
(
transform
->
my_sink
,
gst_event_new_reconfigure
()))
if
(
!
push_event
(
transform
->
my_sink
,
gst_event_new_reconfigure
()))
{
GST_ERROR
(
"Failed to reconfigure transform %p."
,
transform
);
return
STATUS_UNSUCCESSFUL
;
...
...
@@ -892,16 +892,16 @@ NTSTATUS wg_transform_drain(void *args)
}
if
(
!
(
event
=
gst_event_new_segment_done
(
GST_FORMAT_TIME
,
-
1
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
error
;
if
(
!
(
event
=
gst_event_new_eos
())
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
error
;
if
(
!
(
event
=
gst_event_new_stream_start
(
"stream"
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
error
;
if
(
!
(
event
=
gst_event_new_segment
(
&
transform
->
segment
))
||
!
gst_pad_
push_event
(
transform
->
my_src
,
event
))
||
!
push_event
(
transform
->
my_src
,
event
))
goto
error
;
return
STATUS_SUCCESS
;
...
...
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