mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
Enhance some pad linking issue debug logging.
This commit is contained in:
parent
5098e1066b
commit
c37fac7c27
2 changed files with 24 additions and 6 deletions
|
@ -637,7 +637,7 @@ get_compatible_unlinked_pad (GstElement * element, GESTrack * track)
|
|||
pads = gst_element_iterate_sink_pads (element);
|
||||
srccaps = ges_track_get_caps (track);
|
||||
|
||||
GST_DEBUG ("srccaps %" GST_PTR_FORMAT, srccaps);
|
||||
GST_DEBUG_OBJECT (track, "srccaps %" GST_PTR_FORMAT, srccaps);
|
||||
|
||||
while (!done) {
|
||||
switch (gst_iterator_next (pads, &paditem)) {
|
||||
|
@ -648,7 +648,7 @@ get_compatible_unlinked_pad (GstElement * element, GESTrack * track)
|
|||
if (!gst_pad_is_linked (testpad)) {
|
||||
GstCaps *sinkcaps = gst_pad_query_caps (testpad, NULL);
|
||||
|
||||
GST_DEBUG ("sinkccaps %" GST_PTR_FORMAT, sinkcaps);
|
||||
GST_DEBUG_OBJECT (track, "sinkccaps %" GST_PTR_FORMAT, sinkcaps);
|
||||
|
||||
if (gst_caps_can_intersect (srccaps, sinkcaps)) {
|
||||
res = gst_object_ref (testpad);
|
||||
|
@ -734,7 +734,8 @@ _link_track (GESPipeline * self, GESTrack * track)
|
|||
chain = new_output_chain_for_track (self, track);
|
||||
|
||||
if (chain->tee) {
|
||||
GST_INFO_OBJECT (self, "Chain is already built");
|
||||
GST_INFO_OBJECT (self, "Chain is already built (%" GST_PTR_FORMAT ")",
|
||||
chain->encodebinpad ? chain->encodebinpad : chain->playsinkpad);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -828,10 +829,11 @@ _link_track (GESPipeline * self, GESTrack * track)
|
|||
/* If no compatible static pad is available, request a pad */
|
||||
g_signal_emit_by_name (self->priv->encodebin, "request-pad", caps,
|
||||
&sinkpad);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
if (G_UNLIKELY (sinkpad == NULL)) {
|
||||
GST_INFO_OBJECT (self, "Couldn't get a pad from encodebin !");
|
||||
GST_INFO_OBJECT (self, "Couldn't get a pad from encodebin for: %"
|
||||
GST_PTR_FORMAT, caps);
|
||||
gst_caps_unref (caps);
|
||||
gst_element_set_locked_state (GST_ELEMENT (track), TRUE);
|
||||
|
||||
self->priv->not_rendered_tracks =
|
||||
|
@ -840,8 +842,11 @@ _link_track (GESPipeline * self, GESTrack * track)
|
|||
|
||||
goto error;
|
||||
}
|
||||
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
chain->encodebinpad = sinkpad;
|
||||
GST_INFO_OBJECT (track, "Linked to %" GST_PTR_FORMAT, sinkpad);
|
||||
}
|
||||
|
||||
tmppad = gst_element_get_request_pad (chain->tee, "src_%u");
|
||||
|
|
|
@ -45,8 +45,21 @@ struct _GESSourcePrivate
|
|||
static void
|
||||
_pad_added_cb (GstElement * element, GstPad * srcpad, GstPad * sinkpad)
|
||||
{
|
||||
GstPadLinkReturn res;
|
||||
gst_element_no_more_pads (element);
|
||||
gst_pad_link (srcpad, sinkpad);
|
||||
res = gst_pad_link (srcpad, sinkpad);
|
||||
if (res != GST_PAD_LINK_OK) {
|
||||
GstCaps *srccaps = NULL;
|
||||
GstCaps *sinkcaps = NULL;
|
||||
|
||||
srccaps = gst_pad_query_caps (srcpad, NULL);
|
||||
sinkcaps = gst_pad_query_caps (sinkpad, NULL);
|
||||
|
||||
GST_ERROR_OBJECT (element, "Could not link source with "
|
||||
"conversion bin: %s (srcpad caps %" GST_PTR_FORMAT
|
||||
" sinkpad caps: %" GST_PTR_FORMAT ")",
|
||||
gst_pad_link_get_name (res), srccaps, sinkcaps);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue