mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 21:51: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)
|
if (!media->reusable && media->reused)
|
||||||
goto is_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);
|
GST_INFO ("preparing media %p", media);
|
||||||
|
|
||||||
/* reset some variables */
|
/* reset some variables */
|
||||||
|
@ -1520,8 +1524,6 @@ gst_rtsp_media_prepare (GstRTSPMedia * media)
|
||||||
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
klass = GST_RTSP_MEDIA_GET_CLASS (media);
|
||||||
media->id = g_source_attach (media->source, klass->context);
|
media->id = g_source_attach (media->source, klass->context);
|
||||||
|
|
||||||
media->rtpbin = gst_element_factory_make ("gstrtpbin", NULL);
|
|
||||||
|
|
||||||
/* add stuff to the bin */
|
/* add stuff to the bin */
|
||||||
gst_bin_add (GST_BIN (media->pipeline), media->rtpbin);
|
gst_bin_add (GST_BIN (media->pipeline), media->rtpbin);
|
||||||
|
|
||||||
|
@ -1592,6 +1594,12 @@ is_reused:
|
||||||
GST_WARNING ("can not reuse media %p", media);
|
GST_WARNING ("can not reuse media %p", media);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
no_gstrtpbin:
|
||||||
|
{
|
||||||
|
GST_WARNING ("no gstrtpbin element");
|
||||||
|
g_warning ("failed to create element 'gstrtpbin', check your installation");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
state_failed:
|
state_failed:
|
||||||
{
|
{
|
||||||
GST_WARNING ("failed to preroll pipeline");
|
GST_WARNING ("failed to preroll pipeline");
|
||||||
|
|
Loading…
Reference in a new issue