Commit 49002fa8 authored by Edward Hervey's avatar Edward Hervey Committed by Edward Hervey

rtspsrc: Properly notify missing elements

If the srtp elements are not present, post a message on the bus
informing about the missing plugins.
parent b6723ecd
......@@ -2811,6 +2811,11 @@ request_rtp_decoder (GstElement * rtpbin, guint session, GstRTSPStream * stream)
stream->srtpdec = gst_element_factory_make ("srtpdec", name);
g_free (name);
if (stream->srtpdec == NULL) {
GST_ELEMENT_ERROR (stream->parent, CORE, MISSING_PLUGIN, (NULL),
("no srtpdec element present!"));
return NULL;
}
g_signal_connect (stream->srtpdec, "request-key",
(GCallback) request_key, stream);
}
......@@ -2839,6 +2844,12 @@ request_rtcp_encoder (GstElement * rtpbin, guint session,
stream->srtpenc = gst_element_factory_make ("srtpenc", name);
g_free (name);
if (stream->srtpenc == NULL) {
GST_ELEMENT_ERROR (stream->parent, CORE, MISSING_PLUGIN, (NULL),
("no srtpenc element present!"));
return NULL;
}
/* get RTCP crypto parameters from caps */
s = gst_caps_get_structure (stream->srtcpparams, 0);
if (s) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment