projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3dcf9a3
)
media: warn and fail when gstrtpbin is not found
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Mon, 6 Dec 2010 18:29:53 +0000
(19:29 +0100)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Mon, 6 Dec 2010 18:29:53 +0000
(19:29 +0100)
gst/rtsp-server/rtsp-media.c
patch
|
blob
|
history
diff --git
a/gst/rtsp-server/rtsp-media.c
b/gst/rtsp-server/rtsp-media.c
index
af802e9
..
8a218ec
100644
(file)
--- a/
gst/rtsp-server/rtsp-media.c
+++ b/
gst/rtsp-server/rtsp-media.c
@@
-1501,6
+1501,10
@@
gst_rtsp_media_prepare (GstRTSPMedia * media)
if (!media->reusable && media->reused)
goto is_reused;
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 */
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);
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);
/* 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;
}
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");
state_failed:
{
GST_WARNING ("failed to preroll pipeline");