mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/autodetect/: Post an error when we can't set the internal ghostpad target.
Original commit message from CVS: * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_detect): * gst/autodetect/gstautoaudiosrc.c: (gst_auto_audio_src_detect): * gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_reset), (gst_auto_video_sink_detect): * gst/autodetect/gstautovideosrc.c: (gst_auto_video_src_detect): Post an error when we can't set the internal ghostpad target.
This commit is contained in:
parent
6ab4698b95
commit
c25b0fcb92
5 changed files with 50 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-11-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_detect):
|
||||
* gst/autodetect/gstautoaudiosrc.c: (gst_auto_audio_src_detect):
|
||||
* gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_reset),
|
||||
(gst_auto_video_sink_detect):
|
||||
* gst/autodetect/gstautovideosrc.c: (gst_auto_video_src_detect):
|
||||
Post an error when we can't set the internal ghostpad target.
|
||||
|
||||
2008-11-25 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/videocrop/gstvideocrop.c: (gst_video_crop_init),
|
||||
|
|
|
@ -361,7 +361,9 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink)
|
|||
/* attach ghost pad */
|
||||
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
||||
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad))
|
||||
goto target_failed;
|
||||
|
||||
gst_object_unref (targetpad);
|
||||
GST_DEBUG_OBJECT (sink, "done changing auto audio sink");
|
||||
|
||||
|
@ -374,6 +376,13 @@ no_sink:
|
|||
("Failed to find a supported audio sink"));
|
||||
return FALSE;
|
||||
}
|
||||
target_failed:
|
||||
{
|
||||
GST_ELEMENT_ERROR (sink, LIBRARY, INIT, (NULL),
|
||||
("Failed to set target pad"));
|
||||
gst_object_unref (targetpad);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
@ -362,7 +362,9 @@ gst_auto_audio_src_detect (GstAutoAudioSrc * src)
|
|||
/* attach ghost pad */
|
||||
GST_DEBUG_OBJECT (src, "Re-assigning ghostpad");
|
||||
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad))
|
||||
goto target_failed;
|
||||
|
||||
gst_object_unref (targetpad);
|
||||
GST_DEBUG_OBJECT (src, "done changing auto audio source");
|
||||
|
||||
|
@ -375,6 +377,13 @@ no_src:
|
|||
("Failed to find a supported audio source"));
|
||||
return FALSE;
|
||||
}
|
||||
target_failed:
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL),
|
||||
("Failed to set target pad"));
|
||||
gst_object_unref (targetpad);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
@ -157,7 +157,7 @@ gst_auto_video_sink_reset (GstAutoVideoSink * sink)
|
|||
sink->kid = gst_element_factory_make ("fakesink", "tempsink");
|
||||
gst_bin_add (GST_BIN (sink), sink->kid);
|
||||
|
||||
/* pad */
|
||||
/* pad, setting this target should always work */
|
||||
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||
gst_object_unref (targetpad);
|
||||
|
@ -352,7 +352,9 @@ gst_auto_video_sink_detect (GstAutoVideoSink * sink)
|
|||
/* attach ghost pad */
|
||||
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
||||
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad))
|
||||
goto target_failed;
|
||||
|
||||
gst_object_unref (targetpad);
|
||||
GST_DEBUG_OBJECT (sink, "done changing auto video sink");
|
||||
|
||||
|
@ -365,6 +367,13 @@ no_sink:
|
|||
("Failed to find a supported video sink"));
|
||||
return FALSE;
|
||||
}
|
||||
target_failed:
|
||||
{
|
||||
GST_ELEMENT_ERROR (sink, LIBRARY, INIT, (NULL),
|
||||
("Failed to set target pad"));
|
||||
gst_object_unref (targetpad);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
@ -353,7 +353,9 @@ gst_auto_video_src_detect (GstAutoVideoSrc * src)
|
|||
/* attach ghost pad */
|
||||
GST_DEBUG_OBJECT (src, "Re-assigning ghostpad");
|
||||
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||
if (!gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad))
|
||||
goto target_failed;
|
||||
|
||||
gst_object_unref (targetpad);
|
||||
GST_DEBUG_OBJECT (src, "done changing auto video source");
|
||||
|
||||
|
@ -366,6 +368,13 @@ no_src:
|
|||
("Failed to find a supported video source"));
|
||||
return FALSE;
|
||||
}
|
||||
target_failed:
|
||||
{
|
||||
GST_ELEMENT_ERROR (src, LIBRARY, INIT, (NULL),
|
||||
("Failed to set target pad"));
|
||||
gst_object_unref (targetpad);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
Loading…
Reference in a new issue