gst/gstghostpad.c: Also set template on the internal pad so that a getcaps from the target pad returns the template c...

Original commit message from CVS:
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
Also set template on the internal pad so that a getcaps from the target
pad returns the template caps.
This commit is contained in:
Wim Taymans 2006-09-18 13:56:26 +00:00
parent 53bf2d570c
commit 2c5cdfe01f
2 changed files with 19 additions and 5 deletions

View file

@ -1,3 +1,9 @@
2006-09-18 Wim Taymans <wim@fluendo.com>
* gst/gstghostpad.c: (gst_ghost_pad_new_full):
Also set template on the internal pad so that a getcaps from the target
pad returns the template caps.
2006-09-18 Wim Taymans <wim@fluendo.com>
* gst/gstelement.c: (gst_element_post_message),
@ -34,8 +40,8 @@
* docs/pwg/building-boiler.xml:
* plugins/elements/gstcapsfilter.c:
More G_OBJECT macro fixing. Also Fix some details on the plugin-stamp
section.
More G_OBJECT macro fixing. Also Fix some details on the plugin-stamp
section.
2006-09-16 Edward Hervey <edward@fluendo.com>

View file

@ -769,6 +769,7 @@ gst_ghost_pad_new_full (const gchar * name, GstPadDirection dir,
{
GstPad *ret;
GstPad *internal;
GstPadDirection otherdir;
g_return_val_if_fail (dir != GST_PAD_UNKNOWN, NULL);
@ -801,9 +802,16 @@ gst_ghost_pad_new_full (const gchar * name, GstPadDirection dir,
/* INTERNAL PAD, it always exists and is child of the ghostpad */
internal =
g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,
"direction", (dir == GST_PAD_SRC) ? GST_PAD_SINK : GST_PAD_SRC, NULL);
otherdir = (dir == GST_PAD_SRC) ? GST_PAD_SINK : GST_PAD_SRC;
if (templ) {
internal =
g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,
"direction", otherdir, "template", templ, NULL);
} else {
internal =
g_object_new (GST_TYPE_PROXY_PAD, "name", NULL,
"direction", otherdir, NULL);
}
/* Set directional padfunctions for internal pad */
if (dir == GST_PAD_SRC) {