diff --git a/common b/common index 67b7e6c0db..495d6e30b3 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 67b7e6c0db99415e0440d0c576495641b53e976a +Subproject commit 495d6e30b3e513aebbc98467707c609c49ea654d diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index e28da68498..3579daca11 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -89,10 +89,8 @@ typedef enum GST_OGG_PAD_MODE_STREAMING, /* we are streaming buffers to the outside */ } GstOggPadMode; -//#define PARENT GstPad -//#define PARENTCLASS GstPadClass -#define PARENT GstRealPad -#define PARENTCLASS GstRealPadClass +#define PARENT GstPad +#define PARENTCLASS GstPadClass /* all information needed for one ogg stream */ struct _GstOggPad @@ -222,8 +220,7 @@ gst_ogg_pad_get_type (void) }; ogg_pad_type = - g_type_register_static (GST_TYPE_REAL_PAD, "GstOggPad", &ogg_pad_info, - 0); + g_type_register_static (GST_TYPE_PAD, "GstOggPad", &ogg_pad_info, 0); } return ogg_pad_type; } diff --git a/ext/theora/theoradec.c b/ext/theora/theoradec.c index ffd7266aae..28bf67b2ce 100644 --- a/ext/theora/theoradec.c +++ b/ext/theora/theoradec.c @@ -838,11 +838,11 @@ theora_handle_data_packet (GstTheoraDec * dec, ogg_packet * packet, * offset or size is odd (see above). */ { - guint8 *dest_y, *src_y; - guint8 *dest_u, *src_u; - guint8 *dest_v, *src_v; + guchar *dest_y, *src_y; + guchar *dest_u, *src_u; + guchar *dest_v, *src_v; - dest_y = (guint8 *) GST_BUFFER_DATA (out); + dest_y = GST_BUFFER_DATA (out); dest_u = dest_y + stride_y * height; dest_v = dest_u + stride_uv * cheight; diff --git a/ext/theora/theoraenc.c b/ext/theora/theoraenc.c index 7c7a898925..8de1ce65a2 100644 --- a/ext/theora/theoraenc.c +++ b/ext/theora/theoraenc.c @@ -552,15 +552,15 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer) /* easy case, no cropping/conversion needed */ pixels = GST_BUFFER_DATA (buffer); - yuv.y = (guint8 *) pixels; + yuv.y = pixels; yuv.u = yuv.y + y_size; yuv.v = yuv.u + y_size / 4; } else { GstBuffer *newbuf; gint i; - guint8 *dest_y, *src_y; - guint8 *dest_u, *src_u; - guint8 *dest_v, *src_v; + guchar *dest_y, *src_y; + guchar *dest_u, *src_u; + guchar *dest_v, *src_v; gint src_y_stride, src_uv_stride; gint dst_y_stride, dst_uv_stride; gint width, height; @@ -588,11 +588,11 @@ theora_enc_chain (GstPad * pad, GstBuffer * buffer) if (ret != GST_FLOW_OK) goto no_buffer; - dest_y = yuv.y = (guint8 *) GST_BUFFER_DATA (newbuf); + dest_y = yuv.y = GST_BUFFER_DATA (newbuf); dest_u = yuv.u = yuv.y + y_size; dest_v = yuv.v = yuv.u + y_size / 4; - src_y = (guint8 *) GST_BUFFER_DATA (buffer); + src_y = GST_BUFFER_DATA (buffer); src_u = src_y + src_y_stride * ROUND_UP_2 (height); src_v = src_u + src_uv_stride * ROUND_UP_2 (height) / 2; diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c index e7d40d607a..bbd327ccd6 100644 --- a/gst-libs/gst/gconf/gconf.c +++ b/gst-libs/gst/gconf/gconf.c @@ -167,10 +167,10 @@ gst_gconf_render_bin_from_description (const gchar * description) /* find pads and ghost them if necessary */ if ((pad = gst_bin_find_unconnected_pad (GST_BIN (bin), GST_PAD_SRC))) { - gst_element_add_ghost_pad (bin, pad, "src"); + gst_element_add_pad (bin, gst_ghost_pad_new ("src", pad)); } if ((pad = gst_bin_find_unconnected_pad (GST_BIN (bin), GST_PAD_SINK))) { - gst_element_add_ghost_pad (bin, pad, "sink"); + gst_element_add_pad (bin, gst_ghost_pad_new ("sink", pad)); } return bin; } diff --git a/gst/audioconvert/gstaudioconvert.c b/gst/audioconvert/gstaudioconvert.c index 57b079edf1..296c34dc96 100644 --- a/gst/audioconvert/gstaudioconvert.c +++ b/gst/audioconvert/gstaudioconvert.c @@ -244,11 +244,11 @@ gst_audio_convert_chain (GstPad * pad, GstBuffer * buf) * - convert rate and channels * - convert back to output format */ - if (!GST_RPAD_CAPS (this->sink)) { + if (!GST_PAD_CAPS (this->sink)) { goto not_negotiated; - } else if (!GST_RPAD_CAPS (this->src)) { + } else if (!GST_PAD_CAPS (this->src)) { if (!gst_audio_convert_link_src (this, - GST_RPAD_CAPS (this->sink), &this->sinkcaps)) + GST_PAD_CAPS (this->sink), &this->sinkcaps)) goto no_format; } else if (!this->matrix) { gst_audio_convert_setup_matrix (this); @@ -409,7 +409,7 @@ gst_audio_convert_link_src (GstAudioConvert * this, if (gst_pad_peer_accept_caps (this->src, sinkcaps)) { /* great, so that will be our suggestion then */ this->src_prefered = gst_caps_ref (sinkcaps); - gst_caps_replace (&GST_RPAD_CAPS (this->src), sinkcaps); + gst_caps_replace (&GST_PAD_CAPS (this->src), sinkcaps); ac_caps = *sink_ac_caps; if (ac_caps.pos) { ac_caps.pos = g_memdup (ac_caps.pos, sizeof (gint) * ac_caps.channels); @@ -446,7 +446,7 @@ gst_audio_convert_link_src (GstAudioConvert * this, this->src_prefered = targetcaps; if (!gst_audio_convert_parse_caps (targetcaps, &ac_caps)) return FALSE; - gst_caps_replace (&GST_RPAD_CAPS (this->src), targetcaps); + gst_caps_replace (&GST_PAD_CAPS (this->src), targetcaps); } } this->srccaps = ac_caps; @@ -644,8 +644,8 @@ gst_audio_convert_change_state (GstElement * element) case GST_STATE_PAUSED_TO_READY: this->convert_internal = NULL; gst_audio_convert_unset_matrix (this); - gst_caps_replace (&GST_RPAD_CAPS (this->sink), NULL); - gst_caps_replace (&GST_RPAD_CAPS (this->src), NULL); + gst_caps_replace (&GST_PAD_CAPS (this->sink), NULL); + gst_caps_replace (&GST_PAD_CAPS (this->src), NULL); break; default: break; @@ -726,7 +726,7 @@ gst_audio_convert_buffer_to_default_format (GstAudioConvert * this, ret = gst_audio_convert_get_buffer (buf, buf->size * 32 / this->sinkcaps.width); - gst_buffer_set_caps (ret, GST_RPAD_CAPS (this->src)); + gst_buffer_set_caps (ret, GST_PAD_CAPS (this->src)); count = ret->size / 4; src = buf->data + (count - 1) * (this->sinkcaps.width / 8); @@ -794,7 +794,7 @@ gst_audio_convert_buffer_to_default_format (GstAudioConvert * this, /* should just give the same buffer, unless it's not writable -- float is * already 32 bits */ ret = gst_audio_convert_get_buffer (buf, buf->size); - gst_buffer_set_caps (ret, GST_RPAD_CAPS (this->src)); + gst_buffer_set_caps (ret, GST_PAD_CAPS (this->src)); in = (gfloat *) GST_BUFFER_DATA (buf); out = (gint32 *) GST_BUFFER_DATA (ret); @@ -854,7 +854,7 @@ gst_audio_convert_buffer_from_default_format (GstAudioConvert * this, ret = gst_audio_convert_get_buffer (buf, buf->size * this->srccaps.width / 32); - gst_buffer_set_caps (ret, GST_RPAD_CAPS (this->src)); + gst_buffer_set_caps (ret, GST_PAD_CAPS (this->src)); dest = ret->data; src = (gint32 *) buf->data; @@ -920,7 +920,7 @@ gst_audio_convert_buffer_from_default_format (GstAudioConvert * this, ret = gst_audio_convert_get_buffer (buf, buf->size * this->srccaps.width / 32); - gst_buffer_set_caps (ret, GST_RPAD_CAPS (this->src)); + gst_buffer_set_caps (ret, GST_PAD_CAPS (this->src)); dest = (gfloat *) ret->data; src = (gint32 *) buf->data; @@ -950,7 +950,7 @@ gst_audio_convert_channels (GstAudioConvert * this, GstBuffer * buf) /* convert */ count = GST_BUFFER_SIZE (buf) / 4 / this->sinkcaps.channels; ret = gst_audio_convert_get_buffer (buf, count * 4 * this->srccaps.channels); - gst_buffer_set_caps (ret, GST_RPAD_CAPS (this->src)); + gst_buffer_set_caps (ret, GST_PAD_CAPS (this->src)); gst_audio_convert_mix (this, (gint32 *) GST_BUFFER_DATA (buf), (gint32 *) GST_BUFFER_DATA (ret), count); gst_buffer_unref (buf); diff --git a/gst/playback/gstdecodebin.c b/gst/playback/gstdecodebin.c index 9e473b3f97..fddfb4bf0b 100644 --- a/gst/playback/gstdecodebin.c +++ b/gst/playback/gstdecodebin.c @@ -318,7 +318,8 @@ gst_decode_bin_init (GstDecodeBin * decode_bin) pad = gst_element_get_pad (decode_bin->typefind, "sink"); /* ghost the sink pad to ourself */ - gst_element_add_ghost_pad (GST_ELEMENT (decode_bin), pad, "sink"); + gst_element_add_pad (GST_ELEMENT (decode_bin), + gst_ghost_pad_new ("sink", pad)); gst_object_unref (GST_OBJECT_CAST (pad)); @@ -497,7 +498,8 @@ close_pad_link (GstElement * element, GstPad * pad, GstCaps * caps, decode_bin->numpads++; /* make it a ghostpad */ - ghost = gst_element_add_ghost_pad (GST_ELEMENT (decode_bin), pad, padname); + ghost = gst_ghost_pad_new (padname, pad); + gst_element_add_pad (GST_ELEMENT (decode_bin), ghost); GST_LOG_OBJECT (element, "closed pad %s", padname); @@ -746,15 +748,17 @@ remove_element_chain (GstDecodeBin * decode_bin, GstPad * pad) { GstElement *parent = gst_pad_get_parent (peer); - if (parent != GST_ELEMENT (decode_bin)) { - GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s", - GST_DEBUG_PAD_NAME (peer)); - } else { - GST_DEBUG_OBJECT (decode_bin, "recursing element %s on pad %s:%s", - GST_ELEMENT_NAME (elem), GST_DEBUG_PAD_NAME (pad)); - remove_element_chain (decode_bin, peer); + if (parent) { + if (parent != GST_ELEMENT (decode_bin)) { + GST_DEBUG_OBJECT (decode_bin, "dead end pad %s:%s", + GST_DEBUG_PAD_NAME (peer)); + } else { + GST_DEBUG_OBJECT (decode_bin, "recursing element %s on pad %s:%s", + GST_ELEMENT_NAME (elem), GST_DEBUG_PAD_NAME (pad)); + remove_element_chain (decode_bin, peer); + } + gst_object_unref (GST_OBJECT_CAST (parent)); } - gst_object_unref (GST_OBJECT_CAST (parent)); } gst_object_unref (GST_OBJECT_CAST (peer)); } diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 653366fa7d..26edd9a868 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -407,7 +407,7 @@ gen_video_element (GstPlayBin * play_bin) gst_element_link_pads (scale, "src", */ sink, "sink"); pad = gst_element_get_pad (identity, "sink"); - gst_element_add_ghost_pad (element, pad, "sink"); + gst_element_add_pad (element, gst_ghost_pad_new ("sink", pad)); gst_object_unref (GST_OBJECT (pad)); gst_element_set_state (element, GST_STATE_READY); @@ -457,6 +457,8 @@ gen_text_element (GstPlayBin * play_bin) gst_bin_add_many (GST_BIN (element), csp, overlay, vbin, NULL); pad = gst_element_get_pad (overlay, "text_sink"); +#define gst_element_add_ghost_pad(element, pad, name) \ + gst_element_add_pad (element, gst_ghost_pad_new (name, pad)) gst_element_add_ghost_pad (element, pad, "text_sink"); gst_object_unref (GST_OBJECT (pad)); diff --git a/gst/playback/test.c b/gst/playback/test.c index 6b36781604..c4d3a229c4 100644 --- a/gst/playback/test.c +++ b/gst/playback/test.c @@ -36,8 +36,8 @@ gen_video_element () gst_bin_add (GST_BIN (element), sink); gst_element_link_pads (conv, "src", sink, "sink"); - gst_element_add_ghost_pad (element, gst_element_get_pad (conv, "sink"), - "sink"); + gst_element_add_pad (element, + gst_ghost_pad_new ("sink", gst_element_get_pad (conv, "sink"))); return element; } @@ -57,8 +57,8 @@ gen_audio_element () gst_bin_add (GST_BIN (element), sink); gst_element_link_pads (conv, "src", sink, "sink"); - gst_element_add_ghost_pad (element, - gst_element_get_pad (conv, "sink"), "sink"); + gst_element_add_pad (element, + gst_ghost_pad_new ("sink", gst_element_get_pad (conv, "sink"))); return element; }