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
1173a2e0
Commit
1173a2e0
authored
Oct 25, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Oct 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Introduce factory_create_element.
parent
eb7571c8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
unix_private.h
dlls/winegstreamer/unix_private.h
+1
-0
unixlib.c
dlls/winegstreamer/unixlib.c
+15
-5
No files found.
dlls/winegstreamer/unix_private.h
View file @
1173a2e0
...
@@ -35,6 +35,7 @@ extern NTSTATUS wg_init_gstreamer(void *args) DECLSPEC_HIDDEN;
...
@@ -35,6 +35,7 @@ extern NTSTATUS wg_init_gstreamer(void *args) DECLSPEC_HIDDEN;
extern
GstStreamType
stream_type_from_caps
(
GstCaps
*
caps
)
DECLSPEC_HIDDEN
;
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
*
create_element
(
const
char
*
name
,
const
char
*
plugin_set
)
DECLSPEC_HIDDEN
;
GstElement
*
factory_create_element
(
GstElementFactory
*
factory
)
DECLSPEC_HIDDEN
;
extern
GList
*
find_element_factories
(
GstElementFactoryListType
type
,
GstRank
min_rank
,
extern
GList
*
find_element_factories
(
GstElementFactoryListType
type
,
GstRank
min_rank
,
GstCaps
*
element_sink_caps
,
GstCaps
*
element_src_caps
)
DECLSPEC_HIDDEN
;
GstCaps
*
element_sink_caps
,
GstCaps
*
element_src_caps
)
DECLSPEC_HIDDEN
;
extern
GstElement
*
find_element
(
GstElementFactoryListType
type
,
extern
GstElement
*
find_element
(
GstElementFactoryListType
type
,
...
...
dlls/winegstreamer/unixlib.c
View file @
1173a2e0
...
@@ -78,6 +78,19 @@ GstElement *create_element(const char *name, const char *plugin_set)
...
@@ -78,6 +78,19 @@ GstElement *create_element(const char *name, const char *plugin_set)
return
element
;
return
element
;
}
}
GstElement
*
factory_create_element
(
GstElementFactory
*
factory
)
{
GstElement
*
element
;
if
((
element
=
gst_element_factory_create
(
factory
,
NULL
)))
GST_INFO
(
"Created element %"
GST_PTR_FORMAT
" from factory %"
GST_PTR_FORMAT
"."
,
element
,
factory
);
else
GST_WARNING
(
"Failed to create element from factory %"
GST_PTR_FORMAT
"."
,
factory
);
return
element
;
}
GList
*
find_element_factories
(
GstElementFactoryListType
type
,
GstRank
min_rank
,
GList
*
find_element_factories
(
GstElementFactoryListType
type
,
GstRank
min_rank
,
GstCaps
*
element_sink_caps
,
GstCaps
*
element_src_caps
)
GstCaps
*
element_sink_caps
,
GstCaps
*
element_src_caps
)
{
{
...
@@ -135,15 +148,12 @@ GstElement *find_element(GstElementFactoryListType type, GstCaps *element_sink_c
...
@@ -135,15 +148,12 @@ GstElement *find_element(GstElementFactoryListType type, GstCaps *element_sink_c
continue
;
continue
;
}
}
if
(
!
(
element
=
gst_element_factory_create
(
GST_ELEMENT_FACTORY
(
tmp
->
data
),
NULL
)))
element
=
factory_create_element
(
GST_ELEMENT_FACTORY
(
tmp
->
data
));
GST_WARNING
(
"Failed to create %s element."
,
name
);
}
}
gst_plugin_feature_list_free
(
transforms
);
gst_plugin_feature_list_free
(
transforms
);
if
(
element
)
if
(
!
element
)
GST_DEBUG
(
"Created %s element %p."
,
name
,
element
);
else
GST_WARNING
(
"Failed to create element matching caps %"
GST_PTR_FORMAT
" / %"
GST_PTR_FORMAT
"."
,
GST_WARNING
(
"Failed to create element matching caps %"
GST_PTR_FORMAT
" / %"
GST_PTR_FORMAT
"."
,
element_sink_caps
,
element_src_caps
);
element_sink_caps
,
element_src_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