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
0c84f713
Commit
0c84f713
authored
Sep 22, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Introduce link_src_to_sink.
parent
29b35f6b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
unix_private.h
dlls/winegstreamer/unix_private.h
+1
-0
unixlib.c
dlls/winegstreamer/unixlib.c
+18
-16
wg_parser.c
dlls/winegstreamer/wg_parser.c
+2
-5
No files found.
dlls/winegstreamer/unix_private.h
View file @
0c84f713
...
...
@@ -37,6 +37,7 @@ extern GstStreamType stream_type_from_caps(GstCaps *caps) DECLSPEC_HIDDEN;
extern
GstElement
*
create_element
(
const
char
*
name
,
const
char
*
plugin_set
)
DECLSPEC_HIDDEN
;
extern
GstElement
*
find_element
(
GstElementFactoryListType
type
,
GstCaps
*
src_caps
,
GstCaps
*
sink_caps
)
DECLSPEC_HIDDEN
;
extern
bool
append_element
(
GstElement
*
container
,
GstElement
*
element
,
GstElement
**
first
,
GstElement
**
last
)
DECLSPEC_HIDDEN
;
extern
bool
link_src_to_sink
(
GstPad
*
src_pad
,
GstPad
*
sink_pad
)
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
;
...
...
dlls/winegstreamer/unixlib.c
View file @
0c84f713
...
...
@@ -162,6 +162,20 @@ bool append_element(GstElement *container, GstElement *element, GstElement **fir
return
success
;
}
bool
link_src_to_sink
(
GstPad
*
src_pad
,
GstPad
*
sink_pad
)
{
GstPadLinkReturn
ret
;
if
((
ret
=
gst_pad_link
(
src_pad
,
sink_pad
))
!=
GST_PAD_LINK_OK
)
{
GST_ERROR
(
"Failed to link src pad %"
GST_PTR_FORMAT
" to sink pad %"
GST_PTR_FORMAT
", reason: %s"
,
src_pad
,
sink_pad
,
gst_pad_link_get_name
(
ret
));
return
false
;
}
return
true
;
}
bool
link_src_to_element
(
GstPad
*
src_pad
,
GstElement
*
element
)
{
GstPadLinkReturn
ret
;
...
...
@@ -174,15 +188,9 @@ bool link_src_to_element(GstPad *src_pad, GstElement *element)
g_free
(
name
);
return
false
;
}
if
((
ret
=
gst_pad_link
(
src_pad
,
sink_pad
)))
{
gchar
*
src_name
=
gst_pad_get_name
(
src_pad
),
*
sink_name
=
gst_pad_get_name
(
sink_pad
);
GST_ERROR
(
"Failed to link element pad %s with pad %s"
,
src_name
,
sink_name
);
g_free
(
sink_name
);
g_free
(
src_name
);
}
ret
=
link_src_to_sink
(
src_pad
,
sink_pad
);
gst_object_unref
(
sink_pad
);
return
!
ret
;
return
ret
;
}
bool
link_element_to_sink
(
GstElement
*
element
,
GstPad
*
sink_pad
)
...
...
@@ -197,15 +205,9 @@ bool link_element_to_sink(GstElement *element, GstPad *sink_pad)
g_free
(
name
);
return
false
;
}
if
((
ret
=
gst_pad_link
(
src_pad
,
sink_pad
)))
{
gchar
*
src_name
=
gst_pad_get_name
(
src_pad
),
*
sink_name
=
gst_pad_get_name
(
sink_pad
);
GST_ERROR
(
"Failed to link pad %s with element pad %s"
,
src_name
,
sink_name
);
g_free
(
sink_name
);
g_free
(
src_name
);
}
ret
=
link_src_to_sink
(
src_pad
,
sink_pad
);
gst_object_unref
(
src_pad
);
return
!
ret
;
return
ret
;
}
bool
push_event
(
GstPad
*
pad
,
GstEvent
*
event
)
...
...
dlls/winegstreamer/wg_parser.c
View file @
0c84f713
...
...
@@ -849,7 +849,6 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser
struct
wg_parser
*
parser
=
stream
->
parser
;
const
char
*
name
;
GstCaps
*
caps
;
int
ret
;
caps
=
gst_pad_query_caps
(
pad
,
NULL
);
name
=
gst_structure_get_name
(
gst_caps_get_structure
(
caps
,
0
));
...
...
@@ -898,11 +897,9 @@ static bool stream_create_post_processing_elements(GstPad *pad, struct wg_parser
if
(
!
link_src_to_element
(
pad
,
first
)
||
!
link_element_to_sink
(
last
,
stream
->
my_sink
))
return
false
;
}
else
if
((
ret
=
gst_pad_link
(
pad
,
stream
->
my_sink
))
<
0
)
else
{
GST_ERROR
(
"Failed to link decodebin source pad to our sink pad, error %s."
,
gst_pad_link_get_name
(
ret
));
return
false
;
return
link_src_to_sink
(
pad
,
stream
->
my_sink
);
}
return
true
;
...
...
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