mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
media: warn and fail when gstrtpbin is not found
This commit is contained in:
parent
3dcf9a3382
commit
422fea478c
1 changed files with 10 additions and 2 deletions
|
@ -1501,6 +1501,10 @@ gst_rtsp_media_prepare (GstRTSPMedia * media)
|
|||
if (!media->reusable && media->reused)
|
||||
goto is_reused;
|
||||
|
||||
media->rtpbin = gst_element_factory_make ("gstrtpbin", NULL);
|
||||
if (media->rtpbin == NULL)
|
||||
goto no_gstrtpbin;
|
||||
|
||||
GST_INFO ("preparing media %p", media);
|
||||
|
||||
/* reset some variables */
|
||||
|
@ -1520,8 +1524,6 @@ gst_rtsp_media_prepare (GstRTSPMedia * media)
|
|||
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
||||
media->id = g_source_attach (media->source, klass->context);
|
||||
|
||||
media->rtpbin = gst_element_factory_make ("gstrtpbin", NULL);
|
||||
|
||||
/* add stuff to the bin */
|
||||
gst_bin_add (GST_BIN (media->pipeline), media->rtpbin);
|
||||
|
||||
|
@ -1592,6 +1594,12 @@ is_reused:
|
|||
GST_WARNING ("can not reuse media %p", media);
|
||||
return FALSE;
|
||||
}
|
||||
no_gstrtpbin:
|
||||
{
|
||||
GST_WARNING ("no gstrtpbin element");
|
||||
g_warning ("failed to create element 'gstrtpbin', check your installation");
|
||||
return FALSE;
|
||||
}
|
||||
state_failed:
|
||||
{
|
||||
GST_WARNING ("failed to preroll pipeline");
|
||||
|
|
Loading…
Reference in a new issue