mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
rtp: improve basertpdepayload's error message when no input caps were set
This is pretty much an FAQ, so try to make the error message a bit more helpful. Also, don't tell people to file a bug in bugzilla about this (which is what happens if the default error message for CORE_NEGOTIATION is used).
This commit is contained in:
parent
9fd1c48267
commit
b550eabdac
1 changed files with 23 additions and 4 deletions
|
@ -240,10 +240,15 @@ gst_base_rtp_depayload_setcaps (GstPad * pad, GstCaps * caps)
|
|||
else
|
||||
priv->play_scale = 1.0;
|
||||
|
||||
if (bclass->set_caps)
|
||||
if (bclass->set_caps) {
|
||||
res = bclass->set_caps (filter, caps);
|
||||
else
|
||||
if (!res) {
|
||||
GST_WARNING_OBJECT (filter, "Subclass rejected caps %" GST_PTR_FORMAT,
|
||||
caps);
|
||||
}
|
||||
} else {
|
||||
res = TRUE;
|
||||
}
|
||||
|
||||
priv->negotiated = res;
|
||||
|
||||
|
@ -357,8 +362,22 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in)
|
|||
not_negotiated:
|
||||
{
|
||||
/* this is not fatal but should be filtered earlier */
|
||||
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION, (NULL),
|
||||
("Not RTP format was negotiated"));
|
||||
if (GST_BUFFER_CAPS (in) == NULL) {
|
||||
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION,
|
||||
("No RTP format was negotiated."),
|
||||
("Input buffers need to have RTP caps set on them. This is usually "
|
||||
"achieved by setting the 'caps' property of the upstream source "
|
||||
"element (often udpsrc or appsrc), or by putting a capsfilter "
|
||||
"element before the depayloader and setting the 'caps' property "
|
||||
"on that. Also see http://cgit.freedesktop.org/gstreamer/"
|
||||
"gst-plugins-good/tree/gst/rtp/README"));
|
||||
} else {
|
||||
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION,
|
||||
("No RTP format was negotiated."),
|
||||
("RTP caps on input buffer were rejected, most likely because they "
|
||||
"were incomplete or contained wrong values. Check the debug log "
|
||||
"for more information."));
|
||||
}
|
||||
gst_buffer_unref (in);
|
||||
return GST_FLOW_NOT_NEGOTIATED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue