diff --git a/ChangeLog b/ChangeLog index c6f5b68b11..4ab378f1ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-01-29 Thomas Vander Stichele + + * docs/Makefile.am: + * docs/gst/tmpl/gstelement.sgml: + * docs/gst/tmpl/gstxml.sgml: + * docs/manuals.mak: + * docs/pwg/advanced-request.xml: + * docs/pwg/advanced-scheduling.xml: + * docs/pwg/advanced-tagging.xml: + fix non-validating docbook using CDATA + make sure make check-local gets run first to check if it validates + 2004-01-29 Julien MOUTTE * docs/pwg/advanced-events.xml: Adding documentation on advanced event diff --git a/docs/Makefile.am b/docs/Makefile.am index 81e545fc9d..cf9cfc4aa0 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -5,6 +5,8 @@ else SUBDIRS_PLUGINS = endif +# FIXME: separate this out into docbook and gtk-doc so it doesn't descend +# for docs it can't build if BUILD_DOCS SUBDIRS_DOCS = faq manual pwg gst libs else diff --git a/docs/gst/tmpl/gstelement.sgml b/docs/gst/tmpl/gstelement.sgml index eab2e682e2..126421abb8 100644 --- a/docs/gst/tmpl/gstelement.sgml +++ b/docs/gst/tmpl/gstelement.sgml @@ -995,6 +995,7 @@ Is triggered whenever an error occured. @: @: @: +@: @: diff --git a/docs/gst/tmpl/gstxml.sgml b/docs/gst/tmpl/gstxml.sgml index 32d00bc1f9..08450b21b9 100644 --- a/docs/gst/tmpl/gstxml.sgml +++ b/docs/gst/tmpl/gstxml.sgml @@ -110,6 +110,10 @@ All GstElements can be serialized to an XML presentation and subsequently loaded +@: +@: +@: + @gstxml: the object which received the signal. @arg1: @arg2: @@ -119,7 +123,7 @@ All GstElements can be serialized to an XML presentation and subsequently loaded -@: -@: -@: +@gstxml: the object which received the signal. +@arg1: +@arg2: diff --git a/docs/manuals.mak b/docs/manuals.mak index 745e53c49d..71fd741b78 100644 --- a/docs/manuals.mak +++ b/docs/manuals.mak @@ -92,6 +92,7 @@ $(BUILDDIR)/$(MAIN): $(XML) $(CSS) @cp ../version.entities $(BUILDDIR) html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC) + @make check-local @echo "*** Generating HTML output ***" @-mkdir -p html @cp -f $(srcdir)/../image-png $(BUILDDIR)/image.entities @@ -105,12 +106,14 @@ html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC) cp $(PNG_BUILT) html/images || true $(DOC).ps: $(BUILDDIR)/$(MAIN) $(EPS_BUILT) $(PNG_SRC) $(FIG_SRC) + @make check-local @echo "*** Generating PS output ***" @cp -f $(srcdir)/../image-eps $(BUILDDIR)/image.entities cd $(BUILDDIR) && docbook2ps -o .. $(MAIN) # export LC_PAPER=$(PAPER_LOCALE) && cd $(BUILDDIR) && xmlto ps -o .. $(MAIN) $(DOC).pdf: $(DOC).ps + @make check-local @echo "*** Generating PDF output ***" @ps2pdf $(DOC).ps diff --git a/docs/pwg/advanced-request.xml b/docs/pwg/advanced-request.xml index f8af024b9c..6701507582 100644 --- a/docs/pwg/advanced-request.xml +++ b/docs/pwg/advanced-request.xml @@ -46,6 +46,7 @@ pads, looks like this: +bs, &data, n + 1); + num = gst_bytestream_peek_bytes (filter->bs, &data, n + 1); if (num != n + 1) return NULL; @@ -97,7 +98,7 @@ gst_my_filter_getline (GstMyFilter *filter) if (data[n] == '\n') { GstBuffer *buf = gst_buffer_new_and_alloc (n + 1); - gst_bytestream_peek_bytes (filter->bs, &data, n); + gst_bytestream_peek_bytes (filter->bs, &data, n); memcpy (GST_BUFFER_DATA (buf), data, n); GST_BUFFER_DATA (buf)[n] = '\0'; gst_bytestream_flush_fast (filter->bs, n + 1); @@ -163,11 +164,11 @@ gst_my_filter_loopfunc (GstElement *element) /* parse stream number and go beyond the ':' in the data */ num = atoi (GST_BUFFER_DATA (buf)); - if (num >= 0 && num < g_list_length (filter->srcpadlist)) { + if (num >= 0 && num < g_list_length (filter->srcpadlist)) { pad = GST_PAD (g_list_nth_data (filter->srcpadlist, num); /* magic buffer parsing foo */ - for (n = 0; GST_BUFFER_DATA (buf)[n] != ':' && + for (n = 0; GST_BUFFER_DATA (buf)[n] != ':' && GST_BUFFER_DATA (buf)[n] != '\0'; n++) ; if (GST_BUFFER_DATA (buf)[n] != '\0') { GstBuffer *sub; @@ -184,6 +185,7 @@ gst_my_filter_loopfunc (GstElement *element) } gst_buffer_unref (buf); } +]]> Note that we use a lot of checks everywhere to make sure that the content @@ -212,6 +214,7 @@ gst_my_filter_loopfunc (GstElement *element) example of an aggregator based on request pads. + The _loop () function is the same as the one given diff --git a/docs/pwg/advanced-scheduling.xml b/docs/pwg/advanced-scheduling.xml index e962c83585..a6dafa0951 100644 --- a/docs/pwg/advanced-scheduling.xml +++ b/docs/pwg/advanced-scheduling.xml @@ -149,6 +149,8 @@ gst_my_filter_loopfunc (GstElement *element) useful in practice, but a good example, again. +eos && !context->lastbuf) { + while (GST_PAD_IS_USABLE (pad) && + !context->eos && !context->lastbuf) { GstData *data = gst_pad_pull (pad); if (GST_IS_EVENT (data)) { @@ -246,6 +248,7 @@ gst_my_filter_loopfunc (GstElement *element) gst_pad_push (filter->srcpad, GST_DATA (first_context->lastbuf)); first_context->lastbuf = NULL; } +]]> Note that a loop-function is allowed to return. Better yet, a loop @@ -276,6 +279,7 @@ gst_my_filter_loopfunc (GstElement *element) over its source pad. +bs, &data, n + 1); + num = gst_bytestream_peek_bytes (filter->bs, &data, n + 1); if (num != n + 1) { GstEvent *event = NULL; guint remaining; - gst_bytestream_get_status (filter->bs, &remaining, &event); + gst_bytestream_get_status (filter->bs, &remaining, &event); if (event) { if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)) { /* end-of-file */ @@ -312,7 +316,7 @@ gst_my_filter_loopfunc (GstElement *element) GstBuffer *buf = gst_buffer_new_and_alloc (n + 1); /* read the line of text without newline - then flush the newline */ - gst_bytestream_peek_data (filter->bs, &data, n); + gst_bytestream_peek_data (filter->bs, &data, n); memcpy (GST_BUFFER_DATA (buf), data, n); GST_BUFFER_DATA (buf)[n] = '\0'; gst_bytestream_flush_fast (filter->bs, n + 1); @@ -345,6 +349,7 @@ gst_my_filter_change_state (GstElement *element) return GST_STATE_SUCCESS; } +]]> In the above example, you'll notice how bytestream handles buffering of diff --git a/docs/pwg/advanced-tagging.xml b/docs/pwg/advanced-tagging.xml index e51c723768..677ce64483 100644 --- a/docs/pwg/advanced-tagging.xml +++ b/docs/pwg/advanced-tagging.xml @@ -66,6 +66,7 @@ . +srcpad, GST_DATA (gst_event_new (GST_EVENT_EOS))); gst_element_set_eos (element); } +]]> We currently assume the core to already know the @@ -131,6 +133,7 @@ next: functions, preferrably _class_init (). + @@ -168,6 +172,7 @@ gst_my_filter_class_init (GstMyFilterClass *klass) incoming events. +srcpad, GST_DATA (buf)); } - g_value_unset (&to); + g_value_unset (&to); } static void @@ -270,6 +275,7 @@ gst_my_filter_loopfunc (GstElement *element) gst_pad_push (filter->srcpad, GST_DATA (gst_event_new (GST_EVENT_EOS))); gst_element_set_eos (element); } +]]> Note that normally, elements would not read the full stream before