mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
Don't use gst_element_get_pad(), it's a bad method.
Original commit message from CVS: * ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_reset), (do_toggle_element): * ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_reset), (do_toggle_element): * ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_reset), (do_toggle_element): * ext/gconf/gstswitchsink.c: (gst_switch_commit_new_kid): * ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_reset), (do_toggle_element): * ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_reset), (do_toggle_element): * gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_reset), (gst_auto_audio_sink_detect): * gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_reset), (gst_auto_video_sink_detect): * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init), (gst_rtspsrc_stream_free), (gst_rtspsrc_stream_configure_udp), (gst_rtspsrc_stream_configure_udp_sink), (gst_rtspsrc_skip_lws), (gst_rtspsrc_unskip_lws), (gst_rtspsrc_skip_commas), (gst_rtspsrc_skip_item), (gst_rtsp_decode_quoted_string), (gst_rtspsrc_parse_digest_challenge), (gst_rtspsrc_parse_auth_hdr): * tests/icles/videocrop-test.c: (test_with_caps), (video_crop_get_test_caps): Don't use gst_element_get_pad(), it's a bad method.
This commit is contained in:
parent
e206f74bce
commit
487b784b4f
11 changed files with 48 additions and 21 deletions
27
ChangeLog
27
ChangeLog
|
@ -1,3 +1,30 @@
|
||||||
|
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/gconf/gstgconfaudiosrc.c: (gst_gconf_audio_src_reset),
|
||||||
|
(do_toggle_element):
|
||||||
|
* ext/gconf/gstgconfvideosink.c: (gst_gconf_video_sink_reset),
|
||||||
|
(do_toggle_element):
|
||||||
|
* ext/gconf/gstgconfvideosrc.c: (gst_gconf_video_src_reset),
|
||||||
|
(do_toggle_element):
|
||||||
|
* ext/gconf/gstswitchsink.c: (gst_switch_commit_new_kid):
|
||||||
|
* ext/hal/gsthalaudiosink.c: (gst_hal_audio_sink_reset),
|
||||||
|
(do_toggle_element):
|
||||||
|
* ext/hal/gsthalaudiosrc.c: (gst_hal_audio_src_reset),
|
||||||
|
(do_toggle_element):
|
||||||
|
* gst/autodetect/gstautoaudiosink.c: (gst_auto_audio_sink_reset),
|
||||||
|
(gst_auto_audio_sink_detect):
|
||||||
|
* gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_reset),
|
||||||
|
(gst_auto_video_sink_detect):
|
||||||
|
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_init),
|
||||||
|
(gst_rtspsrc_stream_free), (gst_rtspsrc_stream_configure_udp),
|
||||||
|
(gst_rtspsrc_stream_configure_udp_sink), (gst_rtspsrc_skip_lws),
|
||||||
|
(gst_rtspsrc_unskip_lws), (gst_rtspsrc_skip_commas),
|
||||||
|
(gst_rtspsrc_skip_item), (gst_rtsp_decode_quoted_string),
|
||||||
|
(gst_rtspsrc_parse_digest_challenge), (gst_rtspsrc_parse_auth_hdr):
|
||||||
|
* tests/icles/videocrop-test.c: (test_with_caps),
|
||||||
|
(video_crop_get_test_caps):
|
||||||
|
Don't use gst_element_get_pad(), it's a bad method.
|
||||||
|
|
||||||
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-05-21 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_init_send),
|
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_init_send),
|
||||||
|
|
|
@ -88,7 +88,7 @@ gst_gconf_audio_src_reset (GstGConfAudioSrc * src)
|
||||||
}
|
}
|
||||||
gst_bin_add (GST_BIN (src), src->kid);
|
gst_bin_add (GST_BIN (src), src->kid);
|
||||||
|
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ do_toggle_element (GstGConfAudioSrc * src)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (src, "done changing gconf audio source");
|
GST_DEBUG_OBJECT (src, "done changing gconf audio source");
|
||||||
|
|
|
@ -87,7 +87,7 @@ gst_gconf_video_sink_reset (GstGConfVideoSink * sink)
|
||||||
}
|
}
|
||||||
gst_bin_add (GST_BIN (sink), sink->kid);
|
gst_bin_add (GST_BIN (sink), sink->kid);
|
||||||
|
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ do_toggle_element (GstGConfVideoSink * sink)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (sink, "done changing gconf video sink");
|
GST_DEBUG_OBJECT (sink, "done changing gconf video sink");
|
||||||
|
|
|
@ -88,7 +88,7 @@ gst_gconf_video_src_reset (GstGConfVideoSrc * src)
|
||||||
}
|
}
|
||||||
gst_bin_add (GST_BIN (src), src->kid);
|
gst_bin_add (GST_BIN (src), src->kid);
|
||||||
|
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ do_toggle_element (GstGConfVideoSrc * src)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (src, "done changing gconf video source");
|
GST_DEBUG_OBJECT (src, "done changing gconf video source");
|
||||||
|
|
|
@ -205,7 +205,7 @@ gst_switch_commit_new_kid (GstSwitchSink * sink)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (sink, "done changing child of switchsink");
|
GST_DEBUG_OBJECT (sink, "done changing child of switchsink");
|
||||||
|
|
|
@ -122,7 +122,7 @@ gst_hal_audio_sink_reset (GstHalAudioSink * sink)
|
||||||
sink->kid = gst_element_factory_make ("fakesink", "testsink");
|
sink->kid = gst_element_factory_make ("fakesink", "testsink");
|
||||||
gst_bin_add (GST_BIN (sink), sink->kid);
|
gst_bin_add (GST_BIN (sink), sink->kid);
|
||||||
|
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ do_toggle_element (GstHalAudioSink * sink)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (sink, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (sink, "done changing hal audio sink");
|
GST_DEBUG_OBJECT (sink, "done changing hal audio sink");
|
||||||
|
|
|
@ -124,7 +124,7 @@ gst_hal_audio_src_reset (GstHalAudioSrc * src)
|
||||||
src->kid = gst_element_factory_make ("fakesrc", "testsrc");
|
src->kid = gst_element_factory_make ("fakesrc", "testsrc");
|
||||||
gst_bin_add (GST_BIN (src), src->kid);
|
gst_bin_add (GST_BIN (src), src->kid);
|
||||||
|
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ do_toggle_element (GstHalAudioSrc * src)
|
||||||
|
|
||||||
/* re-attach ghostpad */
|
/* re-attach ghostpad */
|
||||||
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
GST_DEBUG_OBJECT (src, "Creating new ghostpad");
|
||||||
targetpad = gst_element_get_pad (src->kid, "src");
|
targetpad = gst_element_get_static_pad (src->kid, "src");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (src->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (src, "done changing hal audio source");
|
GST_DEBUG_OBJECT (src, "done changing hal audio source");
|
||||||
|
|
|
@ -161,7 +161,7 @@ gst_auto_audio_sink_reset (GstAutoAudioSink * sink)
|
||||||
gst_bin_add (GST_BIN (sink), sink->kid);
|
gst_bin_add (GST_BIN (sink), sink->kid);
|
||||||
|
|
||||||
/* pad */
|
/* pad */
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ gst_auto_audio_sink_detect (GstAutoAudioSink * sink)
|
||||||
|
|
||||||
/* attach ghost pad */
|
/* attach ghost pad */
|
||||||
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (sink, "done changing auto audio sink");
|
GST_DEBUG_OBJECT (sink, "done changing auto audio sink");
|
||||||
|
|
|
@ -161,7 +161,7 @@ gst_auto_video_sink_reset (GstAutoVideoSink * sink)
|
||||||
gst_bin_add (GST_BIN (sink), sink->kid);
|
gst_bin_add (GST_BIN (sink), sink->kid);
|
||||||
|
|
||||||
/* pad */
|
/* pad */
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ gst_auto_video_sink_detect (GstAutoVideoSink * sink)
|
||||||
|
|
||||||
/* attach ghost pad */
|
/* attach ghost pad */
|
||||||
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
GST_DEBUG_OBJECT (sink, "Re-assigning ghostpad");
|
||||||
targetpad = gst_element_get_pad (sink->kid, "sink");
|
targetpad = gst_element_get_static_pad (sink->kid, "sink");
|
||||||
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
gst_ghost_pad_set_target (GST_GHOST_PAD (sink->pad), targetpad);
|
||||||
gst_object_unref (targetpad);
|
gst_object_unref (targetpad);
|
||||||
GST_DEBUG_OBJECT (sink, "done changing auto video sink");
|
GST_DEBUG_OBJECT (sink, "done changing auto video sink");
|
||||||
|
|
|
@ -709,7 +709,7 @@ gst_rtspsrc_stream_free (GstRTSPSrc * src, GstRTSPStream * stream)
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
/* unlink the pad */
|
/* unlink the pad */
|
||||||
pad = gst_element_get_pad (udpsrc, "src");
|
pad = gst_element_get_static_pad (udpsrc, "src");
|
||||||
if (stream->channelpad[i]) {
|
if (stream->channelpad[i]) {
|
||||||
gst_pad_unlink (pad, stream->channelpad[i]);
|
gst_pad_unlink (pad, stream->channelpad[i]);
|
||||||
}
|
}
|
||||||
|
@ -1982,7 +1982,7 @@ gst_rtspsrc_stream_configure_udp (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* get output pad of the UDP source. */
|
/* get output pad of the UDP source. */
|
||||||
*outpad = gst_element_get_pad (stream->udpsrc[0], "src");
|
*outpad = gst_element_get_static_pad (stream->udpsrc[0], "src");
|
||||||
|
|
||||||
/* save it so we can unblock */
|
/* save it so we can unblock */
|
||||||
stream->blockedpad = *outpad;
|
stream->blockedpad = *outpad;
|
||||||
|
@ -2015,7 +2015,7 @@ gst_rtspsrc_stream_configure_udp (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "connecting UDP source 1 to manager");
|
GST_DEBUG_OBJECT (src, "connecting UDP source 1 to manager");
|
||||||
|
|
||||||
pad = gst_element_get_pad (stream->udpsrc[1], "src");
|
pad = gst_element_get_static_pad (stream->udpsrc[1], "src");
|
||||||
gst_pad_link (pad, stream->channelpad[1]);
|
gst_pad_link (pad, stream->channelpad[1]);
|
||||||
gst_object_unref (pad);
|
gst_object_unref (pad);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2082,7 +2082,7 @@ gst_rtspsrc_stream_configure_udp_sink (GstRTSPSrc * src, GstRTSPStream * stream,
|
||||||
gst_object_ref (stream->udpsink);
|
gst_object_ref (stream->udpsink);
|
||||||
gst_bin_add (GST_BIN_CAST (src), stream->udpsink);
|
gst_bin_add (GST_BIN_CAST (src), stream->udpsink);
|
||||||
|
|
||||||
stream->rtcppad = gst_element_get_pad (stream->udpsink, "sink");
|
stream->rtcppad = gst_element_get_static_pad (stream->udpsink, "sink");
|
||||||
|
|
||||||
/* get session RTCP pad */
|
/* get session RTCP pad */
|
||||||
name = g_strdup_printf ("send_rtcp_src_%d", stream->id);
|
name = g_strdup_printf ("send_rtcp_src_%d", stream->id);
|
||||||
|
|
|
@ -87,7 +87,7 @@ test_with_caps (GstElement * src, GstElement * videocrop, GstCaps * caps)
|
||||||
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
||||||
|
|
||||||
/* pad to block */
|
/* pad to block */
|
||||||
pad = gst_element_get_pad (src, "src");
|
pad = gst_element_get_static_pad (src, "src");
|
||||||
|
|
||||||
time_run = 0;
|
time_run = 0;
|
||||||
do {
|
do {
|
||||||
|
@ -139,7 +139,7 @@ video_crop_get_test_caps (GstElement * videocrop)
|
||||||
GList *list = NULL;
|
GList *list = NULL;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
srcpad = gst_element_get_pad (videocrop, "src");
|
srcpad = gst_element_get_static_pad (videocrop, "src");
|
||||||
g_assert (srcpad != NULL);
|
g_assert (srcpad != NULL);
|
||||||
allowed_caps = gst_pad_get_pad_template_caps (srcpad);
|
allowed_caps = gst_pad_get_pad_template_caps (srcpad);
|
||||||
g_assert (allowed_caps != NULL);
|
g_assert (allowed_caps != NULL);
|
||||||
|
|
Loading…
Reference in a new issue