mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
rtspsrc: Properly notify missing elements
If the srtp elements are not present, post a message on the bus informing about the missing plugins.
This commit is contained in:
parent
b6723ecd3c
commit
49002fa8a7
1 changed files with 11 additions and 0 deletions
|
@ -2811,6 +2811,11 @@ request_rtp_decoder (GstElement * rtpbin, guint session, GstRTSPStream * stream)
|
||||||
stream->srtpdec = gst_element_factory_make ("srtpdec", name);
|
stream->srtpdec = gst_element_factory_make ("srtpdec", name);
|
||||||
g_free (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",
|
g_signal_connect (stream->srtpdec, "request-key",
|
||||||
(GCallback) request_key, stream);
|
(GCallback) request_key, stream);
|
||||||
}
|
}
|
||||||
|
@ -2839,6 +2844,12 @@ request_rtcp_encoder (GstElement * rtpbin, guint session,
|
||||||
stream->srtpenc = gst_element_factory_make ("srtpenc", name);
|
stream->srtpenc = gst_element_factory_make ("srtpenc", name);
|
||||||
g_free (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 */
|
/* get RTCP crypto parameters from caps */
|
||||||
s = gst_caps_get_structure (stream->srtcpparams, 0);
|
s = gst_caps_get_structure (stream->srtcpparams, 0);
|
||||||
if (s) {
|
if (s) {
|
||||||
|
|
Loading…
Reference in a new issue