fix broken xml

Original commit message from CVS:
fix broken xml
This commit is contained in:
Thomas Vander Stichele 2004-01-27 23:08:18 +00:00
parent 93ea284fe4
commit 4317361af4
2 changed files with 25 additions and 20 deletions

View file

@ -1,3 +1,8 @@
2004-01-28 Thomas Vander Stichele <thomas at apestaart dot org>
* docs/pwg/building_pads.xml:
Fix broken docbook
2004-01-27 Ronald Bultje <rbultje@ronald.bitfreak.net> 2004-01-27 Ronald Bultje <rbultje@ronald.bitfreak.net>
* docs/pwg/advanced_interfaces.xml: * docs/pwg/advanced_interfaces.xml:

View file

@ -39,19 +39,19 @@ gst_my_filter_init (GstMyFilter *filter)
GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter); GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter);
/* pad through which data comes in to the element */ /* pad through which data comes in to the element */
filter->sinkpad = gst_pad_new_from_template ( filter-&gt;sinkpad = gst_pad_new_from_template (
gst_element_class_get_pad_template (klass, "sink"), "sink"); gst_element_class_get_pad_template (klass, "sink"), "sink");
gst_pad_set_link_function (filter->sinkpad, gst_my_filter_link); gst_pad_set_link_function (filter-&gt;sinkpad, gst_my_filter_link);
gst_pad_set_getcaps_function (filter->sinkpad, gst_my_filter_getcaps); gst_pad_set_getcaps_function (filter-&gt;sinkpad, gst_my_filter_getcaps);
gst_pad_set_chain_function (filter->sinkpad, gst_my_filter_chain); gst_pad_set_chain_function (filter-&gt;sinkpad, gst_my_filter_chain);
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_element_add_pad (GST_ELEMENT (filter), filter-&gt;sinkpad);
/* pad through which data goes out of the element */ /* pad through which data goes out of the element */
filter->srcpad = gst_pad_new_from_template ( filter-&gt;srcpad = gst_pad_new_from_template (
gst_element_class_get_pad_template (klass, "src"), "src"); gst_element_class_get_pad_template (klass, "src"), "src");
gst_pad_set_link_function (filter->srcpad, gst_my_filter_link); gst_pad_set_link_function (filter-&gt;srcpad, gst_my_filter_link);
gst_pad_set_getcaps_function (filter->srcpad, gst_my_filter_getcaps); gst_pad_set_getcaps_function (filter-&gt;srcpad, gst_my_filter_getcaps);
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); gst_element_add_pad (GST_ELEMENT (filter), filter-&gt;srcpad);
[..] [..]
} }
</programlisting> </programlisting>
@ -75,8 +75,8 @@ gst_my_filter_link (GstPad *pad,
{ {
GstStructure *structure = gst_caps_get_structure (caps, 0); GstStructure *structure = gst_caps_get_structure (caps, 0);
GstMyFilter *filter = GST_MY_FILTER (gst_pad_get_parent (pad)); GstMyFilter *filter = GST_MY_FILTER (gst_pad_get_parent (pad));
GstPad *otherpad = (pad == filter->srcpad) ? filter->sinkpad : GstPad *otherpad = (pad == filter-&gt;srcpad) ? filter-&gt;sinkpad :
filter->srcpad; filter-&gt;srcpad;
GstPadLinkReturn ret; GstPadLinkReturn ret;
const gchar *mime; const gchar *mime;
@ -99,11 +99,11 @@ gst_my_filter_link (GstPad *pad,
/* Capsnego succeeded, get the stream properties for internal /* Capsnego succeeded, get the stream properties for internal
* usage and return success. */ * usage and return success. */
gst_structure_get_int (structure, "rate", &amp;filter->samplerate); gst_structure_get_int (structure, "rate", &amp;filter-&gt;samplerate);
gst_structure_get_int (structure, "channels", &amp;filter->channels); gst_structure_get_int (structure, "channels", &amp;filter-&gt;channels);
g_print ("Caps negotiation succeeded with %d Hz @ %d channels\n", g_print ("Caps negotiation succeeded with %d Hz @ %d channels\n",
filter->samplerate, filter->channels); filter-&gt;samplerate, filter-&gt;channels);
return ret; return ret;
} }
@ -137,8 +137,8 @@ static GstCaps *
gst_my_filter_getcaps (GstPad *pad) gst_my_filter_getcaps (GstPad *pad)
{ {
GstMyFilter *filter = GST_MY_FILTER (gst_pad_get_parent (pad)); GstMyFilter *filter = GST_MY_FILTER (gst_pad_get_parent (pad));
GstPad *otherpad = (pad == filter->srcpad) ? filter->sinkpad : GstPad *otherpad = (pad == filter-&gt;srcpad) ? filter-&gt;sinkpad :
filter->srcpad; filter-&gt;srcpad;
GstCaps *othercaps = gst_pad_get_allowed_caps (otherpad), *caps; GstCaps *othercaps = gst_pad_get_allowed_caps (otherpad), *caps;
gint n; gint n;
@ -147,7 +147,7 @@ gst_my_filter_getcaps (GstPad *pad)
/* We support *any* samplerate, indifferent from the samplerate /* We support *any* samplerate, indifferent from the samplerate
* supported by the linked elements on both sides. */ * supported by the linked elements on both sides. */
for (i = 0; i < gst_caps_get_size (othercaps); i++) { for (i = 0; i &lt; gst_caps_get_size (othercaps); i++) {
GstStructure *structure = gst_caps_get_structure (othercaps, i); GstStructure *structure = gst_caps_get_structure (othercaps, i);
gst_structure_remove_field (structure, "rate"); gst_structure_remove_field (structure, "rate");
@ -176,9 +176,9 @@ gst_my_filter_init (GstMyFilter *filter)
{ {
GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter); GstElementClass *klass = GST_ELEMENT_GET_CLASS (filter);
[..] [..]
filter->srcpad = gst_pad_new_from_template ( filter-&gt;srcpad = gst_pad_new_from_template (
gst_element_class_get_pad_template (klass, "src"), "src"); gst_element_class_get_pad_template (klass, "src"), "src");
gst_pad_use_explicit_caps (filter->srcpad); gst_pad_use_explicit_caps (filter-&gt;srcpad);
[..] [..]
} }
@ -187,7 +187,7 @@ gst_my_filter_somefunction (GstMyFilter *filter)
{ {
GstCaps *caps = ..; GstCaps *caps = ..;
[..] [..]
gst_pad_set_explicit_caps (filter->srcpad, caps); gst_pad_set_explicit_caps (filter-&gt;srcpad, caps);
[..] [..]
} }
</programlisting> </programlisting>