mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
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().
This commit is contained in:
parent
b7c64b8165
commit
5ad2dc58df
8 changed files with 38 additions and 22 deletions
13
ChangeLog
13
ChangeLog
|
@ -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:
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 5e771924d59d9ac912237ea466d0c60ad95df5ab
|
||||
Subproject commit 032f2d973bd5c9a9b457cb5fc72d13dafe85c01e
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue