diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2008-05-26 09:57:40 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-05-26 09:57:40 +0000 |
commit | 5ad2dc58df08b5871fe67e300983858bfccd79f4 (patch) | |
tree | 93753100eeaa9151373ef1c4a2990c9ed8dde145 | |
parent | b7c64b81655f4cd7ba4e55fc0a4d69e5c9b3fd4b (diff) |
Don't use _gst_pad().
Original commit message from CVS:
* examples/switch/switcher.c: (switch_timer):
* gst/replaygain/gstrgvolume.c: (gst_rg_volume_init):
* gst/rtpmanager/gstrtpclient.c: (create_stream):
* gst/sdp/gstsdpdemux.c: (gst_sdp_demux_stream_configure_udp),
(gst_sdp_demux_stream_configure_udp_sink):
* tests/check/elements/deinterleave.c: (GST_START_TEST),
(pad_added_setup_data_check_float32_8ch_cb):
* tests/check/elements/rganalysis.c: (send_eos_event),
(send_tag_event):
Don't use _gst_pad().
-rw-r--r-- | ChangeLog | 13 | ||||
m--------- | common | 0 | ||||
-rw-r--r-- | examples/switch/switcher.c | 17 | ||||
-rw-r--r-- | gst/replaygain/gstrgvolume.c | 4 | ||||
-rw-r--r-- | gst/rtpmanager/gstrtpclient.c | 6 | ||||
-rw-r--r-- | gst/sdp/gstsdpdemux.c | 6 | ||||
-rw-r--r-- | tests/check/elements/deinterleave.c | 8 | ||||
-rw-r--r-- | tests/check/elements/rganalysis.c | 4 |
8 files changed, 37 insertions, 21 deletions
@@ -1,3 +1,16 @@ +2008-05-26 Wim Taymans <wim.taymans@collabora.co.uk> + + * examples/switch/switcher.c: (switch_timer): + * gst/replaygain/gstrgvolume.c: (gst_rg_volume_init): + * gst/rtpmanager/gstrtpclient.c: (create_stream): + * gst/sdp/gstsdpdemux.c: (gst_sdp_demux_stream_configure_udp), + (gst_sdp_demux_stream_configure_udp_sink): + * tests/check/elements/deinterleave.c: (GST_START_TEST), + (pad_added_setup_data_check_float32_8ch_cb): + * tests/check/elements/rganalysis.c: (send_eos_event), + (send_tag_event): + Don't use _gst_pad(). + 2008-05-22 Sebastian Dröge <slomo@circular-chaos.org> * docs/plugins/Makefile.am: diff --git a/common b/common -Subproject 5e771924d59d9ac912237ea466d0c60ad95df5a +Subproject 032f2d973bd5c9a9b457cb5fc72d13dafe85c01 diff --git a/examples/switch/switcher.c b/examples/switch/switcher.c index 2e274a7b8..4742c0337 100644 --- a/examples/switch/switcher.c +++ b/examples/switch/switcher.c @@ -68,20 +68,23 @@ static gboolean switch_timer (GstElement * video_switch) { gint nb_sources; - GstPad *active_pad; + GstPad *active_pad, *new_pad; + gchar *active_name; g_message ("switching"); g_object_get (G_OBJECT (video_switch), "n-pads", &nb_sources, NULL); g_object_get (G_OBJECT (video_switch), "active-pad", &active_pad, NULL); - if (strcmp (gst_pad_get_name (active_pad), "sink0") == 0) { - - g_object_set (G_OBJECT (video_switch), "active-pad", - gst_element_get_pad (video_switch, "sink1"), NULL); + active_name = gst_pad_get_name (active_pad); + if (strcmp (active_name, "sink0") == 0) { + new_pad = gst_element_get_static_pad (video_switch, "sink1"); } else { - g_object_set (G_OBJECT (video_switch), "active-pad", - gst_element_get_pad (video_switch, "sink0"), NULL); + new_pad = gst_element_get_static_pad (video_switch, "sink0"); } + g_object_set (G_OBJECT (video_switch), "active-pad", new_pad, NULL); + g_free (active_name); + gst_object_unref (new_pad); + g_message ("current number of sources : %d, active source %s", nb_sources, gst_pad_get_name (active_pad)); diff --git a/gst/replaygain/gstrgvolume.c b/gst/replaygain/gstrgvolume.c index 35b4f5ef0..dbcfaf5d8 100644 --- a/gst/replaygain/gstrgvolume.c +++ b/gst/replaygain/gstrgvolume.c @@ -341,14 +341,14 @@ gst_rg_volume_init (GstRgVolume * self, GstRgVolumeClass * gclass) GST_BIN_CLASS (parent_class)->add_element (GST_BIN_CAST (self), self->volume_element); - volume_pad = gst_element_get_pad (self->volume_element, "sink"); + volume_pad = gst_element_get_static_pad (self->volume_element, "sink"); ghost_pad = gst_ghost_pad_new_from_template ("sink", volume_pad, gst_pad_get_pad_template (volume_pad)); gst_object_unref (volume_pad); gst_pad_set_event_function (ghost_pad, gst_rg_volume_sink_event); gst_element_add_pad (GST_ELEMENT_CAST (self), ghost_pad); - volume_pad = gst_element_get_pad (self->volume_element, "src"); + volume_pad = gst_element_get_static_pad (self->volume_element, "src"); ghost_pad = gst_ghost_pad_new_from_template ("src", volume_pad, gst_pad_get_pad_template (volume_pad)); gst_object_unref (volume_pad); diff --git a/gst/rtpmanager/gstrtpclient.c b/gst/rtpmanager/gstrtpclient.c index 1bdd72fcd..d3e2c6732 100644 --- a/gst/rtpmanager/gstrtpclient.c +++ b/gst/rtpmanager/gstrtpclient.c @@ -151,8 +151,8 @@ create_stream (GstRtpClient * rtpclient, guint32 ssrc) gst_bin_add (GST_BIN_CAST (rtpclient), stream->ptdemux); /* link jitterbuffer and PT demuxer */ - srcpad = gst_element_get_pad (stream->jitterbuffer, "src"); - sinkpad = gst_element_get_pad (stream->ptdemux, "sink"); + srcpad = gst_element_get_static_pad (stream->jitterbuffer, "src"); + sinkpad = gst_element_get_static_pad (stream->ptdemux, "sink"); res = gst_pad_link (srcpad, sinkpad); gst_object_unref (srcpad); gst_object_unref (sinkpad); @@ -165,7 +165,7 @@ create_stream (GstRtpClient * rtpclient, guint32 ssrc) /* ghost sinkpad */ name = g_strdup_printf ("rtp_sink_%d", ssrc); - sinkpad = gst_element_get_pad (stream->jitterbuffer, "sink"); + sinkpad = gst_element_get_static_pad (stream->jitterbuffer, "sink"); stream->rtp_sink = gst_ghost_pad_new (name, sinkpad); gst_object_unref (sinkpad); g_free (name); diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c index b0de0d202..45cdc3a88 100644 --- a/gst/sdp/gstsdpdemux.c +++ b/gst/sdp/gstsdpdemux.c @@ -918,7 +918,7 @@ gst_sdp_demux_stream_configure_udp (GstSDPDemux * demux, GstSDPStream * stream) NULL); /* get output pad of the UDP source. */ - pad = gst_element_get_pad (stream->udpsrc[0], "src"); + pad = gst_element_get_static_pad (stream->udpsrc[0], "src"); name = g_strdup_printf ("recv_rtp_sink_%d", stream->id); stream->channelpad[0] = gst_element_get_request_pad (demux->session, name); @@ -954,7 +954,7 @@ gst_sdp_demux_stream_configure_udp (GstSDPDemux * demux, GstSDPStream * stream) stream->channelpad[1] = gst_element_get_request_pad (demux->session, name); g_free (name); - 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_object_unref (pad); @@ -1021,7 +1021,7 @@ gst_sdp_demux_stream_configure_udp_sink (GstSDPDemux * demux, /* and link */ if (pad) { - sinkpad = gst_element_get_pad (stream->udpsink, "sink"); + sinkpad = gst_element_get_static_pad (stream->udpsink, "sink"); gst_pad_link (pad, sinkpad); gst_object_unref (sinkpad); } else { diff --git a/tests/check/elements/deinterleave.c b/tests/check/elements/deinterleave.c index 23960c488..04ac41b33 100644 --- a/tests/check/elements/deinterleave.c +++ b/tests/check/elements/deinterleave.c @@ -149,7 +149,7 @@ GST_START_TEST (test_2_channels) fail_unless (gst_pad_set_caps (mysrcpad, caps)); gst_pad_use_fixed_caps (mysrcpad); - sinkpad = gst_element_get_pad (deinterleave, "sink"); + sinkpad = gst_element_get_static_pad (deinterleave, "sink"); fail_unless (sinkpad != NULL); fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK); g_object_unref (sinkpad); @@ -209,7 +209,7 @@ GST_START_TEST (test_2_channels_1_linked) fail_unless (gst_pad_set_caps (mysrcpad, caps)); gst_pad_use_fixed_caps (mysrcpad); - sinkpad = gst_element_get_pad (deinterleave, "sink"); + sinkpad = gst_element_get_static_pad (deinterleave, "sink"); fail_unless (sinkpad != NULL); fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK); g_object_unref (sinkpad); @@ -269,7 +269,7 @@ GST_START_TEST (test_2_channels_caps_change) fail_unless (gst_pad_set_caps (mysrcpad, caps)); gst_pad_use_fixed_caps (mysrcpad); - sinkpad = gst_element_get_pad (deinterleave, "sink"); + sinkpad = gst_element_get_static_pad (deinterleave, "sink"); fail_unless (sinkpad != NULL); fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK); g_object_unref (sinkpad); @@ -473,7 +473,7 @@ pad_added_setup_data_check_float32_8ch_cb (GstElement * deinterleave, gst_bin_add_many (GST_BIN (pipeline), queue, sink, NULL); fail_unless (gst_element_link_many (queue, sink, NULL)); - sinkpad = gst_element_get_pad (queue, "sink"); + sinkpad = gst_element_get_static_pad (queue, "sink"); fail_unless_equals_int (gst_pad_link (pad, sinkpad), GST_PAD_LINK_OK); gst_object_unref (sinkpad); diff --git a/tests/check/elements/rganalysis.c b/tests/check/elements/rganalysis.c index 16253b20e..0045cb942 100644 --- a/tests/check/elements/rganalysis.c +++ b/tests/check/elements/rganalysis.c @@ -201,7 +201,7 @@ static void send_eos_event (GstElement * element) { GstBus *bus = gst_element_get_bus (element); - GstPad *pad = gst_element_get_pad (element, "sink"); + GstPad *pad = gst_element_get_static_pad (element, "sink"); GstEvent *event = gst_event_new_eos (); fail_unless (gst_pad_send_event (pad, event), @@ -220,7 +220,7 @@ send_eos_event (GstElement * element) static void send_tag_event (GstElement * element, GstTagList * tag_list) { - GstPad *pad = gst_element_get_pad (element, "sink"); + GstPad *pad = gst_element_get_static_pad (element, "sink"); GstEvent *event = gst_event_new_tag (tag_list); fail_unless (gst_pad_send_event (pad, event), |