Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GStreamer
gst-editing-services
Commits
c834ce5b
Commit
c834ce5b
authored
Jul 25, 2020
by
Thibault Saunier
🌵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ges-source: Ensure that we output stream with segments in time
Part-of: <
!198
>
parent
8c622b18
Pipeline
#184518
waiting for manual action with stages
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
ges/ges-uri-source.c
ges/ges-uri-source.c
+23
-2
No files found.
ges/ges-uri-source.c
View file @
c834ce5b
...
...
@@ -61,6 +61,8 @@ autoplug_select_cb (GstElement * bin, GstPad * pad, GstCaps * caps,
{
GstElement
*
nlesrc
;
GstCaps
*
downstream_caps
;
GstQuery
*
segment_query
=
NULL
;
GstFormat
segment_format
;
GstAutoplugSelectResult
res
=
GST_AUTOPLUG_SELECT_TRY
;
gchar
*
stream_id
=
gst_pad_get_stream_id
(
pad
);
const
gchar
*
wanted_id
=
...
...
@@ -79,13 +81,30 @@ autoplug_select_cb (GstElement * bin, GstPad * pad, GstCaps * caps,
goto
done
;
}
segment_query
=
gst_query_new_segment
(
GST_FORMAT_TIME
);
if
(
!
gst_pad_query
(
pad
,
segment_query
))
{
GST_DEBUG_OBJECT
(
pad
,
"Could not query segment"
);
goto
done
;
}
gst_query_parse_segment
(
segment_query
,
NULL
,
&
segment_format
,
NULL
,
NULL
);
if
(
segment_format
!=
GST_FORMAT_TIME
)
{
GST_DEBUG_OBJECT
(
pad
,
"Segment not in %s != time for %"
GST_PTR_FORMAT
"... continue plugin elements"
,
gst_format_get_name
(
segment_format
),
caps
);
goto
done
;
}
nlesrc
=
ges_track_element_get_nleobject
(
self
->
element
);
downstream_caps
=
gst_pad_peer_query_caps
(
nlesrc
->
srcpads
->
data
,
NULL
);
if
(
downstream_caps
&&
gst_caps_can_intersect
(
downstream_caps
,
caps
))
{
if
(
wanted
)
{
res
=
GST_AUTOPLUG_SELECT_EXPOSE
;
GST_
DEBUG
_OBJECT
(
self
,
"Exposing %"
GST_PTR_FORMAT
" with stream id: %s"
,
pad
,
stream_id
);
GST_
INFO
_OBJECT
(
self
,
"Exposing %"
GST_PTR_FORMAT
" with stream id: %s"
,
caps
,
stream_id
);
}
else
{
res
=
GST_AUTOPLUG_SELECT_SKIP
;
GST_DEBUG_OBJECT
(
self
->
element
,
"Totally skipping %s"
,
stream_id
);
...
...
@@ -95,6 +114,8 @@ autoplug_select_cb (GstElement * bin, GstPad * pad, GstCaps * caps,
done:
g_free
(
stream_id
);
gst_clear_query
(
&
segment_query
);
return
res
;
}
...
...
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