-Subproject commit 67b7e6c0db99415e0440d0c576495641b53e976a
+Subproject commit 495d6e30b3e513aebbc98467707c609c49ea654d
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
};
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;
}
* 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;
/* 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;
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;
/* 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;
}
* - 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);
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);
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;
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;
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);
/* 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);
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;
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;
/* 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);
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));
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);
{
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));
}
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);
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));
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;
}
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;
}