Commit 2438f585 authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

Enable documentation.

Original commit message from CVS:
2005-11-06  Julien MOUTTE  <julien@moutte.net>

* Makefile.am:
* autogen.sh:
* configure.ac:
* docs/Makefile.am:
* docs/plugins/.cvsignore:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-decl-list.txt:
* docs/plugins/gst-plugins-bad-plugins-decl.txt:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins-undocumented.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/gst-plugins-bad-plugins.hierarchy:
* docs/plugins/gst-plugins-bad-plugins.interfaces:
* docs/plugins/gst-plugins-bad-plugins.prerequisites:
* docs/plugins/gst-plugins-bad-plugins.signals:
* docs/plugins/gst-plugins-bad-plugins.types:
* docs/plugins/inspect/plugin-dfbvideosink.xml:
* docs/version.entities.in: Enable documentation.
* examples/Makefile.am:
* examples/directfb/Makefile.am:
* examples/directfb/decker.ttf:
* examples/directfb/dfblogo.png:
* examples/directfb/gstdfb.c: (myclock), (dynamic_link),
(size_changed), (setup_dynamic_link), (main): Add an example
application for DirectFB.
parent 72e3851f
2005-11-06 Julien MOUTTE <julien@moutte.net>
* Makefile.am:
* autogen.sh:
* configure.ac:
* docs/Makefile.am:
* docs/plugins/.cvsignore:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-bad-plugins-decl-list.txt:
* docs/plugins/gst-plugins-bad-plugins-decl.txt:
* docs/plugins/gst-plugins-bad-plugins-docs.sgml:
* docs/plugins/gst-plugins-bad-plugins-sections.txt:
* docs/plugins/gst-plugins-bad-plugins-undocumented.txt:
* docs/plugins/gst-plugins-bad-plugins.args:
* docs/plugins/gst-plugins-bad-plugins.hierarchy:
* docs/plugins/gst-plugins-bad-plugins.interfaces:
* docs/plugins/gst-plugins-bad-plugins.prerequisites:
* docs/plugins/gst-plugins-bad-plugins.signals:
* docs/plugins/gst-plugins-bad-plugins.types:
* docs/plugins/inspect/plugin-dfbvideosink.xml:
* docs/version.entities.in: Enable documentation.
* examples/Makefile.am:
* examples/directfb/Makefile.am:
* examples/directfb/decker.ttf:
* examples/directfb/dfblogo.png:
* examples/directfb/gstdfb.c: (myclock), (dynamic_link),
(size_changed), (setup_dynamic_link), (main): Add an example
application for DirectFB.
2005-11-06 Julien MOUTTE <julien@moutte.net>
* ext/directfb/Makefile.am: Add the example application.
......
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
SUBDIRS = \
gst sys ext \
m4 common
m4 common docs
EXTRA_DIST = \
gst-plugins-bad.spec depcomp \
......
......@@ -25,7 +25,7 @@ then
fi
. common/gst-autogen.sh
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG'
CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-gtk-doc'
autogen_options $@
......
......@@ -427,6 +427,13 @@ GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $G
AC_SUBST(GST_LIBS)
AC_SUBST(GST_CFLAGS)
dnl ######################
dnl # Checks for gtk-doc #
dnl ######################
GTK_DOC_CHECK([1.3])
AS_PATH_PYTHON([2.1])
dnl ############################
dnl # Set up some more defines #
dnl ############################
......@@ -481,12 +488,17 @@ gst/speed/Makefile
gst/qtdemux/Makefile
gst/tta/Makefile
sys/Makefile
examples/Makefile
examples/directfb/Makefile
ext/Makefile
ext/directfb/Makefile
ext/faac/Makefile
ext/faad/Makefile
ext/gsm/Makefile
ext/sdl/Makefile
docs/Makefile
docs/plugins/Makefile
docs/version.entities
common/Makefile
common/m4/Makefile
m4/Makefile
......
if ENABLE_GTK_DOC
GTK_DOC_DIRS = plugins
else
GTK_DOC_DIRS =
endif
SUBDIRS = $(GTK_DOC_DIRS)
DIST_SUBDIRS = plugins
EXTRA_DIST = \
random/ChangeLog-0.8 \
version.entities.in
Makefile
Makefile.in
*-decl.txt
*-decl-list.txt
*-undocumented.txt
*-unused.txt
*.args
*.hierarchy
*.interfaces
*.prerequisites
*.signals
html
sgml
xml
*.stamp
GST_DOC_SCANOBJ = $(top_srcdir)/common/gstdoc-scangobj
## Process this file with automake to produce Makefile.in
# The name of the module, e.g. 'glib'.
#DOC_MODULE=gst-plugins-libs-@GST_MAJORMINOR@
MODULE=gst-plugins-bad
DOC_MODULE=$(MODULE)-plugins
# for upload.mak
DOC=$(MODULE)-plugins
FORMATS=html
html: html-build.stamp
include $(top_srcdir)/common/upload-doc.mak
# generated basefiles
#basefiles = \
## $(DOC_MODULE).types \
# $(DOC_MODULE)-sections.txt \
# $(DOC_MODULE)-docs.sgml
# ugly hack to make -unused.sgml work
#unused-build.stamp:
# BUILDDIR=`pwd` && \
# cd $(srcdir)/tmpl && \
# ln -sf gstreamer-libs-unused.sgml \
# $$BUILDDIR/tmpl/gstreamer-libs-@GST_MAJORMINOR@-unused.sgml
# touch unused-build.stamp
# these rules are added to create parallel docs using GST_MAJORMINOR
#$(basefiles): gstreamer-libs-@GST_MAJORMINOR@%: gstreamer-libs%
# cp $< $@
#CLEANFILES = $(basefiles)
# The top-level SGML file. Change it if you want.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# The directory containing the source code. Relative to $(top_srcdir).
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting functions and macros.
DOC_SOURCE_DIR = $(top_srcdir)
# Extra options to supply to gtkdoc-scan.
SCAN_OPTIONS=
# FIXME :
# there's something wrong with gstreamer-sections.txt not being in the dist
# maybe it doesn't resolve; we're adding it below for now
#EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
# Extra options to supply to gtkdoc-mkdb.
MKDB_OPTIONS=--sgml-mode
# Extra options to supply to gtkdoc-fixref.
# FIXME get the location of the installed gstreamer docs
#FIXXREF_OPTIONS=--extra-dir=../gst/html
# Used for dependencies.
HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.h
CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*/*.c
# this is a wingo addition
# thomasvs: another nice wingo addition would be an explanation on why
# this is useful ;)
SCANOBJ_DEPS =
# Header files to ignore when scanning.
IGNORE_HFILES =
IGNORE_CFILES =
# we add all .h files of elements that have signals/args we want
# sadly this also pulls in the private methods - maybe we should
# move those around in the source ?
# also, we should add some stuff here conditionally based on whether
# or not the plugin will actually build
# but I'm not sure about that - it might be this Just Works given that
# the registry won't have the element
# FIXME: not ported yet
# $(top_srcdir)/ext/gnomevfs/gstgnomevfssink.c
# example code that needs to be converted to xml and placed in xml/
EXAMPLE_CFILES = \
$(top_srcdir)/ext/directfb/dfb-example.c
EXTRA_HFILES = \
$(top_srcdir)/ext/directfb/dfbvideosink.h
# Images to copy into HTML directory.
HTML_IMAGES =
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
content_files =
# Other files to distribute.
extra_files =
# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
# contains GtkObjects/GObjects and you want to document signals and properties.
GTKDOC_CFLAGS = $(GST_BASE_CFLAGS) -I$(top_builddir)
GTKDOC_LIBS = $(SCANOBJ_DEPS) $(GST_BASE_LIBS)
GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
# If you need to override some of the declarations, place them in this file
# and uncomment this line.
#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
DOC_OVERRIDES =
include $(top_srcdir)/common/gtk-doc-plugins.mak
<SECTION>
<FILE>dfbvideosink</FILE>
GST_TYPE_DFBSURFACE
GST_IS_DFBSURFACE
GST_DFBSURFACE
GstDfbSurface
GstDfbVMode
<TITLE>GstDfbVideoSink</TITLE>
gst_dfbsurface_get_type
<SUBSECTION Standard>
GST_DFBVIDEOSINK
GST_IS_DFBVIDEOSINK
GST_TYPE_DFBVIDEOSINK
gst_dfbvideosink_get_type
GST_DFBVIDEOSINK_CLASS
GST_IS_DFBVIDEOSINK_CLASS
</SECTION>
<MACRO>
<NAME>GST_TYPE_DFBVIDEOSINK</NAME>
#define GST_TYPE_DFBVIDEOSINK (gst_dfbvideosink_get_type())
</MACRO>
<MACRO>
<NAME>GST_DFBVIDEOSINK</NAME>
#define GST_DFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DFBVIDEOSINK, GstDfbVideoSink))
</MACRO>
<MACRO>
<NAME>GST_DFBVIDEOSINK_CLASS</NAME>
#define GST_DFBVIDEOSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DFBVIDEOSINK, GstDfbVideoSink))
</MACRO>
<MACRO>
<NAME>GST_IS_DFBVIDEOSINK</NAME>
#define GST_IS_DFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DFBVIDEOSINK))
</MACRO>
<MACRO>
<NAME>GST_IS_DFBVIDEOSINK_CLASS</NAME>
#define GST_IS_DFBVIDEOSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DFBVIDEOSINK))
</MACRO>
<STRUCT>
<NAME>GstDfbVideoSink</NAME>
</STRUCT>
<STRUCT>
<NAME>GstDfbVideoSinkClass</NAME>
</STRUCT>
<MACRO>
<NAME>GST_TYPE_DFBSURFACE</NAME>
#define GST_TYPE_DFBSURFACE (gst_dfbsurface_get_type())
</MACRO>
<MACRO>
<NAME>GST_IS_DFBSURFACE</NAME>
#define GST_IS_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DFBSURFACE))
</MACRO>
<MACRO>
<NAME>GST_DFBSURFACE</NAME>
#define GST_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DFBSURFACE, GstDfbSurface))
</MACRO>
<STRUCT>
<NAME>GstDfbSurface</NAME>
</STRUCT>
<STRUCT>
<NAME>GstDfbSurface</NAME>
struct _GstDfbSurface {
GstBuffer buffer; /* We extend GstBuffer */
IDirectFBSurface *surface;
gint width;
gint height;
gboolean locked;
DFBSurfacePixelFormat pixel_format;
GstDfbVideoSink *dfbvideosink;
};
</STRUCT>
<STRUCT>
<NAME>GstDfbVMode</NAME>
</STRUCT>
<STRUCT>
<NAME>GstDfbVMode</NAME>
struct _GstDfbVMode {
gint width;
gint height;
gint bpp;
};
</STRUCT>
<STRUCT>
<NAME>GstDfbVideoSink</NAME>
struct _GstDfbVideoSink {
/* Our element stuff */
GstVideoSink videosink;
GSList *buffer_pool;
gdouble framerate;
gint video_width, video_height; /* size of incoming video */
gint out_width, out_height;
/* Standalone */
IDirectFB *dfb;
GSList *vmodes; /* Video modes */
gint layer_id;
IDirectFBDisplayLayer *layer;
IDirectFBSurface *primary;
IDirectFBEventBuffer *event_buffer;
GThread *event_thread;
/* Embedded */
IDirectFBSurface *ext_surface;
DFBSurfacePixelFormat pixel_format;
gboolean hw_scaling;
gboolean backbuffer;
gboolean setup;
gboolean running;
};
</STRUCT>
<STRUCT>
<NAME>GstDfbVideoSinkClass</NAME>
struct _GstDfbVideoSinkClass {
GstVideoSinkClass parent_class;
};
</STRUCT>
<FUNCTION>
<NAME>gst_dfbvideosink_get_type</NAME>
<RETURNS>GType </RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gst_dfbsurface_get_type</NAME>
<RETURNS>GType </RETURNS>
void
</FUNCTION>
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % version-entities SYSTEM "version.entities">
%version-entities;
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>GStreamer Bad Plugins &GST_MAJORMINOR; Plugins Reference Manual</title>
</bookinfo>
<chapter>
<title>gst-plugins-bad Elements</title>
<xi:include href="xml/element-dfbvideosink.xml" />
</chapter>
<chapter>
<title>gst-plugins-bad Plugins</title>
<xi:include href="xml/plugin-dfbvideosink.xml" />
</chapter>
</book>
<SECTION>
<FILE>element-dfbvideosink</FILE>
GstDfbVideoSink
<TITLE>dfbvideosink</TITLE>
<SUBSECTION Standard>
GstDfbVideoSinkClass
</SECTION>
75% symbol docs coverage.
3 symbols documented.
0 symbols incomplete.
1 not documented.
GstDfbVideoSink
<ARG>
<NAME>GstDfbVideoSink::surface</NAME>
<TYPE>gpointer</TYPE>
<RANGE></RANGE>
<FLAGS>w</FLAGS>
<NICK>Destination surface</NICK>
<BLURB>Render video frames to this surface. The pointer you pass here has to point to an IDirectFBSurface * interface</BLURB>
<DEFAULT>NULL</DEFAULT>
</ARG>
GObject
GstObject
GstPad
GstPluginFeature
GstElementFactory
GstTypeFindFactory
GstIndexFactory
GstElement
GstBin
GstPipeline
GstQueue
GstBaseSink
GstVideoSink
GstDfbVideoSink
GstPlugin
GstRegistry
GstPadTemplate
GstSignalObject
GInterface
GstChildProxy
GstBin GstChildProxy
GstPipeline GstChildProxy
<plugin>
<name>dfbvideosink</name>
<description>DirectFB video sink</description>
<filename>../../ext/directfb/.libs/libgstdfbvideosink.so</filename>
<basename>libgstdfbvideosink.so</basename>
<version>0.9.4</version>
<license>LGPL</license>
<source>gst-plugins-bad</source>
<package>GStreamer source release</package>
<origin>http://gstreamer.freedesktop.org/</origin>
<elements>
<element>
<name>dfbvideosink</name>
<longname>DirectFB video sink</longname>
<class>Sink/Video</class>
<description>DirectFB video sink</description>
<author>Julien Moutte &lt;julien@moutte.net&gt;</author>
</element>
</elements>
</plugin>
<!ENTITY GST_MAJORMINOR "@GST_MAJORMINOR@">
<!ENTITY GST_VERSION "@VERSION@">
if HAVE_GTK
GTK_SUBDIRS=dynparams level $(FT2_SUBDIRS)
else
GTK_SUBDIRS=
endif
#if HAVE_GTK
#GTK_SUBDIRS=dynparams level $(FT2_SUBDIRS)
#else
#GTK_SUBDIRS=
#endif
if USE_GCONF
GCONF_SUBDIRS=gstplay
if USE_DIRECTFB
DIRECTFB_DIR=directfb
else
GCONF_SUBDIRS=
DIRECTFB_DIR=
endif
SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) switch
DIST_SUBDIRS=capsfilter dynparams indexing gstplay switch level
SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) $(DIRECTFB_DIR)
DIST_SUBDIRS=capsfilter dynparams indexing gstplay directfb switch level
noinst_PROGRAMS = gstdfb
gstdfb_SOURCES = gstdfb.c
gstdfb_CFLAGS = $(GST_CFLAGS) $(DIRECTFB_CFLAGS)
gstdfb_LDFLAGS = $(GST_LIBS) $(DIRECTFB_LIBS)
<
/*
(c) Copyright 2000-2002 convergence integrated media GmbH.
All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@directfb.org> and
Julien Moutte <julien@moutte.net>.
This file is subject to the terms and conditions of the MIT License:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include <time.h>
#include <directfb.h>
#include <gst/gst.h>
#include <string.h>
/* macro for a safe call to DirectFB functions */
#define DFBCHECK(x...) \
{ \
err = x; \
if (err != DFB_OK) { \
fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
DirectFBErrorFatal( #x, err ); \
} \
}
typedef struct
{
const gchar *padname;
GstPad *target;
GstElement *bin;
} dyn_link;
static inline long
myclock ()
{
struct timeval tv;
gettimeofday (&tv, NULL);
return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
}
static void
dynamic_link (GstPadTemplate * templ, GstPad * newpad, gpointer data)
{
dyn_link *connect = (dyn_link *) data;
if (connect->padname == NULL ||
!strcmp (gst_pad_get_name (newpad), connect->padname)) {
gst_pad_link (newpad, connect->target);
}
}
static void
size_changed (GObject * obj, GParamSpec * pspec, IDirectFBWindow * window)
{
GstPad *pad = GST_PAD (obj);
GstStructure *s;
GstCaps *caps;
if (!(caps = gst_pad_get_negotiated_caps (pad)))
return;
s = gst_caps_get_structure (caps, 0);
if (s) {
gint width, height;
if (!(gst_structure_get_int (s, "width", &width) &&
gst_structure_get_int (s, "height", &height)))
return;
window->Resize (window, width, height);
}
}
static void
setup_dynamic_link (GstElement * element, const gchar * padname,
GstPad * target, GstElement * bin)