merge HEAD -> BUILDBRANCH here goes nothing ;)

Original commit message from CVS:
merge HEAD -> BUILDBRANCH
here goes nothing ;)
This commit is contained in:
Thomas Vander Stichele 2001-12-16 01:42:33 +00:00
parent 4d589ce91d
commit 415490cf78
240 changed files with 6856 additions and 3423 deletions

2
.gitignore vendored
View file

@ -21,5 +21,3 @@ missing
stamp-h
stamp-h.in
stamp.h
configure.in
configure.ac

View file

@ -1,4 +1,4 @@
Erik Walthinsen <omega@cse.ogi.edu>
Erik Walthinsen <omega@temple-baptist.com>
Matt Howell <mhowell@users.sourceforge.net>
Brent Bradburn <bbradburn@users.sourceforge.net>
Wim Taymans <wim.taymans@chello.be>
@ -18,3 +18,10 @@ Thomas Nyberg <thomas@codefactory.se>
- ALSA plugins
Bastien Nocera <hadess@hadess.net>
- gnomevfs sink and source
Christian Fredrik Kalager Schaller <Uraeus@linuxrising.org>
- Red Hat packaging and website work
Thomas Vander Stichele <thomas@apestaart.org>
- build system cleaning
- some audio plugins
- release pushing

117
ChangeLog
View file

@ -1,8 +1,123 @@
2001-12-15 23:43 thomasvs
2001-12-15 Thomas Vander Stichele <thomas@apestaart.org>
* configure.ac : major overhaul
* m4/ dir added with lots of checks in it
2001-12-14 Michael Meeks <michael@ximian.com>
* gst/gst.c (gst_main, gst_main_quit): upd.
* gst/gstutils.c (gst_util_has_arg): impl.
(gst_util_get_int64_arg): impl.
* plugins/mpeg2/video/gstmpeg2play.c
(gst_mpeg2play_class_init): min frames per sec = 0.
* plugins/mikmod/gstmikmod.c (gst_mikmod_class_init):
s/16bit/use16bit/ properties can't begin with a non
alpha.
* tools/gstreamer-guilaunch.c: fresh from the ministy
of nasty hacks.
* tools/Makefile.am: enable gstreamer-guilaunch for
Gnome 2.0
* tools/gstreamer-launch.c (main): upd.
(idle_func): quit the mainloop.
2001-12-14 Michael Meeks <michael@ximian.com>
* plugins/audiofile/gstafsrc.c (gst_afsrc_class_init): upd.
* plugins/gnomevfs/gnomevfssrc.c (gst_gnomevfssrc_class_init):
kill broken mess for install_std_props.
* plugins/gnomevfs/gnomevfssink.c
(gst_gnomevfssink_class_init): upd.
* tools/gstreamer-launch.c (main): add efence hook.
* gst/elements/gstfilesrc.c (gst_filesrc_get): use
a volatile pointer, don't write to the buffer.
* gst/gstelement.c (gst_element_populate_std_props):
add debug & robustness.
* gst/gstelement.c (gst_element_populate_std_props):
add debug & robustness.
2001-12-13 Michael Meeks <michael@ximian.com>
* gst/elements/*.c: (..._class_init): clean to use
gst_populate_std_props.
* gst/gstelement.c
(gst_element_populate_std_props): impl, simply for now,
with a few standard properties.
(gst_element_install_std_props): impl nice helper.
2001-12-13 Michael Meeks <michael@ximian.com>
* gst/gstplugin.c (_gst_plugin_initialize): g_error
instead of warning.
* Makefile.am: update.
* editor/gsteditorprojectview.c (view_on_element_added):
* editor/gsteditorproject.c
(gst_editor_project_class_init): upd.
* plugins/avi/gstavimux.c
(gst_avimux_request_new_pad): don't clobber name.
* libs/control/gstdparammanager.c
(gst_dpman_class_init): upd.
(gst_dpman_dispose): chain to parent.
* gst/cothreads.c (cothread_create): use guchar *'s
not void *'s for bytewise pointer arithmetic.
* gst/gstelement.h: kill const on get_property value.
* plugins/avi/gstavimux.c
(gst_avimux_request_new_pad): add name param.
* configure.ac: Add checks for libglade-2.0 and
gnome-vfs-2.0
2001-12-13 Michael Meeks <michael@ximian.com>
* plugins/xvideosink/Makefile.am: add $(X_LIBS)
* examples/typefind/typefind.c (type_found): upd.
xml code.
* plugins/mikmod/gstmikmod.c
(gst_mikmod_set_property): same memory bug here -
unfixed.
* plugins/oss/gstosssrc.c
(gst_osssrc_set_property): fix memory issue.
(gst_osssrc_init): dup the string - argh; quit here -
such code should be stuck in a common base class not
cut and pasted.
* plugins/oss/gstosssink.c
(gst_osssink_init): manage the device allocation.
(gst_osssink_finalize): impl.
(gst_osssink_class_init): upd.
(gst_osssink_set_property): upd.
* acconfig.h: cover HAVE_LIBXML2
* configure.ac: update libxml checks.
2001-12-11 22:10 thomasvs
* lots of build fixes for 0.3.0 release
2001-08-15 23:43 cael
* gstplay/: ChangeLog, gstmediaplay.c, gstplay.c: Added hacky check

View file

@ -3,7 +3,12 @@ VERSION = @VERSION@
# if libglade is present, build the player and editor
if HAVE_LIBGLADE_GNOME
SUBDIRS_LGG = gstplay editor
if HAVE_GNOME
SUBDIRS_LGG = gstplay editor
else
# Gnome 2.0 ...
SUBDIRS_LGG = gstplay
endif
else
SUBDIRS_LGG =
endif

2
NEWS
View file

@ -0,0 +1,2 @@
2001-12-12
* GStreamer 0.3.0 released, "Most Eventful Ever"

31
README
View file

@ -10,26 +10,15 @@ release the source.
Developer note: When building from CVS sources, you will need to run
autogen.sh to generate the build system files.
Unfortunately, there is a bug in automake which causes it to use a large
amount of memory when generating plugins/Makefile.in. The following patch,
which you may wish to apply to automake (version 1.4), fixes this problem.
It is also fixed in versions of automake 1.4f and later.
Alternatively, ensure that you have at least 512Mb of memory on your system,
and be prepared to wait a little while when running automake (or autogen.sh).
GStreamer is cutting-edge stuff. To be a CVS developer, you need
cutting-edge tools.
The autogen.sh script will automatically detect an unpatched automake and give
a warning. It will also generate a patched version of automake in the top
build directory, which you can use by putting it in a directory in your $PATH
ahead of the unpatched version of automake.
ATM, most of us have at least these versions :
@@ -2383,8 +2383,8 @@
# to all possible directories, and use it. If DIST_SUBDIRS is
# defined, just use it.
local ($dist_subdir_name);
- if (&variable_conditions ('SUBDIRS')
- || &variable_defined ('DIST_SUBDIRS'))
+ if (&variable_defined ('DIST_SUBDIRS')
+ || &variable_conditions ('SUBDIRS'))
{
$dist_subdir_name = 'DIST_SUBDIRS';
if (! &variable_defined ('DIST_SUBDIRS'))
* autoconf 2.52 (NOT 2.52d)
* automake 1.5
* libtool 1.4
* pkg-config 0.8.0
autogen.sh will check for these versions and complain if you don't have
them.

View file

@ -81,8 +81,8 @@ CVS (using autogen.sh):
Required tools:
===============
autoconf v2.13 or better, 2.52 prefered
automake v1.4 or better, 1.5 prefered
autoconf 2.52
automake 1.5
libtool v1.4 or better
pkgconfig 0.8.0 (http://www.freedesktop.org/software/pkgconfig/)

3
TODO
View file

@ -8,3 +8,6 @@
- deal with clocking issues
- use real chaining where possible
- factory aliases?
- fix plugins :
wtay : the proper fix is of course to fix the plugins and
implement the cleanup in the state change function..

View file

@ -1,5 +1,6 @@
#undef PACKAGE
#undef VERSION
#undef GST_VERSION_RELEASE
/* Gettext stuff */
#undef ENABLE_NLS
@ -9,6 +10,7 @@
#undef HAVE_STPCPY
#undef USE_GLIB2
#undef HAVE_LIBXML2
#undef PLUGINS_DIR
#undef PLUGINS_BUILDDIR

View file

@ -28,7 +28,6 @@ version_check ()
MINOR=$4
MICRO=$5
# WRONG is unset as long as we haven't found the version to be wrong
WRONG=
debug "major $MAJOR minor $MINOR micro $MICRO"

View file

@ -407,7 +407,7 @@ init_server_factory (int argc, char **argv)
int
main (int argc, char **argv)
{
//g_thread_init (NULL);
/* g_thread_init (NULL); */
/*
* Setup the factory.
*/

View file

@ -1,4 +1,4 @@
dnl Note: this file is generated from configure.base by autogen.sh
dnl Note: this file is now the main autoconf file
AC_INIT
AC_CONFIG_SRCDIR([gst/gstobject.h])
@ -9,6 +9,10 @@ AM_CONFIG_HEADER(config.h)
GST_VERSION_MAJOR=0
GST_VERSION_MINOR=3
GST_VERSION_MICRO=11
dnl we use the release tag during CVS development
GST_VERSION_RELEASE=`date +%Y%m%d`
GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
PACKAGE=gstreamer
@ -18,9 +22,11 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(GST_VERSION_RELEASE, "$GST_VERSION_RELEASE")
AC_SUBST(GST_VERSION_RELEASE)
dnl libtool
GST_CURRENT=0
GST_CURRENT=1
GST_REVISION=0
GST_AGE=0
GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
@ -89,19 +95,42 @@ export PKG_CONFIG_PATH
dnl Check for pkgconfig
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, true, false)
dnl check for gtkdoc
dnl check for gtk-doc
AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
if test "x$with_html_dir" = "x" ; then
HTML_DIR='${datadir}/gst/html'
else
HTML_DIR=$with_html_dir
fi
AC_SUBST(HTML_DIR)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, true, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scanobj, :, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scan, :, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mktmpl, :, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkdb, :, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-mkhtml, :, false)
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-fixxref, :, false)
gtk_doc_min_version=0.6
if $HAVE_GTK_DOC ; then
gtk_doc_version=`gtkdoc-mkdb --version`
AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
if perl <<EOF ; then
exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
EOF
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
HAVE_GTK_DOC=false
fi
fi
GTK_DOC_SCANOBJ=gtkdoc-scanobj
AC_SUBST(HAVE_GTK_DOC)
AC_SUBST(GTK_DOC_SCANOBJ)
dnl check for docbook tools
AC_CHECK_PROG(HAVE_DB2HTML, db2html, true, false)
AC_CHECK_PROG(HAVE_DB2PS, db2ps, true, false)
AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, true, false)
AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, true, false)
AC_CHECK_PROG(HAVE_PDFTOPS, pdftops, true, false)
dnl this does not yet work properly, at least on debain -- wingo
HAVE_PDFXMLTEX=false
dnl check for image conversion tool
AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, true, false)
@ -115,11 +144,11 @@ if test "x$HAVE_FIG2DEV" = "xtrue" ; then
HAVE_FIG2DEV_PNG=true
fi
fi
HAVE_FIG2DEV_EPS=false
HAVE_FIG2DEV_PDF=false
if test "x$HAVE_FIG2DEV" = "xtrue" ; then
fig2dev_quiet=`fig2dev -L eps </dev/null 2>&1 >/dev/null`
fig2dev_quiet=`fig2dev -L pdf </dev/null 2>&1 >/dev/null`
if test "x$fig2dev_quiet" = "x" ; then
HAVE_FIG2DEV_EPS=true
HAVE_FIG2DEV_PDF=true
fi
fi
@ -237,6 +266,13 @@ else
GTK_FLAGS=$GTK2_CFLAGS
GTK_LIBS=$GTK2_LIBS
if $HAVE_GTK_DOC; then
AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scangobj, true, false)
if $HAVE_GTK_DOC; then
GTK_DOC_SCANOBJ=gtkdoc-scangobj
fi;
fi
dnl FIXME: check for gnome2 - this conditional is currently
dnl always false.
@ -248,10 +284,21 @@ AC_SUBST(GST_PKG_DEPS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
if test x$USE_GLIB2 = xno; then
LIBXML_PKG='libxml >= 1.8.1'
else
LIBXML_PKG='libxml-2.0'
AC_DEFINE(HAVE_LIBXML2)
fi
AC_SUBST(LIBXML_PKG)
dnl Check for libxml
AC_PATH_PROG(XML_CONFIG, xml-config, no)
dnl Thomas tries to convert this to pkg-config
dnl PKG_CHECK_MODULES(XML, $LIBXML_PKG, XML_CONFIG=yes, XML_CONFIG=no)
dnl AC_PATH_PROG(XML_CONFIG, xml-config, no)
if test x$XML_CONFIG = xno; then
AC_MSG_ERROR(Couldn't find xml-config)
AC_MSG_ERROR(Couldn't find $LIBXML_PKG)
fi
XML_LIBS="`xml-config --libs`"
XML_CFLAGS="`xml-config --cflags`"
@ -411,7 +458,7 @@ dnl *** Hermes ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBHERMES, true)
GST_CHECK_FEATURE(LIBHERMES, [Hermes library], colorspace, [
GST_CHECK_LIBHEADER(LIBHERMES, Hermes, Hermes_ConverterInstance, , Hermes/Hermes.h, LIBHERMES_LIBS="-lHermes")
])
], AC_SUBST(LIBHERMES_LIBS))
dnl *** lame ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBLAME, true)
@ -519,6 +566,7 @@ else
dnl Check for libgnome
GST_CHECK_CONFIGPROG(GNOME, gnome-config, gnome gnomeui)
fi
AC_SUBST(HAVE_GNOME)
dnl Check for libghttp
translit(dnm, m, l) AM_CONDITIONAL(USE_LIBGHTTP, true)
@ -540,26 +588,58 @@ GST_CHECK_FEATURE(LIBGHTTP, [libghttp plugins], gsthttpsrc, [
])
dnl thomas : adding an arts check taken from xine with it's own .m4
AM_PATH_ARTS(, HAVE_ARTS=yes, HAVE_ARTS=no)
dnl also define ARTS_MCOPFLAGS
ARTS_MCOPFLAGS="$ARTS_CFLAGS"
AC_SUBST(ARTS_MCOPFLAGS)
dnl Check for libglade with gnome support; no libglade for glib2.0
HAVE_LIBGLADE_GNOME="no"
if test x$USE_GLIB2 = xyes; then
AC_MSG_WARN(libglade disabled for glib2.0)
PKG_CHECK_MODULES(LIBGLADE_GNOME, libglade-2.0 libgnomeui-2.0, HAVE_LIBGLADE_GNOME=yes, HAVE_LIBGLADE_GNOME=no)
if test x$HAVE_LIBGLADE_GNOME = xno; then
AC_MSG_WARN(Couldn't find libglade-2.0 - Can't build gstplay)
LIBGLADE_GNOME_LIBS=
LIBGLADE_GNOME_CFLAGS=
fi;
else
AM_PATH_LIBGLADE(HAVE_LIBGLADE_GNOME=yes, , gnome)
AM_PATH_LIBGLADE(HAVE_LIBGLADE_GNOME="yes", HAVE_LIBGLADE_GNOME="no", gnome)
if test x$HAVE_LIBGLADE_GNOME = xno; then
AC_MSG_WARN(Couldn't find libglade-config - Can't build gstplay)
else
LIBGLADE_GNOME_LIBS=$LIBGLADE_LIBS
LIBGLADE_GNOME_CFLAGS=$LIBGLADE_CFLAGS
AC_TRY_LINK([#include <glade/glade.h>],[glade_gnome_init();],
HAVE_LIBGLADE_GNOME="yes"
AC_MSG_WARN(
[Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor])
)
fi
fi
AC_SUBST(HAVE_LIBGLADE_GNOME)
AC_SUBST(LIBGLADE_GNOME_LIBS)
AC_SUBST(LIBGLADE_GNOME_CFLAGS)
dnl Check for Avifile
HAVE_AVIFILE="no"
AC_MSG_CHECKING(for Avifile)
if avifile-config --libs > /dev/null 2>&1; then
HAVE_AVIFILE="yes"
AC_MSG_RESULT(found)
else
AC_MSG_WARN(Did not find Avifile installed)
fi
if test "x$HAVE_LIBGLADE_GNOME" = "xno"; then
AC_MSG_WARN(
[Couldn't find gnome libraries for libglade - Can't build gstmediaplay and gsteditor]
)
else
dnl found libglade with gnome support
dnl save flags - it is needed only for editor and player
LIBGLADE_GNOME_LIBS="$LIBGLADE_LIBS"
LIBGLADE_GNOME_CFLAGS="$LIBGLADE_CFLAGS"
AC_SUBST(LIBGLADE_GNOME_LIBS)
AC_SUBST(LIBGLADE_GNOME_CFLAGS)
fi
AVIFILE_LIBS="`avifile-config --libs`"
AVIFILE_CFLAGS="`avifile-config --cflags`"
AC_SUBST(AVIFILE_LIBS)
AC_SUBST(AVIFILE_CFLAGS)
dnl HAVE_AVIFILE is needed in a Makefile.am
AC_SUBST(HAVE_AVIFILE)
dnl Check for atomic.h
dnl Note: use AC_CHECK_HEADER not AC_CHECK_HEADERS, because the latter
@ -629,15 +709,17 @@ AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
dnl Check for sidplay
AC_PATH_LIBSIDPLAY
dnl Check for librtp
nl Check for librtp
AC_MSG_CHECKING(rtp library)
AC_CHECK_LIB(rtp, rtp_packet_new_take_data, HAVE_LIBRTP=yes, HAVE_LIBRTP=no, $GLIB_LIBS $GLIB_CFLAGS)
AC_CHECK_HEADER(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
AC_CHECK_HEADER(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
AC_CHECK_HEADER(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
dnl FIXME header check needs to use GLIB_CFLAGS in order to succeed for rtp
dnl AC_CHECK_HEADERS(rtp/rtp.h, HAVE_LIBRTP=yes, HAVE_LIBRTP=no)
dnl AC_CHECK_HEADERS(rtp/rtp-packet.h, :, HAVE_LIBRTP=no)
dnl AC_CHECK_HEADERS(rtp/rtcp-packet.h, :, HAVE_LIBRTP=no)
dnl AC_CHECK_HEADERS(rtp/rtp-audio.h, :, HAVE_LIBRTP=no)
dnl Check for linux/cdrom.h
nl Check for linux/cdrom.h
AC_CHECK_HEADER(linux/cdrom.h,
HAVE_LINUX_CDROM=yes, HAVE_LINUX_CDROM=no
)
@ -763,7 +845,7 @@ esac],
AC_ARG_ENABLE(docs-build,
[ --enable-docs-build enable building of documentation],
[case "${enableval}" in
yes) BUILD_DOCS=yes ;;
yes) if $HAVE_GTK_DOC; then BUILD_DOCS=yes; else AC_MSG_ERROR([you don't have gtk-doc, so don't use --docs-build]); fi; ;;
no) BUILD_DOCS=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-docs-build) ;;
esac],
@ -978,11 +1060,11 @@ AM_CONDITIONAL(BUILD_DOCS, test "x$BUILD_DOCS" = "xyes")
AM_CONDITIONAL(BUILD_TESTS, test "x$BUILD_TESTS" = "xyes")
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
AM_CONDITIONAL(BUILD_PLUGIN_DOCS, test "x$BUILD_PLUGIN_DOCS" = "xyes")
AM_CONDITIONAL(HAVE_DB2HTML, $HAVE_DB2HTML)
AM_CONDITIONAL(HAVE_DB2PS, $HAVE_DB2PS)
AM_CONDITIONAL(HAVE_PS2PDF, $HAVE_PS2PDF)
AM_CONDITIONAL(HAVE_PDFXMLTEX, $HAVE_PDFXMLTEX)
AM_CONDITIONAL(HAVE_PDFTOPS, $HAVE_PDFTOPS)
AM_CONDITIONAL(HAVE_XSLTPROC, $HAVE_XSLTPROC)
AM_CONDITIONAL(HAVE_FIG2DEV_PNG, $HAVE_FIG2DEV_PNG)
AM_CONDITIONAL(HAVE_FIG2DEV_EPS, $HAVE_FIG2DEV_EPS)
AM_CONDITIONAL(HAVE_FIG2DEV_PDF, $HAVE_FIG2DEV_PDF)
AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
@ -996,6 +1078,7 @@ dnl thomas: the next line doesn't give errors
AM_CONDITIONAL(HAVE_FLACLIB, test "x$HAVE_FLACLIB" = "xyes")
AM_CONDITIONAL(HAVE_LIBRTP, test "x$HAVE_LIBRTP" = "xyes")
AM_CONDITIONAL(HAVE_ARTS, test "x$HAVE_ARTS" = "xyes")
AM_CONDITIONAL(HAVE_XMMS, test "x$HAVE_XMMS" = "xyes")
AM_CONDITIONAL(HAVE_RAW1394, test "x$HAVE_RAW1394" = "xyes")
AM_CONDITIONAL(HAVE_LIBDV, test "x$HAVE_LIBDV" = "xyes")
AM_CONDITIONAL(HAVE_AALIB, test "x$HAVE_AALIB" = "xyes")
@ -1132,9 +1215,7 @@ plugins/mpeg2/videoparse/Makefile
plugins/mpeg2/mpegtypes/Makefile
plugins/mpeg1/Makefile
plugins/mpeg1/mpegtypes/Makefile
plugins/mpeg1/mpeg_play/Makefile
plugins/mpeg1/mpegaudio/Makefile
plugins/mpeg1/parse/Makefile
plugins/mpeg1/system_encode/Makefile
plugins/mpeg1/mpeg1encoder/Makefile
plugins/mpeg1video/Makefile

5
debian/Makefile.am vendored
View file

@ -21,6 +21,7 @@ EXTRA_DIST = \
gstreamer-colorspace.files \
gstreamer-common.files \
gstreamer-doc.files \
gstreamer-dvd.files \
gstreamer-elements.files \
gstreamer-esd.files \
gstreamer-festival.files \
@ -40,15 +41,15 @@ EXTRA_DIST = \
gstreamer-runtime.manpages \
gstreamer-runtime.postinst \
gstreamer-runtime.postrm \
gstreamer-sid.files \
gstreamer-sdl.files \
gstreamer-sid.files \
gstreamer-tools.files \
gstreamer-tools.manpages \
gstreamer-vorbis.files \
gstreamer-x.files \
libgst-dev.files \
libgst-dev.manpages \
libgst0.files \
libgst1.files \
libgsteditor-dev.files \
libgsteditor0.files \
libgstmediaplay-dev.files \

View file

@ -6,7 +6,7 @@ More information can be found at http://gstreamer.net/
GStreamer is split into a number of base packages:
libgst0 shared core libs
libgst1 shared core libs
libgst-dev development libs and headers
gstreamer-runtime tools required by the libs (gstreamer-register)
gstreamer-doc documentation
@ -28,6 +28,7 @@ optional plugins:
gstreamer-avifile
gstreamer-cdparanoia
gstreamer-colorspace
gstreamer-dvd
gstreamer-esd
gstreamer-festival
gstreamer-flac

11
debian/changelog vendored
View file

@ -1,10 +1,13 @@
gstreamer (0.2.1.20010907-1) unstable; urgency=low
gstreamer (0.3.0-1) unstable; urgency=low
* Sync to latest CVS
* Added plugin packages: -a52dec, -mikmod, -sid
* New upstream release (lots of changes)
* Update Build-Depends versions as needed
* Added plugin packages: -a52dec, -dvd, -mikmod, -sid
* Added speed and qcam to -common
* Added gstreamer-guilaunch to gstreamer-tools package
* Added dependencies on unofficial LAME packages
-- David I. Lehn <dlehn@vt.edu> Fri, 7 Sep 2001 03:33:43 -0400
-- David I. Lehn <dlehn@vt.edu> Tue, 11 Dec 2001 21:27:22 -0500
gstreamer (0.2.1-4) unstable; urgency=low

30
debian/control vendored
View file

@ -2,12 +2,12 @@ Source: gstreamer
Section: x11
Priority: optional
Maintainer: David I. Lehn <dlehn@vt.edu>
Build-Depends: debhelper (>= 3.0.0), libxml-dev (>= 1.8.10), zlib1g-dev (>= 1:1.1.3), libghttp-dev (>= 1.0.6), libglib1.2-dev (>= 1.2.8), libgtk1.2-dev (>= 1.2.8), libglade0-dev (>= 0.14), libglade-gnome0-dev (>= 0.14), libesd0-dev (>= 0.2.22), libcdparanoia0-dev (>= 3a9.7), libvorbis-dev (>= 1.0beta3), libgnome-dev (>= 1.2.11), libasound1-dev (>= 0.5.10) | libasound2-dev (>= 0.9), libghttp-dev (>= 1.0.9), libjpeg62-dev (>= 6b), aalib1-dev (>= 1.4p4), libmad0-dev (>= 0.13.0b), hermes1-dev (>= 1.3.1), libarts-dev (>= 2.1.2), libgsm1-dev (>= 1.0.10), libgnome-vfs-dev (>= 1.0.1), libsdl1.2-dev (>= 1.2.1), libaudiofile-dev (>= 0.2.1), libavifile0.6-dev (>= 0.6.0.20010810), festival-dev (>= 1.4.1p), libflac-dev (>= 1.0-2), libmpeg2-dev (>= 0.2.0), libmpeg2dec-dev (>= 0.2.0), pkg-config (>= 0.7.0), libsidplay1-dev (>= 1.36.47), libmikmod2-dev (>= 3.1.9), liba52-dev (>= 0.7.1)
Build-Depends-Indep: debhelper (>= 3.0.0), gtk-doc-tools (>= 0.4), jade (>= 1.2.1), transfig (>= 3.2.3.c), cygnus-stylesheets (>= 0.10.2-12)
Build-Depends: debhelper (>= 3.0.0), xlibs-dev (>= 4.1.0), xlibs-pic (>= 4.1.0), libxml-dev (>= 1.8.10), zlib1g-dev (>= 1:1.1.3), libghttp-dev (>= 1.0.6), libglib1.2-dev (>= 1.2.8), libgtk1.2-dev (>= 1.2.8), libglade0-dev (>= 0.14), libglade-gnome0-dev (>= 0.14), libesd0-dev (>= 0.2.22), libcdparanoia0-dev (>= 3a9.7), libvorbis-dev (>= 1.0rc2), libgnome-dev (>= 1.2.11), libasound1-dev (>= 0.5.10) | libasound2-dev (>= 0.9), libghttp-dev (>= 1.0.9), libjpeg62-dev (>= 6b), aalib1-dev (>= 1.4p4), libmad0-dev (>= 0.14.1b), hermes1-dev (>= 1.3.1), libarts-dev (>= 2.1.2), libgsm1-dev (>= 1.0.10), libgnome-vfs-dev (>= 1.0.3), libsdl1.2-dev (>= 1.2.2), libaudiofile-dev (>= 0.2.1), libavifile0.6-dev (>= 0.6.0.20011207), festival-dev (>= 1.4.1p), libflac-dev (>= 1.0.2), libmpeg2-0-dev (>= 0.2.0), libmpeg2dec0-dev (>= 0.2.0), pkg-config (>= 0.8.0), libsidplay1-dev (>= 1.36.47), libmikmod2-dev (>= 3.1.9), liba52-dev (>= 0.7.1), libdvdread2 (>= 0.9.1), lame-dev (>= 3.89), liblame0 (>= 3.89)
Build-Depends-Indep: debhelper (>= 3.0.0), gtk-doc-tools (>= 0.4), jade (>= 1.2.1), transfig (>= 3.2.3.c), docbook-utils (>= 0.6.9)
Standards-Version: 3.5.6
Package: libgst0
Architecture: [alpha arm i386 powerpc sparc]
Package: libgst1
Architecture: [alpha arm hppa i386 mips powerpc sparc]
Section: libs
Depends: ${shlibs:Depends}
Suggests: gstreamer-elements, gstreamer-common
@ -17,7 +17,7 @@ Description: Core GStreamer shared library
Package: libgst-dev
Architecture: any
Section: devel
Depends: libgst0 (= ${Source-Version}), libc6-dev, pkg-config
Depends: libgst1 (= ${Source-Version}), libc6-dev, pkg-config
Recommends: gstreamer-doc (= ${Source-Version})
Description: GStreamer development libraries and headers
GStreamer development libraries and headers
@ -97,12 +97,12 @@ Description: GStreamer editor
Package: gstreamer-all-plugins
Architecture: any
Section: libs
Depends: gstreamer-a52dec, gstreamer-aa, gstreamer-alsa, gstreamer-arts, gstreamer-artsd, gstreamer-audiofile, gstreamer-avifile, gstreamer-cdparanoia, gstreamer-colorspace, gstreamer-common, gstreamer-elements, gstreamer-esd, gstreamer-festival, gstreamer-flac, gstreamer-gnomevfs, gstreamer-gsm, gstreamer-jpeg, gstreamer-lame, gstreamer-mad, gstreamer-mikmod, gstreamer-mpeg2dec, gstreamer-mpg123, gstreamer-oss, gstreamer-sdl, gstreamer-sid, gstreamer-vorbis, gstreamer-x
Depends: gstreamer-a52dec, gstreamer-aa, gstreamer-alsa, gstreamer-arts, gstreamer-artsd, gstreamer-audiofile, gstreamer-avifile, gstreamer-cdparanoia, gstreamer-colorspace, gstreamer-common, gstreamer-dvd, gstreamer-elements, gstreamer-esd, gstreamer-festival, gstreamer-flac, gstreamer-gnomevfs, gstreamer-gsm, gstreamer-jpeg, gstreamer-lame, gstreamer-mad, gstreamer-mikmod, gstreamer-mpeg2dec, gstreamer-mpg123, gstreamer-oss, gstreamer-sdl, gstreamer-sid, gstreamer-vorbis, gstreamer-x
Description: Pseudo package for all GStreamer plugins
Pseudo package which depends on all current GStreamer plugin
packages.
.
WARNING: This package depends on many other packages.
NOTE: This package depends on many other packages.
Package: gstreamer-a52dec
Architecture: any
@ -191,6 +191,13 @@ Description: Collection of GStreamer plugins
.
These plugins have no special dependencies.
Package: gstreamer-dvd
Architecture: any
Section: libs
Depends: ${shlibs:Depends}, gstreamer-runtime (= ${Source-Version})
Description: DVD plugin for GStreamer
DVD plugin for GStreamer based on libdvdread.
Package: gstreamer-elements
Architecture: any
Section: libs
@ -250,6 +257,11 @@ Section: libs
Depends: ${shlibs:Depends}, gstreamer-runtime (= ${Source-Version})
Description: LAME plugin for GStreamer
LAME plugin for GStreamer
.
http://www.mp3dev.org/
.
Debian packages can be found at:
http://www.mayin.org/~gandalf/downloads/
Package: gstreamer-mad
Architecture: any
@ -257,6 +269,8 @@ Section: libs
Depends: ${shlibs:Depends}, gstreamer-runtime (= ${Source-Version})
Description: MAD MPEG audio decoder plugin for GStreamer
MAD MPEG audio decoder plugin for GStreamer
.
http://www.mars.org/home/rob/proj/mpeg/
Package: gstreamer-mikmod
Architecture: any
@ -285,6 +299,8 @@ Section: libs
Depends: ${shlibs:Depends}, gstreamer-runtime (= ${Source-Version})
Description: mpg123 plugin for GStreamer
mpg123 plugin for GStreamer
.
http://www.mpg123.de/
Package: gstreamer-oss
Architecture: any

View file

@ -12,7 +12,6 @@ usr/lib/gst/libavitypes.*
usr/lib/gst/libchart.*
usr/lib/gst/libcutter.*
usr/lib/gst/libdeinterlace.*
usr/lib/gst/libdvdsrc.*
usr/lib/gst/libflxdec.*
usr/lib/gst/libgstaudio.*
usr/lib/gst/libgstautoplugcache.*

1
debian/gstreamer-dvd.files vendored Normal file
View file

@ -0,0 +1 @@
usr/lib/gst/libdvdsrc.*

View file

@ -1,3 +1,4 @@
usr/bin/gstreamer-complete
usr/bin/gstreamer-guilaunch
usr/bin/gstreamer-inspect
usr/bin/gstreamer-launch
usr/bin/gstreamer-complete

View file

@ -1,3 +1,4 @@
debian/gstreamer/usr/share/man/man1/gstreamer-complete.1
debian/gstreamer/usr/share/man/man1/gstreamer-guilaunch.1
debian/gstreamer/usr/share/man/man1/gstreamer-inspect.1
debian/gstreamer/usr/share/man/man1/gstreamer-launch.1

10
debian/rules vendored
View file

@ -16,7 +16,7 @@ export DH_OPTIONS
# Link special names to a template file.
# still need "*.files" to be done by hand
PLUGINS=a52dec aa alsa arts artsd audiofile avifile cdparanoia colorspace common elements esd festival flac gnomevfs gsm jpeg lame mad mikmod mpeg2dec mpg123 oss sdl sid vorbis x
PLUGINS=a52dec aa alsa arts artsd audiofile avifile cdparanoia colorspace common dvd elements esd festival flac gnomevfs gsm jpeg lame mad mikmod mpeg2dec mpg123 oss sdl sid vorbis x
setup-links:
for i in $(PLUGINS); do \
@ -28,12 +28,16 @@ setup-links:
) \
done
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
./configure \
--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--host=$(DEB_HOST_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
@ -160,7 +164,7 @@ binary-arch: build install setup-links
dh_makeshlibs
dh_installdeb
# dh_perl
dh_shlibdeps -l`pwd`/debian/libgst0/usr/lib:`pwd`/debian/libgstmediaplay0/usr/lib:`pwd`/debian/libgsteditor0/usr/lib
dh_shlibdeps -l`pwd`/debian/libgst1/usr/lib:`pwd`/debian/libgstmediaplay0/usr/lib:`pwd`/debian/libgsteditor0/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb

View file

@ -1,21 +1,23 @@
manualname = gst-plugin-writers-guide
htmlname = index.html
DOC=gst-plugin-writers-guide
MAIN=$(DOC).xml
XML=$(shell echo *.xml)
XSLFO=$(srcdir)/../xsl/fo.xsl
XSLFOMODS=$(srcdir)/../xsl/ulink.xsl $(srcdir)/../xsl/keycombo.xsl
XSLHTML=$(srcdir)/../xsl/html.xsl
XSLHTMLMODS=$(srcdir)/../xsl/fileext.xsl $(srcdir)/../xsl/admon.xsl \
$(srcdir)/../xsl/keycombo.xsl $(srcdir)/../xsl/css.xsl
XSLS=$(XSLFO) $(XSLFOMODS) $(XSLHTML) $(XSLHTMLMODS)
FIGS= # $(shell echo *.fig) (uncomment when pngs are added)
PNGS=$(FIGS:.fig=.png)
PDFS=$(FIGS:.fig=.pdf)
SRC=$(XML)
CSS=base.css
sgml_files = gst-plugin-writers-guide.sgml \
titlepage.sgml \
intro.sgml \
testapp.sgml \
loopbased.sgml \
buffers.sgml \
srcnsink.sgml \
statemanage.sgml \
checklist.sgml
EXTRA_DIST = $(XML) $(FIGS)
fig_files =
eps_files =
png_files =
EXTRA_DIST = $(sgml_files) $(fig_files)
## FIXME if we don't do this they don't get cleaned up in make distcheck
## but maybe this is not the best way to do it
CONFIG_CLEAN_FILES = $(XML) $(FIGS)
include $(srcdir)/../manuals.mak

0
docs/fwg/base.css Normal file
View file

View file

@ -1,20 +1,17 @@
<!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" "" [
<?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 % magic-entities SYSTEM "magic">
%magic-entities;
<!ENTITY TITLEPAGE SYSTEM "titlepage.sgml">
<!ENTITY INTRO SYSTEM "intro.sgml">
<!ENTITY TESTAPP SYSTEM "testapp.sgml">
<!ENTITY LOOPBASED SYSTEM "loopbased.sgml">
<!ENTITY BUFFERS SYSTEM "buffers.sgml">
<!ENTITY SRCNSINK SYSTEM "srcnsink.sgml">
<!ENTITY STATEMANAGE SYSTEM "statemanage.sgml">
<!ENTITY CHECKLIST SYSTEM "checklist.sgml">
<!ENTITY GStreamer "<application>GStreamer</application>">
]>

1
docs/fwg/magic-pdf Normal file
View file

@ -0,0 +1 @@
<!ENTITY magic "pdf">

1
docs/fwg/magic-png Normal file
View file

@ -0,0 +1 @@
<!ENTITY magic "png">

View file

@ -1,110 +1,151 @@
## Process this file with automake to produce Makefile.in
# The name of the module.
# The name of the module, e.g. 'glib'.
DOC_MODULE=gstreamer
# The top-level SGML file.
# The top-level SGML file. Change it if you want.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
# The directory containing the source code (if it contains documentation).
# 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)/gst
# 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_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
HTML_DIR=$(datadir)/gstreamer/html
# Extra options to supply to gtkdoc-mkdb.
MKDB_OPTIONS=
GST_LIBS += $(top_builddir)/gst/elements/libgstelements.la \
$(top_builddir)/gst/autoplug/libgststaticautoplug.la \
$(top_builddir)/gst/autoplug/libgststaticautoplugrender.la
# Extra options to supply to gtkdoc-fixref.
FIXXREF_OPTIONS=
# Used for dependencies.
# FIXME deal with the subdirs too...
HFILE_GLOB=$(DOC_SOURCE_DIR)/*.h
CFILE_GLOB=$(DOC_SOURCE_DIR)/*.c
# this is a wingo addition
SCANOBJ_DEPS = $(top_builddir)/gst/elements/libgstelements.la \
$(top_builddir)/gst/schedulers/libgstbasicscheduler.la
# Header files to ignore when scanning.
IGNORE_HFILES=
# 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_CFLAGS) $(GLIB_CFLAGS) $(XML_CFLAGS)
GTKDOC_LIBS = $(GST_LIBS) $(GLIB_LIBS) $(XML_LIBS) $(SCANOBJ_DEPS)
# $(shell echo $(top_builddir)/gst/autoplug/*.la) \
# $(top_builddir)/gst/types/libgsttypes.la \
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
###########################################################################
# Everything below here is generic and you shouldn't need to change it.
###########################################################################
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
tmpl_sources = \
tmpl/cothreads.sgml \
tmpl/gst.sgml \
tmpl/gstinfo.sgml \
tmpl/gstautoplug.sgml \
tmpl/gstscheduler.sgml \
tmpl/gstprops.sgml \
tmpl/gstcaps.sgml \
tmpl/gstbin.sgml \
tmpl/gstbuffer.sgml \
tmpl/gstbufferpool.sgml \
tmpl/gstdisksrc.sgml \
tmpl/gstelement.sgml \
tmpl/gstfakesink.sgml \
tmpl/gstfakesrc.sgml \
tmpl/gstfdsink.sgml \
tmpl/gstfdsrc.sgml \
tmpl/gsthttpsrc.sgml \
tmpl/gstidentity.sgml \
tmpl/gstlog.sgml \
tmpl/gstobject.sgml \
tmpl/gstpad.sgml \
tmpl/gstpipeline.sgml \
tmpl/gstplugin.sgml \
tmpl/gstqueue.sgml \
tmpl/gstreamer-unused.sgml \
tmpl/gstsinesrc.sgml \
tmpl/gsttee.sgml \
tmpl/gstthread.sgml \
tmpl/gsttrace.sgml \
tmpl/gsttype.sgml \
tmpl/gstutils.sgml \
tmpl/gstxml.sgml \
tmpl/spectrum.sgml
EXTRA_DIST = \
$(content_files) \
$(extra_files) \
$(HTML_IMAGES) \
$(DOC_MAIN_SGML_FILE) \
$(DOC_MODULE).types \
$(DOC_MODULE)-sections.txt
gstreamer_docdir = $(HTML_DIR)
gstreamer_doc_DATA = \
gstreamer.types \
gstreamer.hierarchy \
gstreamer-sections.txt
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
SCANOBJS_FILES = \
$(DOC_MODULE).signals \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).args
SCANOBJ_FILES = \
$(DOC_MODULE).args \
$(DOC_MODULE).hierarchy \
$(DOC_MODULE).signals
# FIXME: the dependencies here are rather broken. Really, html/book1.html
# should be rebuilt if any file in $(top_srcdir)/gst is updated.
if HAVE_GTK_DOC
html/book1.html:
$(MAKE) html
else
html/book1.html:
all-local: html-build.stamp
#### scan ####
# wingo addition
scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS)
@echo '*** Scanning header files ***'
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" $(GTK_DOC_SCANOBJ) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
else \
cd $(srcdir) ; \
for i in $(SCANOBJ_FILES) ; do \
test -f $$i || touch $$i ; \
done \
fi
cd $(srcdir) && \
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
touch scan-build.stamp
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
@true
#### templates ####
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
@echo '*** Rebuilding template files ***'
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
touch tmpl-build.stamp
tmpl.stamp: tmpl-build.stamp
@true
#### sgml ####
sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
@echo '*** Building SGML ***'
cd $(srcdir) && \
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
touch sgml-build.stamp
sgml.stamp: sgml-build.stamp
@true
#### html ####
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
@echo '*** Building HTML ***'
test -d $(srcdir)/html || mkdir $(srcdir)/html
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
@echo '-- Fixing Crossreferences'
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
touch html-build.stamp
endif
gstreamer-decl.txt:
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers=""
# The LD env-var below is a nasty hack to make this work on versions of
# gtkdoc-scanobj which don't understand libtool
scanobj: $(srcdir)/$(DOC_MODULE).types
cd ../../gst/;$(MAKE) libgst.la
cd ../../gst/elements/;$(MAKE) libgstelements.la
rm gstreamer-scan.o; ln -s gstreamer-scan.lo gstreamer-scan.o
env CC="$(LIBTOOL) $(CC)" LD="cp gstreamer-scan.lo gstreamer-scan.o;$(LIBTOOL) $(CC)" CFLAGS="$(LIBGST_CFLAGS) $(GLIB_CFLAGS) $(XML_CFLAGS) -I../../" LDFLAGS="$(GST_LIBS)"\
gtkdoc-scanobj --module=$(DOC_MODULE)
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
# FIXME: this is nasty, we shouldn't have to do this, HELP
tmpl: scanobj gstreamer-decl.txt
if test ! -e gstreamer-sections.txt; then cp $(top_srcdir)/docs/gst/gstreamer-sections.txt .; fi
gtkdoc-mktmpl --module=$(DOC_MODULE)
sgml: tmpl
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR)
html: sgml
if ! test -d html ; then mkdir html ; fi
-cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
clean-local:
rm -rf *~ *.bak *.signals *-unused.txt *.args *.o *.lo .libs sgml html
rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
maintainer-clean-local: clean
cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
# FIXME : thomas added all sgml files and some other things to make
# make distcheck work
@ -112,10 +153,10 @@ distclean-local: clean
rm -rf $(DOC_MODULE)-decl-list.txt
rm -rf gstreamer-*.txt
rm -rf tmpl/*.sgml
rm gstreamer.hierarchy
rm *.stamp
rm -f gstreamer.hierarchy
rm -f *.stamp || true
install-data-local: html/book1.html
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
(installfiles=`echo $(srcdir)/html/*.html`; \
if test "$$installfiles" = '$(srcdir)/html/*.html'; \
@ -127,12 +168,31 @@ install-data-local: html/book1.html
done; \
echo '-- Installing $(srcdir)/html/index.sgml' ; \
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
echo '-- Fixing Crossreferences' ; \
gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)|| true; \
fi)
dist-hook: html/book1.html
if ! test -d $(distdir)/tmpl ; then mkdir $(distdir)/tmpl ; fi
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
#
# Require gtk-doc when making dist
#
if HAVE_GTK_DOC
dist-check-gtkdoc:
else
dist-check-gtkdoc:
@echo "*** gtk-doc must be installed and enabled in order to make dist"
@false
endif
.PHONY : html sgml tmpl
dist-hook: dist-check-gtkdoc dist-hook-local
mkdir $(distdir)/tmpl
mkdir $(distdir)/sgml
mkdir $(distdir)/html
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
-cp $(srcdir)/sgml/*.sgml $(distdir)/sgml
-cp $(srcdir)/html/index.sgml $(distdir)/html
-cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
images=$(HTML_IMAGES) ; \
for i in $$images ; do \
cp $(srcdir)/$$i $(distdir)/html ; \
done
.PHONY : dist-hook-local

View file

@ -118,7 +118,7 @@ with some more specialized elements.</para>
&GstFakeSrc;
&GstFakeSink;
<!-- &GstFileSrc; -->
&GstFileSrc;
&GstDiskSrc;
&GstDiskSink;
@ -136,7 +136,7 @@ with some more specialized elements.</para>
</chapter>
<chapter id="autopluggers">
<title>GStreamer Autoppluggers</title>
<title>GStreamer Autopluggers</title>
<para>the autopluggers provide a way to automatically construct elements based on
sink and src capabilities</para>

View file

@ -1180,21 +1180,14 @@ GST_IS_AGGREGATOR_CLASS
<FILE>gstfilesrc</FILE>
<TITLE>GstFileSrc</TITLE>
<SUBSECTION Standard>
</SECTION>
<SECTION>
<FILE>gstdisksrc</FILE>
<TITLE>GstDiskSrc</TITLE>
GstDiskSrcFlags
<SUBSECTION Standard>
GstDiskSrc
GstDiskSrcClass
gst_disksrc_get_type
GST_TYPE_DISKSRC
GST_DISKSRC
GST_DISKSRC_CLASS
GST_IS_DISKSRC
GST_IS_DISKSRC_CLASS
GstFileSrc
GstFileSrcClass
gst_filesrc_get_type
GST_TYPE_FILESRC
GST_FILESRC
GST_FILESRC_CLASS
GST_IS_FILESRC
GST_IS_FILESRC_CLASS
</SECTION>
<SECTION>

View file

@ -1,31 +1,4 @@
GtkObject
GtkWidget
GtkRange
GtkScrollbar
GtkVScrollbar
GtkHScrollbar
GtkScale
GtkHScale
GtkVScale
GtkContainer
GtkBin
GtkScrolledWindow
GtkButton
GtkToggleButton
GtkCheckButton
GtkRadioButton
GtkPaned
GtkVPaned
GtkHPaned
GtkBox
GtkHBox
GtkCombo
GtkCList
GtkEditable
GtkEntry
GtkSpinButton
GtkData
GtkAdjustment
GObject
GstObject
GstXml
@ -38,7 +11,6 @@ GtkObject
GstFakeSrc
GstFakeSink
GstFileSrc
GstDiskSrc
GstHttpSrc
GstFdSrc
GstFdSink

View file

@ -1,3 +1,16 @@
Thomas's new comments on the doc building :
-------------------------------------------
* originally the manual was written with DocBook 3.0 in mind, which
supported the graphic tag. That is now deprecated, so I changed it to
the new mediaobject tag set.
* eps files in images/ should be generated from the makefile. You need to
have fig2dev installed for that.
Wtay's original comments :
--------------------------
For now use:
db2html gstreamer-manual

View file

@ -1,76 +1,22 @@
manualname = gstreamer-manual
htmlname = index.html
DOC=gstreamer-manual
MAIN=$(DOC).xml
XML=$(shell echo *.xml)
XSLFO=$(srcdir)/../xsl/fo.xsl
XSLFOMODS=$(srcdir)/../xsl/ulink.xsl $(srcdir)/../xsl/keycombo.xsl
XSLHTML=$(srcdir)/../xsl/html.xsl
XSLHTMLMODS=$(srcdir)/../xsl/fileext.xsl $(srcdir)/../xsl/admon.xsl \
$(srcdir)/../xsl/keycombo.xsl $(srcdir)/../xsl/css.xsl
XSLS=$(XSLFO) $(XSLFOMODS) $(XSLHTML) $(XSLHTMLMODS)
FIGS=$(shell echo *.fig)
PNGS=$(FIGS:.fig=.png)
PDFS=$(FIGS:.fig=.pdf)
SRC=$(XML)
CSS=base.css
sgml_files = gstreamer-manual.sgml \
advanced.sgml \
autoplugging.sgml \
bins.sgml \
buffers.sgml \
components.sgml \
quotes.sgml \
pads.sgml \
connections.sgml \
cothreads.sgml \
dynamic.sgml \
elements.sgml \
factories.sgml \
goals.sgml \
helloworld.sgml \
helloworld2.sgml \
init.sgml \
intro.sgml \
motivation.sgml \
plugins.sgml \
programs.sgml \
debugging.sgml \
queues.sgml \
states.sgml \
threads.sgml \
typedetection.sgml \
utility.sgml \
xml.sgml
EXTRA_DIST = $(XML) $(FIGS)
fig_files = bin-element.fig \
bin-element-ghost.fig \
connected-elements.fig \
filter-element-multi.fig \
filter-element.fig \
hello-world.fig \
mime-world.fig \
queue.fig \
sink-element.fig \
src-element.fig \
state-diagram.fig \
thread.fig
eps_files = images/bin-element.eps \
images/bin-element-ghost.eps \
images/connected-elements.eps \
images/filter-element-multi.eps \
images/filter-element.eps \
images/hello-world.eps \
images/mime-world.eps \
images/queue.eps \
images/sink-element.eps \
images/src-element.eps \
images/state-diagram.eps \
images/thread.eps
png_files = images/bin-element.png \
images/bin-element-ghost.png \
images/connected-elements.png \
images/filter-element-multi.png \
images/filter-element.png \
images/hello-world.png \
images/mime-world.png \
images/queue.png \
images/sink-element.png \
images/src-element.png \
images/state-diagram.png \
images/thread.png
EXTRA_DIST = $(sgml_files) $(fig_files)
## FIXME if we don't do this they don't get cleaned up in make distcheck
## but maybe this is not the best way to do it
CONFIG_CLEAN_FILES = $(XML) $(FIGS)
include $(srcdir)/../manuals.mak

View file

@ -1,3 +1,16 @@
Thomas's new comments on the doc building :
-------------------------------------------
* originally the manual was written with DocBook 3.0 in mind, which
supported the graphic tag. That is now deprecated, so I changed it to
the new mediaobject tag set.
* eps files in images/ should be generated from the makefile. You need to
have fig2dev installed for that.
Wtay's original comments :
--------------------------
For now use:
db2html gstreamer-manual

View file

@ -88,7 +88,12 @@
</para>
<figure float="1" id="sec-mime-img">
<title>The Hello world pipeline with MIME types</title>
<graphic fileref="images/mime-world" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/mime-world.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
We will see how you can create an element based on the MIME types

View file

@ -46,7 +46,11 @@
</para>
<figure float="1" id="sec-threads-img">
<title>a thread</title>
<graphic fileref="images/thread" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/thread.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>

View file

@ -0,0 +1,98 @@
<chapter id="cha-debugging">
<title>Debugging</title>
<para>
GStreamer has an extensive set of debugging tools for
plugin developers.
</para>
<sect1>
<title>Command line options</title>
<para>
Applications using the GStreamer libraries accept the following set
of command line argruments to enable the debugging system.
</para>
<para>
<itemizedlist>
<listitem>
<para>
<option>--gst-debug-mask=<replaceable>mask</replaceable></option>
Sets the mask for the debugging output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-info-mask=<replaceable>mask</replaceable></option>
Sets the mask for the info output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-mask=<replaceable>mask</replaceable></option>
Sets the mask for the info *and* the debug output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-plugin-spew</option>
Enable printout of errors while loading GST plugins.
</para>
</listitem>
<listitem>
<para>
<option>--gst-plugin-path=<replaceable>PATH</replaceable></option>
Add a directory to the plugin search path.
</para>
</listitem>
<listitem>
<para>
<option>--help</option> Print the a short desciption of the
options and an overview of the current debugging/info masks
set.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The follwing table gives an overview of the mask values and
their meaning. (enabled) means that the corresponding flag
has been set.
</para>
<programlisting>
Mask (to be OR'ed) info/debug FLAGS
--------------------------------------------------------
0x00000001 (enabled)/ GST_INIT
0x00000002 / COTHREADS
0x00000004 / COTHREAD_SWITCH
0x00000008 / AUTOPLUG
0x00000010 / AUTOPLUG_ATTEMPT
0x00000020 / PARENTAGE
0x00000040 / STATES
0x00000080 / PLANING
0x00000100 / SCHEDULING
0x00000200 / OPERATION
0x00000400 / BUFFER
0x00000800 / CAPS
0x00001000 / CLOCK
0x00002000 / ELEMENT_PADS
0x00004000 / ELEMENTFACTORY
0x00008000 / PADS
0x00010000 / PIPELINE
0x00020000 / PLUGIN_LOADING
0x00040000 / PLUGIN_ERRORS
0x00080000 / PLUGIN_INFO
0x00100000 / PROPERTIES
0x00200000 / THREAD
0x00400000 / TYPES
0x00800000 / XML
0x01000000 / NEGOTIATION
0x02000000 / REFCOUNTING
</programlisting>
</sect1>
<sect1>
<title>Adding a custom debug handler</title>
<para>
</para>
</sect1>
</chapter>

0
docs/manual/base.css Normal file
View file

View file

@ -18,7 +18,11 @@
<figure float="1" id="sec-bin-img">
<title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title>
<graphic fileref="images/bin-element" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/bin-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
@ -170,7 +174,11 @@
<figure float="1" id="sec-bin-ghost-img">
<title>Visualisation of a <classname>GstBin</classname> element with a ghostpad</title>
<graphic fileref="images/bin-element-ghost" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/bin-element-ghost.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
Above is a representation of a ghostpad. the sinkpad of element one is now also a pad

View file

@ -34,7 +34,11 @@
</para>
<figure float="1" id="sec-element-srcimg">
<title>Visualisation of a source element</title>
<graphic fileref="images/src-element" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/src-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
Source elements do not accept data, they only generate data. You can see
@ -59,7 +63,11 @@
</para>
<figure float="1" id="sec-element-filterimg">
<title>Visualisation of a filter element</title>
<graphic fileref="images/filter-element" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/filter-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
The above figure shows the visualisation of a filter element. This element has
@ -69,7 +77,11 @@
<figure float="1" id="sec-element-multifilterimg">
<title>Visualisation of a filter element with
more than one output pad</title>
<graphic fileref="images/filter-element-multi" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/filter-element-multi.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
The above figure shows the visualisation of a filter element with more than one
@ -89,7 +101,11 @@
</para>
<figure float="1" id="sec-element-sinkimg">
<title>Visualisation of a sink element</title>
<graphic fileref="images/sink-element" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/sink-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
</sect2>
</sect1>

View file

@ -201,7 +201,12 @@ main (int argc, char *argv[])
</para>
<figure float="1" id="sec-hello-img">
<title>The Hello world pipeline</title>
<graphic fileref="images/hello-world" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/hello-world.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>

218
docs/manual/bins.xml Normal file
View file

@ -0,0 +1,218 @@
<chapter id="cha-bins">
<title>Bins</title>
<para>
A Bin is a container element. You can add elements to a bin. Since a bin is
an <classname>GstElement</classname> itself, it can also be added to another bin.
</para>
<para>
Bins allow you to combine connected elements into one logical element. You do
not deal with the individual elements anymore but with just one element, the bin.
We will see that this is extremely powerfull when you are going to construct
complex pipelines since it allows you to break up the pipeline in smaller chunks.
</para>
<para>
The bin will also manage the elements contained in it. It will figure out how
the data will flow in the bin and generate an optimal plan for that data flow. Plan
generation is one of the most complicated procedures in GStreamer.
</para>
<figure float="1" id="sec-bin-img">
<title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/bin-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
There are two standard bins available to the GStreamer programmer:
<itemizedlist>
<listitem>
<para>
A pipeline (<classname>GstPipeline</classname>). Which is a generic container you will
use most of the time. The toplevel bin has to be a pipeline.
</para>
</listitem>
<listitem>
<para>
A thread (<classname>GstThread</classname>). All the elements in the thread bin will
run in a separate thread. You will have to use this bin if you carfully have to
synchronize audio and video for example. You will learn more about threads in.. <!-- FIXME -->
</para>
</listitem>
</itemizedlist>
</para>
<sect1 id="sec-bin-create">
<title>Creating a bin</title>
<para>
You create a bin with a specified name 'mybin' with:
</para>
<programlisting>
GstElement *bin;
gst_bin_new ("mybin");
...
</programlisting>
<para>
A thread can be created with:
</para>
<programlisting>
GstElement *thread;
gst_thread_new ("mythread");
...
</programlisting>
<para>
Pipelines are created with gst_pipeline_new ("name");
</para>
</sect1>
<sect1 id="sec-bin-adding">
<title>Adding elements to a bin</title>
<para>
Elements are added to a bin with the following code sample:
</para>
<programlisting>
GstElement *element;
GstElement *bin;
bin = gst_bin_new ("mybin");
element = gst_elementfactory_make ("mpg123", "decoder");
gst_bin_add (GST_BIN (bin), element);
...
</programlisting>
<para>
Bins and threads can be added to other bins too. This allows you to create nested
bins.
</para>
<para>
To get an element from the bin you can use:
</para>
<programlisting>
GstElement *element;
element = gst_bin_get_by_name (GST_BIN (bin), "decoder");
...
</programlisting>
<para>
You can see that the name of the element becomes very handy for retrieving the
element from an bin by using the elements name. gst_bin_get_by_name () will
recursively search nested bins.
</para>
<para>
To get a list of elements in a bin, use:
</para>
<programlisting>
GList *elements;
elements = gst_bin_get_list (GST_BIN (bin));
while (elements) {
GstElement *element = GST_ELEMENT (elements-&gt;data);
g_print ("element in bin: &percnt;s\n", gst_element_get_name (element));
elements = g_list_next (elements);
}
...
</programlisting>
<para>
To remove an element from a bin use:
</para>
<programlisting>
GstElement *element;
gst_bin_remove (GST_BIN (bin), element);
...
</programlisting>
</sect1>
<sect1 id="sec-bin-custom">
<title>Custom bins</title>
<para>
The application programmer can create custom bins packed with elements to perform a
specific task. This allow you to write an MPEG audio decoder with just the follwing lines
of code:
<programlisting>
// create the mp3player element
GstElement *mp3player = gst_elementfactory_make ("mp3player", "mp3player");
// set the source mp3 audio file
g_object_set (G_OBJECT (mp3player), "location", "helloworld.mp3", NULL);
// start playback
gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_PLAYING);
...
// pause playback
gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_PAUSED);
...
// stop
gst_element_set_state (GST_ELEMENT (mp3player), GST_STATE_NULL);
</programlisting>
Custom bins can be created with a plugin or an XML description. You will find more
information about creating custom bin in the Filter-Writers-Guide.
</para>
</sect1>
<sect1 id="sec-bin-ghostpads">
<title>Ghostpads</title>
<para>
You can see from figure ... how a bin has no pads of its own. This is where Ghostpads
come into play.
</para>
<para>
A ghostpad is a pad from some element in the bin that has been promoted to the bin.
This way, the bin also has a pad. The bin becomes just another element with a pad and
you can then use the bin just like any other element. This is a very important feature
for creating custom bins.
</para>
<figure float="1" id="sec-bin-ghost-img">
<title>Visualisation of a <classname>GstBin</classname> element with a ghostpad</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/bin-element-ghost.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
Above is a representation of a ghostpad. the sinkpad of element one is now also a pad
of the bin.
</para>
<para>
Ghostpads can actually be added to all <classname>GstElement</classname>s and not just
<classname>GstBin</classname>s. Use the following code example to add a ghostpad to a bin:
</para>
<programlisting>
GstElement *bin;
GstElement *element;
element = gst_elementfactory_create ("mpg123", "decoder");
bin = gst_bin_new ("mybin");
gst_bin_add (GST_BIN (bin), element);
gst_element_add_ghost_pad (bin, gst_element_get_pad (element, "sink"), "sink");
</programlisting>
<para>
In the above example, the bin now also has a pad: the pad called 'sink' of the
given element. We can now, for example, connect the srcpad of a disksrc to the
bin with:
</para>
<programlisting>
GstElement *disksrc;
disksrc = gst_elementfactory_create ("disksrc", "disk_reader");
gst_element_connect (disksrc, "src", bin, "sink");
...
</programlisting>
</sect1>
</chapter>

59
docs/manual/buffers.xml Normal file
View file

@ -0,0 +1,59 @@
<chapter id="cha-buffers">
<title>Buffers</title>
<para>
Buffers contain the data that will flow through the pipeline you have created. A source
element will typically create a new buffer and pass it through the pad to the next
element in the chain.
When using the GStreamer infrastructure to create a media pipeline you will not have
to deal with buffers yourself; the elements will do that for you.
</para>
<para>
The most important information in the buffer is:
<itemizedlist>
<listitem>
<para>
A pointer to a piece of memory.
</para>
</listitem>
<listitem>
<para>
The size of the memory.
</para>
</listitem>
<listitem>
<para>
A refcount that indicates how many elements are using this buffer. This refcount
will be used to destroy the buffer when no element is having a reference to it.
</para>
</listitem>
</itemizedlist>
</para>
<para>
GStreamer provides functions to create custom buffer create/destroy algorithms, called
a <classname>GstBufferPool</classname>. This makes it possible to efficiently
allocate and destroy buffer memory. It also makes it possible to exchange memory between
elements by passing the <classname>GstBufferPool</classname>. A video element can,
for example, create a custom buffer allocation algorithm that creates buffers with XSHM
as the buffer memory. An element can use this algorithm to create and fill the buffer
with data.
</para>
<para>
The simple case is that a buffer is created, memory allocated, data put
in it, and passed to the next filter. That filter reads the data, does
something (like creating a new buffer and decoding into it), and
unreferences the buffer. This causes the data to be freed and the buffer
to be destroyed. A typical MPEG audio decoder works like this.
</para>
<para>
A more complex case is when the filter modifies the data in place. It
does so and simply passes on the buffer to the next element. This is just
as easy to deal with. An element that works in place has to be carefull when
the buffer is used in more than one element; a copy on write has to made in this
situation.
</para>
</chapter>

View file

@ -7,7 +7,11 @@
<figure float="1" id="sec-connection">
<title>Visualisation of three connected elements</title>
<graphic fileref="images/connected-elements" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/connected-elements.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
By connecting these three elements, we have created a very simple pipeline. The effect

98
docs/manual/debugging.xml Normal file
View file

@ -0,0 +1,98 @@
<chapter id="cha-debugging">
<title>Debugging</title>
<para>
GStreamer has an extensive set of debugging tools for
plugin developers.
</para>
<sect1>
<title>Command line options</title>
<para>
Applications using the GStreamer libraries accept the following set
of command line argruments to enable the debugging system.
</para>
<para>
<itemizedlist>
<listitem>
<para>
<option>--gst-debug-mask=<replaceable>mask</replaceable></option>
Sets the mask for the debugging output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-info-mask=<replaceable>mask</replaceable></option>
Sets the mask for the info output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-mask=<replaceable>mask</replaceable></option>
Sets the mask for the info *and* the debug output.
</para>
</listitem>
<listitem>
<para>
<option>--gst-plugin-spew</option>
Enable printout of errors while loading GST plugins.
</para>
</listitem>
<listitem>
<para>
<option>--gst-plugin-path=<replaceable>PATH</replaceable></option>
Add a directory to the plugin search path.
</para>
</listitem>
<listitem>
<para>
<option>--help</option> Print the a short desciption of the
options and an overview of the current debugging/info masks
set.
</para>
</listitem>
</itemizedlist>
</para>
<para>
The follwing table gives an overview of the mask values and
their meaning. (enabled) means that the corresponding flag
has been set.
</para>
<programlisting>
Mask (to be OR'ed) info/debug FLAGS
--------------------------------------------------------
0x00000001 (enabled)/ GST_INIT
0x00000002 / COTHREADS
0x00000004 / COTHREAD_SWITCH
0x00000008 / AUTOPLUG
0x00000010 / AUTOPLUG_ATTEMPT
0x00000020 / PARENTAGE
0x00000040 / STATES
0x00000080 / PLANING
0x00000100 / SCHEDULING
0x00000200 / OPERATION
0x00000400 / BUFFER
0x00000800 / CAPS
0x00001000 / CLOCK
0x00002000 / ELEMENT_PADS
0x00004000 / ELEMENTFACTORY
0x00008000 / PADS
0x00010000 / PIPELINE
0x00020000 / PLUGIN_LOADING
0x00040000 / PLUGIN_ERRORS
0x00080000 / PLUGIN_INFO
0x00100000 / PROPERTIES
0x00200000 / THREAD
0x00400000 / TYPES
0x00800000 / XML
0x01000000 / NEGOTIATION
0x02000000 / REFCOUNTING
</programlisting>
</sect1>
<sect1>
<title>Adding a custom debug handler</title>
<para>
</para>
</sect1>
</chapter>

161
docs/manual/elements.xml Normal file
View file

@ -0,0 +1,161 @@
<chapter id="cha-elements">
<title>GstElement</title>
<para>
The most important object in <application>GStreamer</application> for the
application programmer is the <classname>GstElement</classname> object.
</para>
<sect1 id="sec-elements-design">
<title>What is a GstElement</title>
<para>
The GstElement is the basic building block for the media pipeline. All the
different components you are going to use are derived from this GstElement.
This means that a lot of functions you are going to use operate on this object.
</para>
<para>
You will see that those elements have pads. These are the elements
connections with the 'outside' world. Depending on the number and direction of
the pads, we can see three types of elements: source, filter and sink element.
</para>
<para>
These three types are all the same GstElement object, they just differ in how
the pads are.
</para>
<sect2 id="sec-elements-src">
<title>GStreamer source elements</title>
<para>
This element will generate data that will be used by the pipeline. It is
typically a file or an audio source.
</para>
<para>
Below you see how we will visualize the element.
We always draw a src pad to the right of the element.
</para>
<figure float="1" id="sec-element-srcimg">
<title>Visualisation of a source element</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/src-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
Source elements do not accept data, they only generate data. You can see
this in the figure because it only has a src pad. A src pad can only
generate buffers.
</para>
</sect2>
<sect2 id="sec-elements-filter">
<title>GStreamer filter elements</title>
<para>
Filter elements both have an input and an output pad. They operate on data
they receive in the sink pad and send the result to the src pad.
</para>
<para>
Examples of a filter element might include: an MPEG decoder, volume filter,...
</para>
<para>
Filters may also contain any number of input pads and output pads. For example,
a video mixer might have to input pads (the images of the two different video
streams) and one output pad.
</para>
<figure float="1" id="sec-element-filterimg">
<title>Visualisation of a filter element</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/filter-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
The above figure shows the visualisation of a filter element. This element has
one sink pad (input) and one src (output) pad. Sink pads are drawn on the left
of the element.
</para>
<figure float="1" id="sec-element-multifilterimg">
<title>Visualisation of a filter element with
more than one output pad</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/filter-element-multi.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
The above figure shows the visualisation of a filter element with more than one
output pad. An example of such a filter is the AVI splitter. This element will
parse the input data and extracts the audio and video data. Most of these filters
dynamically send out a signal when a new pad is created so that the application
programmer can connect an arbitrary element to the newly created pad.
</para>
</sect2>
<sect2 id="sec-elements-sink">
<title>GStreamer sink elements</title>
<para>
This element accepts data but will not generate any new data. A sink element
is typically a file on disk, a soundcard, a display,... It is presented as
below:
</para>
<figure float="1" id="sec-element-sinkimg">
<title>Visualisation of a sink element</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/sink-element.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
</sect2>
</sect1>
<sect1 id="sec-elements-create">
<title>Creating a GstElement</title>
<para>
GstElements are created from factories. To create an element, one has to get
access the a <classname>GstElementFactory</classname> using a unique factoryname.
</para>
<para>
The following code example is used to get a factory that can be used to create the
mpg123 element, an mp3 decoder.
</para>
<programlisting>
GstElementFactory *factory;
factory = gst_elementfactory_find ("mpg123");
</programlisting>
<para>
Once you have the handle to the elementfactory, you can create a real element with
the following code fragment:
</para>
<programlisting>
GstElement *element;
element = gst_elementfactory_create (factory, "decoder");
</programlisting>
<para>
gst_elementfactory_create () will use the elementfactory to create an element with the
given name. The name of the element is something you can use later on to lookup the
element in a bin, for example.
</para>
<para>
A simple shortcut exists for creating an element from a factory. The following example
creates an element, named "decoder" from the elementfactory named "mpg123". This
convenient function is most widly used to create an element.
</para>
<programlisting>
GstElement *element;
element = gst_elementfactory_make ("mpg123", "decoder");
</programlisting>
<para>
An element can be destroyed with:
</para>
<programlisting>
GstElement *element;
...
gst_element_destroy (element);
</programlisting>
</sect1>
</chapter>

332
docs/manual/factories.xml Normal file
View file

@ -0,0 +1,332 @@
<chapter id="cha-factories">
<title>More on factories</title>
<para>
The small application we created in the previous chapter used the
concept of a factory to create the elements. In this chapter we will
show you how to use the factory concepts to create elements based
on what they do instead of how they are called.
</para>
<para>
We will first explain the concepts involved before we move on
to the reworked helloworld example using autoplugging.
</para>
<sect1>
<title>The problems with the helloworld example</title>
<para>
If we take a look at how the elements were created in the previous
example we used a rather crude mechanism:
</para>
<programlisting>
...
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
...
</programlisting>
<para>
While this mechanism is quite effective it also has some big problems:
The elements are created based on their name. Indeed, we create an
element mpg123 by explicitly stating the mpg123 elements name.
Our little program therefore always uses the mpg123 decoder element
to decode the MP3 audio stream, even if there are 3 other MP3 decoders
in the system. We will see how we can use a more general way to create
an MP3 decoder element.
</para>
<para>
We have to introduce the concept of MIME types and capabilities
added to the source and sink pads.
</para>
</sect1>
<sect1>
<title>more on MIME Types</title>
<para>
GStreamer uses MIME types to indentify the different types of data
that can be handled by the elements. They are the high level
mechanisms to make sure that everyone is talking about the right
kind of data.
</para>
<para>
A MIME (Multipurpose Internet Mail Extension) types are a set of
string that denote a certain type of data. examples include:
<itemizedlist>
<listitem>
<para>
audio/raw : raw audio samples
</para>
</listitem>
<listitem>
<para>
audio/mpeg : mpeg audio
</para>
</listitem>
<listitem>
<para>
video/mpeg : mpeg video
</para>
</listitem>
</itemizedlist>
</para>
<para>
An element must associate a MIME type to its source and sink pads
when it is loaded into the system. GStreamer knows about the
different elements and what type of data they expect and emit.
This allows for very dynamic and extensible element creation as we
will see.
</para>
<para>
As we have seen in the previous chapter, the MIME types are added
to the Capability structure of a pad.
</para>
<para>
In our helloworld example the elements we constructed would have the
following MIME types associated with their source and sink pads:
</para>
<figure float="1" id="sec-mime-img">
<title>The Hello world pipeline with MIME types</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/mime-world.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
We will see how you can create an element based on the MIME types
of its source and sink pads. This way the end-user will have the
ability to choose his/her favorite audio/mpeg decoder without
you even having to care about it.
</para>
<para>
The typing of the source and sink pads also makes it possible to
'autoplug' a pipeline. We will have the ability to say: "construct
me a pipeline that does an audio/mpeg to audio/raw conversion".
</para>
<note>
<para>
The basic GStreamer library does not try to solve all of your
autoplug problems. It leaves the hard decisions to the application
programmer, where they belong.
</para>
</note>
</sect1>
<sect1>
<title>GStreamer types</title>
<para>
GStreamer assigns a unique number to all registered MIME types.
GStreamer also keeps a reference to
a function that can be used to determine if a given buffer is of
the given MIME type.
</para>
<para>
There is also an association between a MIME type and a file
extension.
</para>
<para>
The type information is maintained in a list of
<classname>GstType</classname>. The definition of a
<classname>GstType</classname> is like:
</para>
<programlisting>
typedef GstCaps (*GstTypeFindFunc) (GstBuffer *buf,gpointer *priv);
typedef struct _GstType GstType;
struct _GstType {
guint16 id; /* type id (assigned) */
gchar *mime; /* MIME type */
gchar *exts; /* space-delimited list of extensions */
GstTypeFindFunc typefindfunc; /* typefind function */
};
</programlisting>
<para>
All operations on <classname>GstType</classname> occur via their
<classname>guint16 id</classname> numbers, with <classname>GstType</classname>
structure private to the GStreamer library.
</para>
<sect2>
<title>MIME type to id conversion</title>
<para>
We can obtain the id for a given MIME type
with the following piece of code:
</para>
<programlisting>
guint16 id;
id = gst_type_find_by_mime ("audio/mpeg");
</programlisting>
<para>
This function will return 0 if the type was not known.
</para>
</sect2>
<sect2>
<title>id to <classname>GstType</classname> conversion</title>
<para>
We can obtain the <classname>GstType</classname> for a given id
with the following piece of code:
</para>
<programlisting>
GstType *type;
type = gst_type_find_by_id (id);
</programlisting>
<para>
This function will return NULL if the id was associated with
any known <classname>GstType</classname>
</para>
</sect2>
<sect2>
<title>extension to id conversion</title>
<para>
We can obtain the id for a given file extension
with the following piece of code:
</para>
<programlisting>
guint16 id;
id = gst_type_find_by_ext (".mp3");
</programlisting>
<para>
This function will return 0 if the extension was not known.
</para>
</sect2>
<sect2>
<title>id to <classname>GstElementFactory</classname> conversion</title>
<para>
When we have obtained a given type id using one of the above methods,
we can obtain a list of all the elements that operate on this MIME
type or extension.
</para>
<para>
Obtain a list of all the elements that use this id as source with:
</para>
<programlisting>
GList *list;
list = gst_type_gst_srcs (id);
</programlisting>
<para>
Obtain a list of all the elements that use this id as sink with:
</para>
<programlisting>
GList *list;
list = gst_type_gst_sinks (id);
</programlisting>
<para>
When you have a list of elements, you can simply take the first
element of the list to obtain an appropriate element.
</para>
<note>
<para>
As you can see, there might be a multitude of elements that
are able to operate on audio/raw types. some might include:
<itemizedlist>
<listitem>
<para>
an MP3 audio encoder.
</para>
</listitem>
<listitem>
<para>
an audio sink.
</para>
</listitem>
<listitem>
<para>
an audio resampler.
</para>
</listitem>
<listitem>
<para>
a spectrum filter.
</para>
</listitem>
</itemizedlist>
Depending on the application, you might want to use a different
element. This is why GStreamer leaves that decision up to the
application programmer.
</para>
</note>
</sect2>
<sect2>
<title>id to id path detection</title>
<para>
You can obtain a <classname>GList</classname> of elements that
will transform the source id into the destination id.
</para>
<programlisting>
GList *list;
list = gst_type_gst_sink_to_src (sourceid, sinkid);
</programlisting>
<para>
This piece of code will give you the elements needed to construct
a path from sourceid to sinkid. This function is mainly used in
autoplugging the pipeline.
</para>
</sect2>
</sect1>
<sect1>
<title>creating elements with the factory</title>
<para>
In the previous section we described how you could obtain
an element factory using MIME types. One the factory has been
obtained, you can create an element using:
</para>
<programlisting>
GstElementFactory *factory;
GstElement *element;
// obtain the factory
factory = ...
element = gst_elementfactory_create (factory, "name");
</programlisting>
<para>
This way, you do not have to create elements by name which
allows the end-user to select the elements he/she prefers for the
given MIME types.
</para>
</sect1>
<sect1>
<title>GStreamer basic types</title>
<para>
GStreamer only has two builtin types:
</para>
<itemizedlist>
<listitem>
<para>
audio/raw : raw audio samples
</para>
</listitem>
<listitem>
<para>
video/raw and image/raw : raw video data
</para>
</listitem>
</itemizedlist>
<para>
All other MIME types are maintained by the plugin elements.
</para>
</sect1>
</chapter>

View file

@ -1,34 +1,39 @@
<!DOCTYPE book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" "" [
<!ENTITY INTRO SYSTEM "intro.sgml">
<!ENTITY MOTIVATION SYSTEM "motivation.sgml">
<!ENTITY GOALS SYSTEM "goals.sgml">
<?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 % magic-entities SYSTEM "magic">
%magic-entities;
<!ENTITY INIT SYSTEM "init.sgml">
<!ENTITY ELEMENTS SYSTEM "elements.sgml">
<!ENTITY PADS SYSTEM "pads.sgml">
<!ENTITY CONNECTIONS SYSTEM "connections.sgml">
<!ENTITY BINS SYSTEM "bins.sgml">
<!ENTITY BUFFERS SYSTEM "buffers.sgml">
<!ENTITY STATES SYSTEM "states.sgml">
<!ENTITY INTRO SYSTEM "intro.xml">
<!ENTITY MOTIVATION SYSTEM "motivation.xml">
<!ENTITY GOALS SYSTEM "goals.xml">
<!ENTITY HELLOWORLD SYSTEM "helloworld.sgml">
<!ENTITY FACTORIES SYSTEM "factories.sgml">
<!ENTITY AUTOPLUGGING SYSTEM "autoplugging.sgml">
<!ENTITY HELLOWORLD2 SYSTEM "helloworld2.sgml">
<!ENTITY INIT SYSTEM "init.xml">
<!ENTITY ELEMENTS SYSTEM "elements.xml">
<!ENTITY PADS SYSTEM "pads.xml">
<!ENTITY CONNECTIONS SYSTEM "connections.xml">
<!ENTITY BINS SYSTEM "bins.xml">
<!ENTITY BUFFERS SYSTEM "buffers.xml">
<!ENTITY STATES SYSTEM "states.xml">
<!ENTITY THREADS SYSTEM "threads.sgml">
<!ENTITY QUEUES SYSTEM "queues.sgml">
<!ENTITY COTHREADS SYSTEM "cothreads.sgml">
<!ENTITY DYNAMIC SYSTEM "dynamic.sgml">
<!ENTITY TYPEDETECTION SYSTEM "typedetection.sgml">
<!ENTITY UTILITY SYSTEM "utility.sgml">
<!ENTITY HELLOWORLD SYSTEM "helloworld.xml">
<!ENTITY FACTORIES SYSTEM "factories.xml">
<!ENTITY AUTOPLUGGING SYSTEM "autoplugging.xml">
<!ENTITY HELLOWORLD2 SYSTEM "helloworld2.xml">
<!ENTITY XML SYSTEM "xml.sgml">
<!ENTITY PLUGINS SYSTEM "plugins.sgml">
<!ENTITY DEBUGGING SYSTEM "debugging.sgml">
<!ENTITY PROGRAMS SYSTEM "programs.sgml">
<!ENTITY COMPONENTS SYSTEM "components.sgml">
<!ENTITY QUOTES SYSTEM "quotes.sgml">
<!ENTITY THREADS SYSTEM "threads.xml">
<!ENTITY QUEUES SYSTEM "queues.xml">
<!ENTITY COTHREADS SYSTEM "cothreads.xml">
<!ENTITY DYNAMIC SYSTEM "dynamic.xml">
<!ENTITY TYPEDETECTION SYSTEM "typedetection.xml">
<!ENTITY UTILITY SYSTEM "utility.xml">
<!ENTITY XML SYSTEM "xml.xml">
<!ENTITY PLUGINS SYSTEM "plugins.xml">
<!ENTITY DEBUGGING SYSTEM "debugging.xml">
<!ENTITY PROGRAMS SYSTEM "programs.xml">
<!ENTITY COMPONENTS SYSTEM "components.xml">
<!ENTITY QUOTES SYSTEM "quotes.xml">
]>
<book id="index">

307
docs/manual/helloworld.xml Normal file
View file

@ -0,0 +1,307 @@
<chapter id="cha-hello">
<title>Your first application</title>
<para>
This chapter describes the most rudimentary aspects of a <application>GStreamer</application> application,
including initializing the libraries, creating elements, packing them into
a pipeline and playing, pause and stop the pipeline.
</para>
<sect1>
<title>Hello world</title>
<para>
We will create a simple first application. In fact it will be a complete
MP3 player, using standard <application>GStreamer</application> components. The player will read from
a file that is given as the first argument of the program.
</para>
<programlisting>
#include &lt;gst/gst.h&gt;
int
main (int argc, char *argv[])
{
GstElement *pipeline, *disksrc, *parse, *decoder, *audiosink;
gst_init(&amp;argc, &amp;argv);
if (argc != 2) {
g_print ("usage: &percnt;s &lt;filename&gt;\n", argv[0]);
exit (-1);
}
/* create a new pipeline to hold the elements */
pipeline = gst_pipeline_new ("pipeline");
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
/* and an audio sink */
audiosink = gst_elementfactory_make ("osssink", "play_audio");
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), disksrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (disksrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
/* start playing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
/* stop the pipeline */
gst_element_set_state (pipeline, GST_STATE_NULL);
/* we don't need a reference to these objects anymore */
gst_object_unref (GST_OBJECT (audiosink));
gst_object_unref (GST_OBJECT (parse));
gst_object_unref (GST_OBJECT (decoder));
gst_object_unref (GST_OBJECT (disksrc));
gst_object_unref (GST_OBJECT (pipeline));
exit (0);
}
</programlisting>
<para>
Let's go through this example step by step.
</para>
<para>
The first thing you have to do is to include the standard <application>GStreamer</application> headers and
initialize the framework.
</para>
<programlisting>
#include &lt;gst/gst.h&gt;
...
int
main (int argc, char *argv[])
{
...
gst_init(&amp;argc, &amp;argv);
...
</programlisting>
<para>
We are going to create 4 elements and one pipeline. Since all objects are
in fact elements, we can define them as:
</para>
<programlisting>
...
GstElement *pipeline, *disksrc, *parse, *decoder, *audiosink;
...
</programlisting>
<para>
Next, we are going to create an empty pipeline. As you have seen in the basic
introduction, this pipeline will hold and manage all the elements we are
going to stuff into it.
</para>
<programlisting>
/* create a new pipeline to hold the elements */
pipeline = gst_pipeline_new ("pipeline");
</programlisting>
<para>
We use the standard constructor for a pipeline: gst_pipeline_new ("name").
</para>
<para>
We then create a disk source element. The disk source element is able to
read from a file. We use the standard GObject property mechanism to set
a property of the element: the file to read from.
</para>
<programlisting>
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
</programlisting>
<note>
<para>
You can check if the disksrc != NULL to verify the creation of the
disk source element.
</para>
</note>
<para>
We now create the MP3 decoder element. <application>GStreamer</application> requires you
to put a parser in front of the decoder. This parser will
cut the raw data from the disk source into MP3 frames
suitable for the decoder. In the advanced concepts chapter we will
see how this can be avoided.
</para>
<programlisting>
/* now it's time to get the parser */
parse = gst_elementfactory_make ("mp3parse", "parse");
decoder = gst_elementfactory_make ("mpg123", "decoder");
</programlisting>
<para>
gst_elementfactory_make() takes two arguments: a string that will
identify the element you need and a second argument: how you want
to name the element. The name of the element is something you can
choose yourself and might be used to retrieve the element from a
bin/pipeline.
</para>
<para>
Finally we create our audio sink element. This element will be able
to playback the audio using OSS.
</para>
<programlisting>
/* and an audio sink */
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
</programlisting>
<para>
We then add the elements to the pipeline.
</para>
<programlisting>
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), disksrc);
gst_bin_add (GST_BIN (pipeline), parse);
gst_bin_add (GST_BIN (pipeline), decoder);
gst_bin_add (GST_BIN (pipeline), audiosink);
</programlisting>
<para>
We connect the different pads of the elements together like this:
</para>
<programlisting>
/* connect src to sink */
gst_pad_connect (gst_element_get_pad (disksrc, "src"),
gst_element_get_pad (parse, "sink"));
gst_pad_connect (gst_element_get_pad (parse, "src"),
gst_element_get_pad (decoder, "sink"));
gst_pad_connect (gst_element_get_pad (decoder, "src"),
gst_element_get_pad (audiosink, "sink"));
</programlisting>
<para>
We now have a created a complete pipeline. We can visualise the
pipeline as follows:
</para>
<figure float="1" id="sec-hello-img">
<title>The Hello world pipeline</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/hello-world.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
Everything is now set up to start the streaming. We use the following
statements to change the state of the pipeline:
</para>
<programlisting>
/* start playing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
</programlisting>
<note>
<para>
<application>GStreamer</application> will take care of the READY and PAUSED state for y
ou when going from NULL to PLAYING.
</para>
</note>
<para>
Since we do not use threads, nothing will happen yet. We manually have to
call gst_bin_iterate() to execute one iteration of the pipeline.
</para>
<programlisting>
while (gst_bin_iterate (GST_BIN (pipeline)));
</programlisting>
<para>
The gst_bin_iterate() function will return TRUE as long as something interesting
happended inside the pipeline. When the end-of-file has been reached the _iterate
function will return FALSE and we can end the loop.
</para>
<programlisting>
/* stop the pipeline */
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (audiosink));
gst_object_unref (GST_OBJECT (decoder));
gst_object_unref (GST_OBJECT (disksrc));
gst_object_unref (GST_OBJECT (pipeline));
exit (0);
</programlisting>
<note>
<para>
don't forget to set the state of the pipeline to NULL. This will free
all of the resources held by the elements.
</para>
</note>
</sect1>
<sect1>
<title>compiling helloworld.c</title>
<para>
To compile the helloworld example, use:
</para>
<programlisting>
gcc -Wall `gstreamer-config --cflags --libs` helloworld.c \
-o helloworld
</programlisting>
<para>
This uses the program gstreamer-config, which comes with <application>GStreamer</application>. This program "knows"
what compiler switches are needed to compile programs that use <application>GStreamer</application>.
gstreamer-config --cflags will output a list of include
directories for the compiler to look in, and gstreamer-config --libs will output the
list of libraries for the compiler to link with and the directories to find them
in.
</para>
<para>
You can run the example with (substitute helloworld.mp3 with you favorite MP3 file):
</para>
<programlisting>
./helloworld helloworld.mp3
</programlisting>
</sect1>
<sect1>
<title>conclusion</title>
<para>
This concludes our first example. As you see, setting up a pipeline
is very lowlevel but powerfull. You will later in this manual how
you can create a custom MP3 element with a more high level API.
</para>
<para>
It should be clear from the example that we can very easily replace the
disksrc element with an httpsrc, giving you instant network streaming.
An element could be build to handle icecast connections, for example.
</para>
<para>
We can also choose to use another type of sink instead of the audiosink.
We could use a disksink to write the raw samples to a file, for example.
It should also be clear that inserting filters, like a stereo effect,
into the pipeline is not that hard to do. The most important thing is
that you can reuse allready existing elements.
</para>
</sect1>
</chapter>

View file

@ -0,0 +1,32 @@
<chapter id="cha-components">
<title>Components</title>
<para>
<application>GStreamer</application> includes components that people can include
in their programs.
</para>
<sect1>
<title>GstPlay</title>
<para>
GstPlay is a GtkWidget with a simple API to play, pause and stop a media file.
</para>
</sect1>
<sect1>
<title>GstMediaPlay</title>
<para>
GstMediaply is a complete player widget.
</para>
</sect1>
<sect1>
<title>GstEditor</title>
<para>
GstEditor is a set of widgets to display a graphical representation of a
pipeline.
</para>
</sect1>
</chapter>

49
docs/manual/intro.xml Normal file
View file

@ -0,0 +1,49 @@
<chapter id="cha-intro">
<title>Introduction</title>
<para>
This chapter gives you an overview of the technologies described in this
book.
</para>
<sect1 id="sec-intro-what">
<title>What is GStreamer?</title>
<para>
GStreamer is a framework for creating streaming media applications.
The fundamental design comes from the video pipeline at Oregon Graduate
Institute, as well as some ideas from DirectShow.
</para>
<para>
GStreamer's development framework makes it possible to write any
streaming multimedia application. The framework includes several
components to build a full featured media player capable of playing
MPEG1, MPEG2, AVI, MP3, WAV, AU, ...
</para>
<para>
GStreamer, however, is much more than just another media player. Its
main advantages are that the pluggable components also make it possible
to write a full flegded video or audio editing application.
</para>
<para>
The framework is based on plug-ins that will provide the various codec
and other functionality. The plugins can be connected and arranged in
a pipeline. This pipeline defines the flow of the data. Pipelines can
also be edited with a GUI editor and saved as XML so that pipeline
libraries can be made with a minimum of effort.
</para>
<para>
The GStreamer core function is to provide a framework for plugins, data flow
and media type handling/negotiation.
It also provides an API to write applications using the various plugins.
</para>
<para>
This book is about GStreamer from a developer's point of view; it describes
how to write a GStreamer application using the GStreamer libraries and tools.
</para>
</sect1>
</chapter>

1
docs/manual/magic-pdf Normal file
View file

@ -0,0 +1 @@
<!ENTITY magic "pdf">

1
docs/manual/magic-png Normal file
View file

@ -0,0 +1 @@
<!ENTITY magic "png">

View file

@ -0,0 +1,99 @@
<chapter id="cha-motivation">
<title>Motivation</title>
<para>
Linux has historically lagged behind other operating systems in the multimedia
arena. Microsoft's Windows[tm] and Apple's MacOS[tm] both have strong support
for multimedia devices, multimedia content creation,
playback, and realtime processing. Linux, on the other hand, has a poorly integrated
collection of multimedia utilities and applications available, which can hardly compete
with the professional level of software available for MS Windows and MacOS.
</para>
<sect1 id="sec-motivation-problems">
<title>Current problems</title>
<para>
We descibe the typical problems in todays media handling on Linux.
</para>
<sect2 id="sec-motivation-duplicate">
<title>Multitude of duplicate code</title>
<para>
The Linux user who wishes to hear a sound file must hunt through their collection of
sound file players in order to play the tens of sound file formats in wide use today.
Most of these players basically reimplement the same code over and over again.
</para>
<para>
The Linux developer who wishes to embed a video clip in their application must use
crude hacks to run an external video player. There is no library available that a
developer can use to create a custom media player.
</para>
</sect2>
<sect2 id="sec-motivation-goal">
<title>'One goal' media players/libraries</title>
<para>
Your typical MPEG player was designed to play MPEG video and audio. Most of
these players have implemented a complete infrastructure focused on
achieving their only goal: playback. No provisions were made to add
filters or special effects to the video or audio data.
</para>
<para>
If I wanted to convert an MPEG2 video stream into an AVI file, my best
option would be to take all of the MPEG2 decoding algorithms out
of the player and duplicate them into my own AVI encoder. These
algorithms cannot easily be shared accross applications.
</para>
<para>
Attempts have been made to create libraries for handling various media types.
Because they focus on a very specific media type (avifile, libmpeg2, ...),
significant work is needed to integrate them due to a lack of a common API.
GStreamer allows you to wrap these libraries with a common API, which
significantly simplifies integration and reuse.
</para>
</sect2>
<sect2 id="sec-motivation-plugin">
<title>Non unified plugin mechanisms</title>
<para>
Your typical media player might have a plugin for different media
types. Two media players will typically implement their own plugin
mechanism so that the codecs cannot be easily exchanged.
</para>
<para>
The lack of a unified plugin mechanism also seriously hinders the
creation of binary only codecs. No company is willing to port their
code to all the different plugin mechanisms.
</para>
<para>
While GStreamer also uses it own plugin system it offers a very rich
framework for the plugin developper and ensures the plugin can be used
in a wide range of applications, transparently interacting with other
plugins.
</para>
</sect2>
<sect2 id="sec-motivation-network">
<title>Provision for network transparency</title>
<para>
No infrastructure is present to allow network transparent media
handling. A distributed MPEG encoder will typically duplicate the
same encoder algorithms found in a non-distributed encoder.
</para>
<para>
No provisions have been made for emerging technologies such as
the GNOME object embedding using BONOBO.
</para>
</sect2>
<sect2 id="sec-motivation-catchup">
<title>Catch up with the Windows(tm) world</title>
<para>
We need solid media handling if we want to see Linux succeed on
the desktop.
</para>
<para>
We must clear the road for commercially backed codecs and multimedia
applications so that Linux can become an option for doing multimedia.
</para>
</sect2>
</sect1>
</chapter>

459
docs/manual/pads.xml Normal file
View file

@ -0,0 +1,459 @@
<chapter id="cha-pads">
<title>GstPad</title>
<para>
As we have seen in the previous chapter (GstElement), the pads are the elements
connections with the outside world.
</para>
<para>
The specific type of media that the element can handle will be exposed by the pads.
The description of this media type is done with capabilities (<classname>GstCaps</classname>)
</para>
<sect1 id="sec-pads-get">
<title>Getting pads from an element</title>
<para>
Once you have created an element, you can get one of its pads with:
</para>
<programlisting>
GstPad *srcpad;
...
srcpad = gst_element_get_pad (element, "src");
...
</programlisting>
<para>
This function will get the pad named "src" from the given element.
</para>
<para>
Alternatively, you can also request a GList of pads from the element. The following
code example will print the names of all the pads of an element.
</para>
<programlisting>
GList *pads;
...
pads = gst_element_get_pad_list (element);
while (pads) {
GstPad *pad = GST_PAD (pads-&gt;data);
g_print ("pad name &percnt;s\n", gst_pad_get_name (pad));
pads = g_list_next (pads);
}
...
</programlisting>
<sect2 id="sec-pads-functions">
<title>Useful pad functions</title>
<para>
You can get the name of a pad with gst_pad_get_name () and set its name with
get_pad_set_name();
</para>
<para>
gst_pad_get_direction (GstPad *pad) can be used to query if the pad is a sink
or a src pad. Remember a src pad is a pad that can output data and a sink pad is
one that accepts data.
</para>
<para>
You can get the parent of the pad, this is the element that this pad belongs to,
with get_pad_set_parent(GstPad *pad). This function will return a pointer to a
GstObject.
</para>
</sect2>
<sect2 id="sec-pads-dynamic">
<title>Dynamic pads</title>
<para>
Some elements might not have their pads when they are created. This can, for
example, happen with an MPEG2 system demuxer. The demuxer will create its
pads at runtime when it detects the different elementary streams in the MPEG2
system stream.
</para>
<para>
Running <application>gstreamer-inspect mpeg2parse</application> will show that
the element has only one pad: a sink pad called 'sink'. The other pads are
"dormant" as you can see in the padtemplates from the 'Exists: Sometimes'
property. Depending on the type of MPEG2 file you play, the pads are created. We
will see that this is very important when you are going to create dynamic
pipelines later on in this manual.
</para>
<para>
You can attach a signal to an element to inform you when the element has created
a new pad from one of its padtemplates. The following piece of code is an example
of how to do this:
</para>
<programlisting>
static void
pad_connect_func (GstElement *parser, GstPad *pad, GstElement *pipeline)
{
g_print("***** a new pad &percnt;s was created\n", gst_pad_get_name(pad));
gst_element_set_state (pipeline, GST_STATE_PAUSED);
if (strncmp (gst_pad_get_name (pad), "private_stream_1.0", 18) == 0) {
// set up an AC3 decoder pipeline
...
// connect pad to the AC3 decoder pipeline
...
}
gst_element_set_state (GST_ELEMENT (audio_thread), GST_STATE_READY);
}
int
main(int argc, char *argv[])
{
GstElement *pipeline;
GstElement *mpeg2parser;
// create pipeline and do something usefull
...
mpeg2parser = gst_elementfactory_make ("mpeg2parse", "mpeg2parse");
g_signal_connect (G_OBJECT (mpeg2parser), "new_pad", pad_connect_func, pipeline);
...
// start the pipeline
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
...
}
</programlisting>
<note>
<para>
You need to set the pipeline to READY or NULL if you want to change it.
</para>
</note>
</sect2>
<sect2 id="sec-pads-request">
<title>Request pads</title>
<para>
An element can also have request pads. These pads are not created automatically
but are only created on demand. This is very usefull for muxers, aggregators
and tee elements.
</para>
<para>
The tee element, for example, has one input pad and a request padtemplate for the
output pads. Whenever an element wants to get an output pad from the tee element, it
has to request the pad.
</para>
<para>
The following piece of code can be used to get a pad from the tee element. After
the pad has been requested, it can be used to connect another element to it.
</para>
<programlisting>
...
GstPad *pad;
...
element = gst_elementfactory_make ("tee", "element");
pad = gst_element_request_pad_by_name (element, "src%d");
g_print ("new pad %s\n", gst_pad_get_name (pad));
...
</programlisting>
<para>
The gst_element_request_pad_by_name method can be used to get a pad
from the element based on the name_template of the padtemplate.
</para>
<para>
It is also possible to request a pad that is compatible with another
padtemplate. This is very usefull if you want to connect an element to
a muxer element and you need to request a pad that is compatible. The
gst_element_request_compatible_pad is used to request a compatible pad, as
is shown in the next example.
</para>
<programlisting>
...
GstPadTemplate *templ;
GstPad *pad;
...
element = gst_elementfactory_make ("tee", "element");
mp3parse = gst_elementfactory_make ("mp3parse", "mp3parse");
templ = gst_element_get_padtemplate_by_name (mp3parse, "sink");
pad = gst_element_request_compatible_pad (element, templ);
g_print ("new pad %s\n", gst_pad_get_name (pad));
...
</programlisting>
</sect2>
</sect1>
<sect1 id="sec-pads-description">
<title>Capabilities of a GstPad</title>
<para>
Since the pads play a very important role in how the element is viewed by the
outside world, a mechanism is implemented to describe the pad by using capabilities.
</para>
<para>
We will briefly describe what capabilities are, enough for you to get a basic understanding
of the concepts. You will find more information on how to create capabilities in the
filter-writer-guide.
</para>
<sect2 id="sec-pads-caps">
<title>What is a capability</title>
<para>
A capability is attached to a pad in order to describe what type of media the pad
can handle.
</para>
<para>
A capability is named and consists of a MIME type and a set of properties. Its data
structure is:
</para>
<programlisting>
struct _GstCaps {
gchar *name; /* the name of this caps */
guint16 id; /* type id (major type) */
guint refcount; /* caps are refcounted */
GstProps *properties; /* properties for this capability */
GstCaps *next; /* caps can be chained together */
};
</programlisting>
<para>
Below is a dump of the capabilities of the element mpg123, as shown by
<command>gstreamer-inspect</command>.
You can see two pads: sink and src. Both pads have capability information attached to them.
</para>
<para>
The sink pad (input pad) is called 'sink' and takes data of MIME type 'audio/mp3'. It also has
three properties: layer, bitrate and framed.
</para>
<para>
The src pad (output pad) is called 'src' and outputs data of MIME type 'audio/raw'. It also has
four properties: format, depth, rate and channels.
</para>
<programlisting>
Pads:
SINK: 'sink'
....
Capabilities:
'mpg123_sink':
MIME type: 'audio/mp3':
layer: Integer range: 1 - 3
bitrate: Integer range: 8 - 320
framed: Boolean: TRUE
SRC: 'src'
....
Capabilities:
'mpg123_src':
MIME type: 'audio/raw':
format: Integer: 16
depth: Integer: 16
rate: Integer range: 11025 - 48000
channels: List:
Integer: 1
Integer: 2
</programlisting>
</sect2>
<sect2 id="sec-pads-props">
<title>What are properties</title>
<para>
Properties are used to describe extra information for the capabilities. The properties
basically exist of a key (a string) and a value. There are different possibile value types
that can be used:
</para>
<itemizedlist>
<listitem>
<para>
An integer value: the property has this exact value.
</para>
</listitem>
<listitem>
<para>
An integer range value. The property denotes a range of possible values. In the case
of the mpg123 element: the src pad has a property rate that can go from 11025 to 48000.
</para>
</listitem>
<listitem>
<para>
A boolean value.
</para>
</listitem>
<listitem>
<para>
a fourcc value: this is a value that is commonly used to describe an encoding for video,
as used be the AVI specification.
</para>
</listitem>
<listitem>
<para>
A list value: the property can take any value from a list.
</para>
</listitem>
<listitem>
<para>
A float value: the property has this exact floating point value.
</para>
</listitem>
<listitem>
<para>
A float range value: denotes a range of possible floating point values.
</para>
</listitem>
<listitem>
<para>
A string value.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="sec-pads-caps-use">
<title>What are the capabilities used for?</title>
<para>
Capabilities describe in great detail the type of media that is handled by the pads.
They are mostly used for:
</para>
<itemizedlist>
<listitem>
<para>
Autoplugging: automatically finding plugins for a set of capabilities
</para>
</listitem>
<listitem>
<para>
Compatibility detection: when two pads are connected, <application>GStreamer</application>
can verify if the two pads are talking about the same media types.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="sec-pads-caps-get">
<title>Getting the capabilities of a pad</title>
<para>
A pad can have a chain of capabilities attached to it. You can get the capabilities chain
with:
</para>
<programlisting>
GstCaps *caps;
...
caps = gst_pad_get_caps (pad);
g_print ("pad name &percnt;s\n", gst_pad_get_name (pad));
while (caps) {
g_print (" Capability name &percnt;s, MIME type &percnt;s\n",
gst_caps_get_name (cap),
gst_caps_get_mime (cap));
caps = caps-&gt;next;
}
...
</programlisting>
</sect2>
<sect2 id="sec-pads-caps-create">
<title>Creating capabilities structures</title>
<para>
While the capabilities are mainly used inside the plugin to describe the media type of the
pads, the application programmer also has to have basic understanding of caps in order to
interface with the plugins, specially when using the autopluggers.
</para>
<para>
As we said, a capability has a name, a mime-type and some properties. The signature of the
function to create a new <classname>GstCaps *</classname> structure is like:
<programlisting>
GstCaps* gst_caps_new (const gchar *name, const gchar *mime, GstProps *props);
</programlisting>
</para>
<para>
You can therefore create a new capability with no properties like this:
<programlisting>
GstCaps *newcaps;
newcaps = gst_caps_new ("my_caps", "audio/wav", NULL);
</programlisting>
</para>
<para>
<classname>GstProps</classname> basically consist of a set of key-value pairs
and are created with a function with this signature:
<programlisting>
GstProps* gst_props_new (const gchar *firstname, ...);
</programlisting>
</para>
<para>
The keys are given as strings and the values are given with a set of macros:
<itemizedlist>
<listitem>
<para>
GST_PROPS_INT(a): An integer value
</para>
</listitem>
<listitem>
<para>
GST_PROPS_FLOAT(a): A floating point value
</para>
</listitem>
<listitem>
<para>
GST_PROPS_FOURCC(a): A fourcc value
</para>
</listitem>
<listitem>
<para>
GST_PROPS_BOOLEAN(a): A boolean value
</para>
</listitem>
<listitem>
<para>
GST_PROPS_STRING(a): A string value
</para>
</listitem>
</itemizedlist>
The values can also be specified as ranges with:
<itemizedlist>
<listitem>
<para>
GST_PROPS_INT_RANGE(a,b): An integer ragne from a to b
</para>
</listitem>
<listitem>
<para>
GST_PROPS_FLOAT_RANGE(a,b): A float ragne from a to b
</para>
</listitem>
</itemizedlist>
All of the above values can be given with a list too, using:
<itemizedlist>
<listitem>
<para>
GST_PROPS_LIST(a,...): A list of property values.
</para>
</listitem>
</itemizedlist>
</para>
<para>
A more complex capability with properties is created like this:
<programlisting>
GstCaps *newcaps;
newcaps = gst_caps_new ("my_caps",
"audio/wav",
gst_props_new (
"bitrate", GST_PROPS_INT_RANGE (11025,22050),
"depth", GST_PROPS_INT (16),
"signed", GST_PROPS_LIST (
GST_PROPS_BOOLEAN (TRUE),
GST_PROPS_BOOLEAN (FALSE)
),
NULL
);
</programlisting>
Optionally the convenient shortcut macro can be used. The above complex
capability can be created with:
<programlisting>
GstCaps *newcaps;
newcaps = GST_CAPS_NEW ("my_caps",
"audio/wav",
"bitrate", GST_PROPS_INT_RANGE (11025,22050),
"depth", GST_PROPS_INT (16),
"signed", GST_PROPS_LIST (
GST_PROPS_BOOLEAN (TRUE),
GST_PROPS_BOOLEAN (FALSE)
)
);
</programlisting>
</para>
</sect2>
</sect1>
</chapter>

70
docs/manual/plugins.xml Normal file
View file

@ -0,0 +1,70 @@
<chapter id="cha-plugins">
<title>What are Plugins</title>
<para>
A plugin is a shared library that contains at least one of the following items:
</para>
<itemizedlist>
<listitem>
<para>
one or more elementfactories
</para>
</listitem>
<listitem>
<para>
one or more typedefinitions
</para>
</listitem>
<listitem>
<para>
one or more autopluggers
</para>
</listitem>
</itemizedlist>
<para>
The plugins have one simple method: plugin_init () where all the elementfactories are
created and the typedefinitions are registered.
</para>
<para>
the plugins are maintained in the plugin system. Optionally, the typedefinitions and
the elementfactories can be saved into an XML representation so that the plugin system
does not have to load all available plugins in order to know their definition.
</para>
<para>
The basic plugin structure has the following fields:
</para>
<programlisting>
struct _GstPlugin {
gchar *name; /* name of the plugin */
gchar *longname; /* long name of plugin */
gchar *filename; /* filename it came from */
GList *types; /* list of types provided */
gint numtypes;
GList *elements; /* list of elements provided */
gint numelements;
GList *autopluggers; /* list of autopluggers provided */
gint numautopluggers;
gboolean loaded; /* if the plugin is in memory */
};
</programlisting>
<para>
You can query a GList of available plugins with:
</para>
<programlisting>
GList *plugins;
plugins = gst_plugin_get_list ();
while (plugins) {
GstPlugin *plugin = (GstPlugin *)plugins-&gt;data;
g_print ("plugin: &percnt;s\n", gst_plugin_get_name (plugin));
plugins = g_list_next (plugins);
}
</programlisting>
</chapter>

240
docs/manual/programs.xml Normal file
View file

@ -0,0 +1,240 @@
<chapter id="cha-programs">
<title>Programs</title>
<para>
</para>
<sect1>
<title><command>gstreamer-config</command></title>
<para>
<command>gstreamer-config</command> is a script to get information about the installed
version of <application>GStreamer</application>.
This program "knows" what compiler switches are needed to compile programs that use
<application>GStreamer</application>.
</para>
<para>
<command>gstreamer-config</command> accepts the following options:
<itemizedlist>
<listitem>
<para>
<option>--version</option> Print the currently installed version of
<application>GStreamer</application> on the standard output.
</para>
</listitem>
<listitem>
<para>
<option>--libs</option> Print the linker flags that are necessary to link a
<application>GStreamer</application> program.
</para>
</listitem>
<listitem>
<para>
<option>--cflags</option> Print the compiler flags that are necessary to compile a
<application>GStreamer</application> program.
</para>
</listitem>
<listitem>
<para>
<option>--prefix=<replaceable>PREFIX</replaceable></option>
If specified, use <replaceable>PREFIX</replaceable> instead of the installation
prefix that <application>GStreamer</application> was built with when computing the
output for the <option>--cflags</option> and <option>--libs</option> options.
This option is also used for the exec prefix if
<option>--exec-prefix</option> was not specified. This option must be specified before any
<option>--libs</option> or <option>--cflags</option> options.
</para>
</listitem>
<listitem>
<para>
<option>--exec-prefix=<replaceable>PREFIX</replaceable></option>
If specified, use <replaceable>PREFIX</replaceable> instead of the installation exec
prefix that <application>GStreamer</application> was built with when computing the
output for the <option>--cflags</option> and <option>--libs</option> options. This option must be
specified before any <option>--libs</option> or <option>--cflags</option>
options.
</para>
</listitem>
</itemizedlist>
</para>
<para>
A simple <filename>Makefile</filename> will contain something like:
<programlisting>
CC = gcc
helloworld2: helloworld2.c
$(CC) -Wall `gstreamer-config --cflags --libs` helloworld2.c -o helloworld2
clean:
rm -f *.o helloworld2
</programlisting>
</para>
</sect1>
<sect1>
<title><command>gstreamer-register</command></title>
<para>
<command>gstreamer-register</command> is used to rebuild the database of plugins.
It is used after a new plugin has been added to the system. The plugin database
can be found in <filename>/etc/gstreamer/reg.xml</filename>.
</para>
</sect1>
<sect1>
<title><command>gstreamer-launch</command></title>
<para>
This is a tool that will construct pipelines based on a command-line
syntax.
</para>
<para>
A simple commandline looks like:
<screen>
gstreamer-launch disksrc location=hello.mp3 ! mp3parse ! mpg123 ! audiosink
</screen>
A more complex pipeline looks like:
<screen>
gstreamer-launch disksrc redpill.vob audio_00! (ac3parse ! ac3dec ! audiosink) \
video_00! (mpeg2dec ! videosink)
</screen>
</para>
<para>
Note that the parser isn't capable of more complex pipelines yet, including
the VOB player above. The minor tweaks will be made post 0.2.1.
</para>
<para>
You can also use the the parser in you own code. <application>GStreamer</application>
provides a function gst_parse_launch () that you can use to construt a pipeline.
The following programs lets you create an mp3 pipeline using the gst_parse_launch ()
function:
</para>
<programlisting>
#include &lt;gst/gst.h&gt;
int
main (int argc, char *argv[])
{
GstElement *pipeline;
GstElement *disksrc;
gst_init (&amp;argc, &amp;argv);
if (argc != 2) {
g_print ("usage: %s &lt;filename&gt;\n", argv[0]);
return -1;
}
pipeline = gst_pipeline_new ("my_pipeline");
gst_parse_launch ("disksrc[my_disksrc] ! mp3parse ! mpg123 ! osssink", GST_BIN (pipeline));
disksrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_disksrc");
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
gst_element_set_state (pipeline, GST_STATE_NULL);
return 0;
}
</programlisting>
<para>
Note how we can retrieve the disksrc element from the constructed bin using the
element name.
</para>
</sect1>
<sect1>
<title><command>gstreamer-inspect</command></title>
<para>
This is a tool to query a plugin or an element about its properties.
</para>
<para>
To query the information about the element mpg123, you would specify:
</para>
<screen>
gstreamer-inspect mpg123
</screen>
<para>
Below is the output of a query for the audiosink element:
</para>
<screen>
Factory Details:
Long name: Audio Sink (OSS)
Class: Sink/Audio
Description: Output to a sound card via OSS
Version: 0.1.0
Author(s): Erik Walthinsen &lt;omega@cse.ogi.edu&gt;
Copyright: (C) 1999
Pad Templates:
SINK template: 'sink'
Exists: Always
Capabilities:
'audiosink_sink':
MIME type: 'audio/raw':
format: Integer: 16
depth: List:
Integer: 8
Integer: 16
rate: Integer range: 8000 - 48000
channels: Integer range: 1 - 2
Element Flags:
GST_ELEMENT_THREADSUGGESTED
no flags set
Element Implementation:
No loopfunc(), must be chain-based or not configured yet
Has change_state() function
Pads:
SINK: 'sink'
Implementation:
Has chainfunc(): 0x4001cde8
Has default eosfunc() gst_pad_eos_func()
Pad Template: 'sink'
Capabilities:
'audiosink_sink':
MIME type: 'audio/raw':
format: Integer: 16
depth: List:
Integer: 8
Integer: 16
rate: Integer range: 8000 - 48000
channels: Integer range: 1 - 2
Element Arguments:
GstAudioSink::mute: Boolean
GstAudioSink::format: Enum (default 16)
(8): 8 Bits
(16): 16 Bits
GstAudioSink::channels: Enum (default 2)
(1): Mono
(2): Stereo
GstAudioSink::frequency: Integer
</screen>
<para>
To query the information about a plugin, you would do:
</para>
<screen>
gstreamer-inspect gstelements
</screen>
</sect1>
<sect1>
<title><command>gstmediaplay</command></title>
<para>
A sample media player.
</para>
</sect1>
</chapter>

View file

@ -24,7 +24,11 @@
</para>
<figure float="1" id="sec-queues-img">
<title>a two-threaded decoder with a queue</title>
<graphic fileref="images/queue" format="png"></graphic>
<mediaobject>
<imageobject>
<imagedata fileref="images/queue.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>

186
docs/manual/quotes.xml Normal file
View file

@ -0,0 +1,186 @@
<chapter id="cha-quotes">
<title>Quotes from the Developers</title>
<para>
As well as being a cool piece of software,
<application>GStreamer</application> is a lively project, with
developers from around the globe very actively contributing.
We often hang out on the #gstreamer IRC channel on
irc.openprojects.net: the following are a selection of amusing<footnote>
<para>No guarantee of sense of humour compatibility is given.</para>
</footnote> quotes from our conversations.
</para>
<variablelist>
<varlistentry>
<term>16 Feb 2001</term>
<listitem>
<para>
<emphasis>wtay:</emphasis>
I shipped a few commerical products to &gt;40000 people now but
GStreamer is way more exciting...
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>16 Feb 2001</term>
<listitem>
<para>
*
<emphasis>tool-man</emphasis>
is a gstreamer groupie
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>14 Jan 2001</term>
<listitem>
<para>
<emphasis>Omega:</emphasis>
did you run ldconfig? maybe it talks to init?
</para>
<para>
<emphasis>wtay:</emphasis>
not sure, don't think so...
I did run gstreamer-register though :-)
</para>
<para>
<emphasis>Omega:</emphasis>
ah, that did it then ;-)
</para>
<para>
<emphasis>wtay:</emphasis>
right
</para>
<para>
<emphasis>Omega:</emphasis>
probably not, but in case GStreamer starts turning into an OS, someone please let me know?
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>9 Jan 2001</term>
<listitem>
<para>
<emphasis>wtay:</emphasis>
me tar, you rpm?
</para>
<para>
<emphasis>wtay:</emphasis>
hehe, forgot &quot;zan&quot;
</para>
<para>
<emphasis>Omega:</emphasis>
?
</para>
<para>
<emphasis>wtay:</emphasis>
me tar&quot;zan&quot;, you ...
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>7 Jan 2001</term>
<listitem>
<para>
<emphasis>Omega:</emphasis>
that means probably building an agreggating, cache-massaging
queue to shove N buffers across all at once, forcing cache
transfer.
</para>
<para>
<emphasis>wtay:</emphasis>
never done that before...
</para>
<para>
<emphasis>Omega:</emphasis>
nope, but it's easy to do in gstreamer &lt;g&gt;
</para>
<para>
<emphasis>wtay:</emphasis>
sure, I need to rewrite cp with gstreamer too, someday :-)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>7 Jan 2001</term>
<listitem>
<para>
<emphasis>wtay:</emphasis>
GStreamer; always at least one developer is awake...
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>5/6 Jan 2001</term>
<listitem>
<para>
<emphasis>wtay:</emphasis>
we need to cut down the time to create an mp3 player down to
seconds...
</para>
<para>
<emphasis>richardb:</emphasis>
:)
</para>
<para>
<emphasis>Omega:</emphasis>
I'm wanting to something more interesting soon, I did the "draw an mp3
player in 15sec" back in October '99.
</para>
<para>
<emphasis>wtay:</emphasis>
by the time Omega gets his hands on the editor, you'll see a
complete audio mixer in the editor :-)
</para>
<para>
<emphasis>richardb:</emphasis>
Well, it clearly has the potential...
</para>
<para>
<emphasis>Omega:</emphasis>
Working on it... ;-)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>28 Dec 2000</term>
<listitem>
<para>
<emphasis>MPAA:</emphasis>
We will sue you now, you have violated oru IP rights!
</para>
<para>
<emphasis>wtay:</emphasis>
hehehe
</para>
<para>
<emphasis>MPAA:</emphasis>
How dare you laugh at us? We have lawyers! We have Congressmen! We have <emphasis>LARS</emphasis>!
</para>
<para>
<emphasis>wtay:</emphasis>
I'm so sorry your honor
</para>
<para>
<emphasis>MPAA:</emphasis>
Hrumph.
</para>
<para>
*
<emphasis>wtay</emphasis>
bows before thy
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>4 Jun 2001</term>
<listitem>
<para><emphasis>taaz:</emphasis> you witchdoctors and your voodoo mpeg2 black magic... </para>
<para><emphasis>omega_:</emphasis> um. I count three, no four different cults there &lt;g&gt; </para>
<para><emphasis>ajmitch:</emphasis> hehe </para>
<para><emphasis>omega_:</emphasis> witchdoctors, voodoo, black magic, </para>
<para><emphasis>omega_:</emphasis> and mpeg </para>
</listitem>
</varlistentry>
</variablelist>
</chapter>

View file

@ -54,10 +54,10 @@
<para>
You can set the following states to an element:
</para>
<informaltable pgwide=1 frame="none" role="enum">
<informaltable pgwide="1" frame="none" role="enum">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<colspec colwidth="2*" />
<colspec colwidth="8*" />
<tbody>
<row>
<entry><literal>GST_STATE_NULL</literal></entry>

143
docs/manual/threads.xml Normal file
View file

@ -0,0 +1,143 @@
<chapter id="cha-threads">
<title>Threads</title>
<para>
GStreamer has support for multithreading throught the use of
the <classname>GstThread</classname> object. This object is in fact
a special <classname>GstBin</classname> that will become a thread when started.
</para>
<para>
To construct a new thread you will perform something like:
</para>
<programlisting>
GstElement *my_thread;
// create the thread object
my_thread = gst_thread_new ("my_thread");
g_return_if_fail (audio_thread != NULL);
// add some plugins
gst_bin_add (GST_BIN (my_thread), GST_ELEMENT (funky_src));
gst_bin_add (GST_BIN (my_thread), GST_ELEMENT (cool_effect));
// connect the elements here...
...
// start playing
gst_element_set_state (GST_ELEMENT (my_thread), GST_STATE_PLAYING);
</programlisting>
<para>
The above program will create a thread with two elements in it. As soon
as it is set to the PLAYING state, the thread will start to iterate.
</para>
<note>
<para>
A thread should normally contain a source element. Most often, the thread
is fed with data from a queue.
</para>
</note>
<para>
A thread will be visualised as below
</para>
<figure float="1" id="sec-threads-img">
<title>a thread</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/thread.&magic;" format="&magic;" />
</imageobject>
</mediaobject>
</figure>
<para>
As an example we show the helloworld program using a thread.
</para>
<programlisting>
#include &lt;gst/gst.h&gt;
/* eos will be called when the src element has an end of stream */
void
eos (GstSrc *src, gpointer data)
{
GstThread *thread = GST_THREAD (data);
g_print ("have eos, quitting\n");
/* stop the bin */
gst_element_set_state (GST_ELEMENT (thread), GST_STATE_NULL);
gst_main_quit ();
}
int
main (int argc, char *argv[])
{
GstElement *disksrc, *audiosink;
GstElement *pipeline;
GstElement *thread;
if (argc != 2) {
g_print ("usage: &percnt;s &lt;filename&gt;\n", argv[0]);
exit (-1);
}
gst_init (&amp;argc, &amp;argv);
/* create a new thread to hold the elements */
thread = gst_thread_new ("thread");
g_assert (thread != NULL);
/* create a new bin to hold the elements */
pipeline = gst_pipeline_new ("pipeline");
g_assert (pipeline != NULL);
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_assert (disksrc != NULL);
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
g_signal_connect (G_OBJECT (disksrc), "eos",
G_CALLBACK (eos), thread);
/* and an audio sink */
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
g_assert (audiosink != NULL);
/* add objects to the main pipeline */
gst_bin_add (GST_BIN (pipeline), disksrc);
gst_bin_add (GST_BIN (pipeline), audiosink);
/* automatically setup the pipeline */
if (!gst_pipeline_autoplug (GST_PIPELINE (pipeline))) {
g_print ("unable to handle stream\n");
exit (-1);
}
/* remove the source element from the pipeline */
gst_bin_remove (GST_BIN (pipeline), disksrc);
/* insert the source element in the thread, remember a thread needs at
least one source or connection element */
gst_bin_add (GST_BIN (thread), disksrc);
/* add the pipeline to the thread too */
gst_bin_add (GST_BIN (thread), GST_ELEMENT (pipeline));
/* start playing */
gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
/* do whatever you want here, the thread will be playing */
...
gst_main ();
gst_pipeline_destroy (thread);
exit (0);
}
</programlisting>
</chapter>

292
docs/manual/xml.xml Normal file
View file

@ -0,0 +1,292 @@
<chapter id="cha-xml">
<title>XML in <application>GStreamer</application></title>
<para>
<application>GStreamer</application> uses XML to store and load
its pipeline definitions. XML is also used internally to manage the
plugin registry. The plugin registry is a file that contains the definition
of all the plugins <application>GStreamer</application> knows about to have
quick access to the specifics of the plugins.
</para>
<para>
We will show you how you can save a pipeline to XML and how you can reload that
XML file again for later use.
</para>
<sect1 id="sec-xml-write">
<title>Turning GstElements into XML</title>
<para>
We create a simple pipeline and save it to disk with gst_xml_write (). The following
code constructs an mp3 player pipeline with two threads and finaly writes it to disk.
use this program with one argument: the mp3 file on disk.
</para>
<programlisting>
#include &lt;stdlib.h&gt;
#include &lt;gst/gst.h&gt;
gboolean playing;
int
main (int argc, char *argv[])
{
GstElement *disksrc, *audiosink, *queue, *queue2, *parse, *decode;
GstElement *bin;
GstElement *thread, *thread2;
gst_init (&amp;argc,&amp;argv);
if (argc != 2) {
g_print ("usage: &percnt;s &lt;filename&gt;\n", argv[0]);
exit (-1);
}
/* create a new thread to hold the elements */
thread = gst_elementfactory_make ("thread", "thread");
g_assert (thread != NULL);
thread2 = gst_elementfactory_make ("thread", "thread2");
g_assert (thread2 != NULL);
/* create a new bin to hold the elements */
bin = gst_bin_new ("bin");
g_assert (bin != NULL);
/* create a disk reader */
disksrc = gst_elementfactory_make ("disksrc", "disk_source");
g_assert (disksrc != NULL);
g_object_set (G_OBJECT (disksrc), "location", argv[1], NULL);
queue = gst_elementfactory_make ("queue", "queue");
queue2 = gst_elementfactory_make ("queue", "queue2");
/* and an audio sink */
audiosink = gst_elementfactory_make ("audiosink", "play_audio");
g_assert (audiosink != NULL);
parse = gst_elementfactory_make ("mp3parse", "parse");
decode = gst_elementfactory_make ("mpg123", "decode");
/* add objects to the main bin */
gst_bin_add (GST_BIN (bin), disksrc);
gst_bin_add (GST_BIN (bin), queue);
gst_bin_add (GST_BIN (thread), parse);
gst_bin_add (GST_BIN (thread), decode);
gst_bin_add (GST_BIN (thread), queue2);
gst_bin_add (GST_BIN (thread2), audiosink);
gst_pad_connect (gst_element_get_pad (disksrc,"src"),
gst_element_get_pad (queue,"sink"));
gst_pad_connect (gst_element_get_pad (queue,"src"),
gst_element_get_pad (parse,"sink"));
gst_pad_connect (gst_element_get_pad (parse,"src"),
gst_element_get_pad (decode,"sink"));
gst_pad_connect (gst_element_get_pad (decode,"src"),
gst_element_get_pad (queue2,"sink"));
gst_pad_connect (gst_element_get_pad (queue2,"src"),
gst_element_get_pad (audiosink,"sink"));
gst_bin_add (GST_BIN (bin), thread);
gst_bin_add (GST_BIN (bin), thread2);
// write the bin to disk
xmlSaveFile ("xmlTest.gst", gst_xml_write (GST_ELEMENT (bin)));
exit (0);
}
</programlisting>
<para>
The most important line is:
</para>
<programlisting>
xmlSaveFile ("xmlTest.gst", gst_xml_write (GST_ELEMENT (bin)));
</programlisting>
<para>
gst_xml_write () will turn the given element into and xmlDocPtr that
can be saved with the xmlSaveFile () function found in the gnome-xml
package. The result is an XML file named xmlTest.gst.
</para>
<para>
The complete element hierarchy will be saved along with the inter element
pad connections and the element parameters. Future <application>GStreamer</application>
versions will also allow you to store the signals in the XML file.
</para>
</sect1>
<sect1 id="sec-xml-load">
<title>Loading a GstElement from an XML file</title>
<para>
Before an XML file can be loaded, you must create a GstXML object.
A saved XML file can then be loaded with the
gst_xml_parse_file (xml, filename, rootelement) method.
The root element can optionally left NULL. The following code example loads
the previously created XML file and runs it.
</para>
<programlisting>
#include &lt;stdlib.h&gt;
#include &lt;gst/gst.h&gt;
int
main(int argc, char *argv[])
{
GstXML *xml;
GstElement *bin;
gboolean ret;
gst_init (&amp;argc, &amp;argv);
xml = gst_xml_new ();
ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);
bin = gst_xml_get_element (xml, "bin");
g_assert (bin != NULL);
gst_element_set_state (bin, GST_STATE_PLAYING);
while (gst_bin_iterate(GST_BIN(bin)));
gst_element_set_state (bin, GST_STATE_NULL);
exit (0);
}
</programlisting>
<para>
gst_xml_get_element (xml, "name") can be used to get a specific element
from the XML file.
</para>
<para>
gst_xml_get_topelements (xml) can be used to get a list of all toplevel elements
in the XML file.
</para>
<para>
In addition to loading a file, you can also load a from a xmlDocPtr and
an in memory buffer using gst_xml_parse_doc and gst_xml_parse_memory
respectivily. both of these methods return a gboolean indicating success
or failure of the requested action.
</para>
</sect1>
<sect1 id="sec-xml-custom">
<title>Adding custom XML tags into the core XML data</title>
<para>
It is possible to add custom XML tags to the core XML created with
gst_xml_write. This feature can be used by an application to add more
information to the save plugins. the editor will for example insert
the position of the elements on the screen using the custom XML tags.
</para>
<para>
It is strongly suggested to save and load the custom XML tags using
a namespace. This will solve the problem of having your XML tags
interfere with the core XML tags.
</para>
<para>
To insert a hook into the element saving procedure you can connect
a signal to the GstElement using the following piece of code:
</para>
<programlisting>
xmlNsPtr ns;
...
ns = xmlNewNs (NULL, "http://gstreamer.net/gst-test/1.0/", "test");
...
thread = gst_elementfactory_make ("thread", "thread");
g_signal_connect (G_OBJECT (thread), "object_saved",
G_CALLBACK (object_saved), g_strdup ("decoder thread"));
...
</programlisting>
<para>
When the thread is saved, the object_save method will be caled. Our example
will insert a comment tag:
</para>
<programlisting>
static void
object_saved (GstObject *object, xmlNodePtr parent, gpointer data)
{
xmlNodePtr child;
child = xmlNewChild (parent, ns, "comment", NULL);
xmlNewChild (child, ns, "text", (gchar *)data);
}
</programlisting>
<para>
Adding the custom tag code to the above example you will get an XML file
with the custom tags in it. Here's an excerpt:
</para>
<programlisting>
...
&lt;gst:element&gt;
&lt;gst:name&gt;thread&lt;/gst:name&gt;
&lt;gst:type&gt;thread&lt;/gst:type&gt;
&lt;gst:version&gt;0.1.0&lt;/gst:version&gt;
...
&lt;/gst:children&gt;
&lt;test:comment&gt;
&lt;test:text&gt;decoder thread&lt;/test:text&gt;
&lt;/test:comment&gt;
&lt;/gst:element&gt;
...
</programlisting>
<para>
To retrieve the custom XML again, you need to attach a signal to
the GstXML object used to load the XML data. You can then parse your
custom XML from the XML tree whenever an object is loaded.
</para>
<para>
We can extend our previous example with the following piece of
code.
</para>
<programlisting>
xml = gst_xml_new ();
g_signal_connect (G_OBJECT (xml), "object_loaded",
G_CALLBACK (xml_loaded), xml);
ret = gst_xml_parse_file (xml, "xmlTest.gst", NULL);
g_assert (ret == TRUE);
</programlisting>
<para>
Whenever a new object has been loaded, the xml_loaded function will be
called. this function looks like:
</para>
<programlisting>
static void
xml_loaded (GstXML *xml, GstObject *object, xmlNodePtr self, gpointer data)
{
xmlNodePtr children = self-&gt;xmlChildrenNode;
while (children) {
if (!strcmp (children-&gt;name, "comment")) {
xmlNodePtr nodes = children-&gt;xmlChildrenNode;
while (nodes) {
if (!strcmp (nodes-&gt;name, "text")) {
gchar *name = g_strdup (xmlNodeGetContent (nodes));
g_print ("object %s loaded with comment '%s'\n",
gst_object_get_name (object), name);
}
nodes = nodes-&gt;next;
}
}
children = children-&gt;next;
}
}
</programlisting>
<para>
As you can see, you'll get a handle to the GstXML object, the
newly loaded GstObject and the xmlNodePtr that was used to create
this object. In the above example we look for our special tag inside
the XML tree that was used to load the object and we print our
comment to the console.
</para>
</sect1>
</chapter>

View file

@ -1,107 +1,97 @@
# Included by directories containing manuals.
# Expects the following to be defined:
# manualname
# htmlname
# sgml_files
# fig_files
# eps_files
# png_files
PDFFILES=$(manualname).pdf
PSFILES=$(manualname).ps
# taken from selfdocbookx, http://cyberelk.net/tim/docbook/selfdocbookx/index.html
if HAVE_FIG2DEV_PNG
PNGS_TO_MAKE=$(png_files)
else
PNGS_TO_MAKE=
endif
# modified by andy wingo <apwingo@eos.ncsu.edu> 14 dec 2001 for use by gstreamer
$(manualname)/$(htmlname): $(sgml_files) $(PNGS_TO_MAKE)
if HAVE_DB2HTML
db2html $(manualname).sgml
else
@echo "Can't build $@: don't have db2html tool"
endif
all: html ps pdf
$(manualname).pdf: $(manualname).ps
if HAVE_PS2PDF
@if [ -r $< ] ; then ps2pdf $< $@ ; fi
else
@echo "Can't build $@: don't have ps2pdf tool"
endif
if HAVE_XSLTPROC
if HAVE_FIG2DEV_EPS
$(manualname).ps: $(sgml_files) $(eps_files)
else
$(manualname).ps: $(sgml_files)
endif
if HAVE_DB2PS
@if [ -r $< ] ; then db2ps $(manualname).sgml ; fi
else
@echo "Can't build $@: don't have db2ps tool"
endif
if HAVE_FIG2DEV_PNG
html: $(DOC)
else !HAVE_FIG2DEV_PNG
html:
endif !HAVE_FIG2DEV_PNG
images :
mkdir images
if HAVE_FIG2DEV_PDF
if HAVE_PDFXMLTEX
pdf: $(DOC).pdf
if HAVE_FIG2DEV_PNG
images/%.png : %.fig images
fig2dev -L png -s 16 $< $@
endif
if HAVE_PDFTOPS
ps: $(DOC).ps
else !HAVE_PDFTOPS
ps:
endif !HAVE_PDFTOPS
if HAVE_FIG2DEV_EPS
images/%.eps : %.fig images
fig2dev -L eps -s 16 -m 0.5 $< $@
endif
else !HAVE_PDFXMLTEX
pdf:
ps:
endif !HAVE_PDFXMLTEX
$(manualname)/images:
@if [ -d $(manualname) ] ; then \
if [ -d images ] ; then \
ln -sf ../images $(manualname)/images ;\
fi \
fi
else !HAVE_FIG2DEV_PDF
pdf:
ps:
endif !HAVE_FIG2DEV_PDF
htmldocs: $(manualname)/$(htmlname) $(manualname)/images
pdfdocs: $(PDFFILES)
psdocs: $(PSFILES)
else !HAVE_XSLTPROC
html:
ps:
pdf:
endif !HAVE_XSLTPROC
# Data to install, in the usual automake way
docdatadir = $(datadir)/gstreamer
docdata_DATA = $(PDFFILES) $(PSFILES)
$(DOC).fo: $(XML) $(PDFS) $(XSLFO) $(XSLFOMODS)
cp magic-pdf magic
xsltproc $(XSLFO) $(MAIN) > $@-t
mv -f $@-t $@
htmlinst: htmldocs
@if [ -r $(manualname)/$(htmlname) ] ; then \
echo "Installing $(manualname)" ; \
$(mkinstalldirs) $(DESTDIR)$(docdatadir)/$(manualname) ; \
$(mkinstalldirs) $(DESTDIR)$(docdatadir)/$(manualname)/images ; \
$(INSTALL_DATA) $(manualname)/*.html $(DESTDIR)$(docdatadir)/$(manualname) ; \
for a in "x" $(png_files); do \
if [ "x$$a" != "xx" ] ; then \
if [ -r $$a ] ; then \
$(INSTALL_DATA) $$a $(DESTDIR)$(docdatadir)/$(manualname)/images ; \
fi; fi; done \
else \
if [ -r $(srcdir)/$(manualname)/$(htmlname) ] ; then \
echo "Installing $(srcdir)/$(manualname)" ; \
$(mkinstalldirs) $(DESTDIR)$(docdatadir)/$(manualname) ; \
$(mkinstalldirs) $(DESTDIR)$(docdatadir)/$(manualname)/images ; \
$(INSTALL_DATA) $(srcdir)/$(manualname)/*.html $(DESTDIR)$(docdatadir)/$(manualname) ; \
for a in "x" $(png_files); do \
if [ "x$$a" != "xx" ] ; then \
if [ -r $$a ] ; then \
$(INSTALL_DATA) $$a $(DESTDIR)$(docdatadir)/$(manualname)/images ; \
fi; fi; done \
else \
echo "NOT installing HTML documentation: not present, and can't generate" ; \
fi \
fi
$(DOC).pdf: $(DOC).fo
pdfxmltex $<
pdfxmltex $<
htmluninst:
$(RM) -rf $(DESTDIR)$(docdatadir)/$(manualname)
$(DOC).ps: $(DOC).pdf
pdftops $< $@
all-local: htmldocs pdfdocs psdocs
clean-local:
$(RM) -rf $(manualname)/ $(manualname).junk/ images/*.eps images/*.png *.eps *.png *.ps *.pdf *.aux *.dvi *.log *.tex DBTOHTML_OUTPUT_DIR*
install-data-local: htmlinst
uninstall-local: htmluninst
$(DOC): $(XML) $(PNGS) $(XSLHTML) $(XSLHTMLMODS)
-$(RM) *.html
-$(RM) -r $@
mkdir $@
cp magic-png magic
xsltproc $(XSLHTML) $(MAIN)
mv *.html $@
cp $(CSS) $@
test "x$(PNGS)" != "x" && mkdir $@/images && cp $(PNGS) $@/images || true
builddate:
echo -n $$(date "+%e %B %Y") > $@
clean:
-$(RM) -f *.log *.dvi *.aux *.tex *.out *-t
-$(RM) -f $(PNGS) $(PDFS) builddate *.html
-$(RM) -rf $(DOC) $(DOC).ps $(DOC).pdf $(DOC).fo
distclean: clean
-$(RM) -f *~ $(DOC).tar.gz docbook.tar.gz
# -$(RM) -r docbook
$(DOC).tar.gz: distclean
(cd ..; tar zcf /tmp/$(DOC).tar.gz $(DOC) )
mv /tmp/$(DOC).tar.gz .
#docbook: $(DOC).tar.gz all
# -$(RM) -r $@
# mkdir $@
# cp $(DOC).tar.gz $(DOC).ps $(DOC).pdf $@
# tar cf - $(DOC) | (cd $@; tar xf -)
#docbook.tar.gz: docbook
# tar zcf docbook.tar.gz docbook
# Make png from xfig
%.png: %.fig
fig2dev -Lpng $< $@
# Make pdf from xfig
%.pdf: %.fig
fig2dev -Lpdf $< $@
.PHONY: distclean clean all builddate

View file

@ -49,7 +49,6 @@ sgml/$(DOC_MODULE)-doc.bottom: $(tmpl_sources)
scanobj:
env CC="$(LIBTOOL) $(CC)" CFLAGS="$(LIBGST_CFLAGS) $(GLIB_CFLAGS) $(XML_CFLAGS) -I../../" LDFLAGS="$(GST_LIBS)"\
./gstdoc-scanobj --module=$(DOC_MODULE)
tmpl: scanobj
./gstdoc-mktmpl --module=$(DOC_MODULE)

View file

@ -16,8 +16,8 @@ libgsteditor_la_SOURCES = \
gstelementselect.c \
gsteditorcreate.c
libgsteditor_la_CFLAGS = -DDATADIR="\"$(gladedir)/\"" $(GNOME_CFLAGS) $(LIBGLADE_GNOME_CFLAGS)
libgsteditor_la_LIBADD = $(GNOME_LIBS) $(LIBGLADE_GNOME_LIBS)
libgsteditor_la_CFLAGS = -DDATADIR="\"$(gladedir)/\"" $(GNOME_CFLAGS) $(LIBGLADE_GNOME_CFLAGS) $(GST_CFLAGS)
libgsteditor_la_LDFLAGS = $(GNOME_LIBS) $(LIBGLADE_GNOME_LIBS)
libgsteditorincludedir = $(includedir)/gst
libgsteditorinclude_HEADERS = \
@ -25,9 +25,8 @@ libgsteditorinclude_HEADERS = \
bin_PROGRAMS = gsteditor
gsteditor_SOURCES = editor.c
gsteditor_CFLAGS = $(GST_CFLAGS) $(GNOME_CFLAGS) $(LIBGLADE_GNOME_CFLAGS)
gsteditor_LDADD = $(GST_LIBS) $(GNOME_LIBS) $(LIBGLADE_GNOME_LIBS) libgsteditor.la
gsteditor_LDFLAGS = libgsteditor.la $(GST_LIBS) $(LIBGLADE_GNOME_LIBS)
gsteditor_CFLAGS = $(LIBGLADE_GNOME_CFLAGS) $(GST_CFLAGS) -DDATADIR=\""$(gladedir)/"\"
man_MANS = gsteditor.1

View file

@ -36,8 +36,8 @@ enum {
static void gst_editor_bin_class_init (GstEditorBinClass *klass);
static void gst_editor_bin_init (GstEditorBin *bin);
//static void gst_editor_bin_set_arg(GtkObject *object,GtkArg *arg,guint id);
//static void gst_editor_bin_get_arg(GtkObject *object,GtkArg *arg,guint id);
/* static void gst_editor_bin_set_arg(GtkObject *object,GtkArg *arg,guint id); */
/* static void gst_editor_bin_get_arg(GtkObject *object,GtkArg *arg,guint id); */
static void gst_editor_bin_realize (GstEditorElement *bin);
static void gst_editor_bin_repack (GstEditorBin *bin);
@ -187,13 +187,13 @@ gst_editor_bin_event(GnomeCanvasItem *item,
{
GstEditorBin *bin = GST_EDITOR_BIN(element);
// g_print("bin got %d event at %.2fx%.2f\n",event->type,
// event->button.x,event->button.y);
/* g_print("bin got %d event at %.2fx%.2f\n",event->type, */
/* event->button.x,event->button.y); */
switch (event->type) {
case GDK_BUTTON_RELEASE:
if (bin->connecting) {
// g_print("bin got release event during drag\n");
/* g_print("bin got release event during drag\n"); */
gnome_canvas_item_ungrab(
GNOME_CANVAS_ITEM(element->group),
event->button.time);
@ -206,8 +206,8 @@ gst_editor_bin_event(GnomeCanvasItem *item,
bin->connection = NULL;
}
bin->connecting = FALSE;
//g_print("in bin, setting inchild for button release\n");
//element->canvas->inchild = TRUE;
/* g_print("in bin, setting inchild for button release\n"); */
/* element->canvas->inchild = TRUE; */
return TRUE;
}
break;
@ -215,8 +215,8 @@ gst_editor_bin_event(GnomeCanvasItem *item,
if (bin->connecting) {
gdouble x,y;
x = event->button.x;y = event->button.y;
// g_print("bin has motion during connection draw at %.2fx%.2f\n",
// x,y);
/* g_print("bin has motion during connection draw at %.2fx%.2f\n", */
/* x,y); */
gst_editor_bin_connection_drag(bin,x,y);
return TRUE;
}
@ -241,7 +241,7 @@ gst_editor_bin_button_event(GnomeCanvasItem *item,
GstEditorElement *newelement;
GdkEventButton *buttonevent;
// g_print("bin got button event\n");
/* g_print("bin got button event\n"); */
if (event->type != GDK_BUTTON_RELEASE) return FALSE;
@ -250,8 +250,8 @@ gst_editor_bin_button_event(GnomeCanvasItem *item,
if (buttonevent->button != 1) return FALSE;
gnome_canvas_item_w2i(item,&event->button.x,&event->button.y);
// g_print("calling gst_editor_create_item(,%.2f,%.2f)\n",
// event->button.x,event->button.y);
/* g_print("calling gst_editor_create_item(,%.2f,%.2f)\n", */
/* event->button.x,event->button.y); */
newelement = gst_editor_create_item(event->button.x,event->button.y);
if (newelement != NULL) {
GstEditorElementClass *elementclass;
@ -273,7 +273,7 @@ gst_editor_bin_start_banding (GstEditorBin *bin,GstEditorPad *pad)
{
GdkCursor *cursor;
// g_print("starting to band\n");
/* g_print("starting to band\n"); */
g_return_if_fail(GST_IS_EDITOR_PAD(pad));
@ -304,7 +304,7 @@ gst_editor_bin_connection_drag (GstEditorBin *bin,
bx = wx;by = wy;
gnome_canvas_item_w2i(GNOME_CANVAS_ITEM(GST_EDITOR_ELEMENT(bin)->group),&bx,&by);
// first see if we're on top of an interesting pad
/* first see if we're on top of an interesting pad */
underitem = gnome_canvas_get_item_at(
&GST_EDITOR_ELEMENT(bin)->canvas->canvas,wx,wy);
if (underitem != NULL)

View file

@ -42,7 +42,7 @@ static void gst_editor_canvas_get_arg (GtkObject *object,GtkArg *arg,guint id);
static void gst_editor_canvas_realize (GtkWidget *widget);
//gint gst_editor_canvas_verbose_event(GtkWidget *widget,GdkEvent *event);
/* gint gst_editor_canvas_verbose_event(GtkWidget *widget,GdkEvent *event); */
static GstEditorBinClass *parent_class = NULL;

View file

@ -16,9 +16,9 @@ static void gst_editor_connection_destroy (GtkObject *object);
static void gst_editor_connection_realize (GstEditorConnection *connection);
/* events fired by items within self */
//static gint gst_editor_connection_line_event(GnomeCanvasItem *item,
// GdkEvent *event,
// GstEditorConnection *connection);
/* static gint gst_editor_connection_line_event(GnomeCanvasItem *item, */
/* GdkEvent *event, */
/* GstEditorConnection *connection); */
/* utility functions */
@ -37,7 +37,7 @@ enum {
};
static GtkObjectClass *parent_class;
//static guint gst_editor_connection_signals[LAST_SIGNAL] = { 0 };
/* static guint gst_editor_connection_signals[LAST_SIGNAL] = { 0 }; */
GtkType
gst_editor_connection_get_type (void)
@ -215,8 +215,8 @@ gst_editor_connection_resize (GstEditorConnection *connection)
if (connection->resize != TRUE) return;
connection->resize = FALSE;
// g_print("resizing connection, frompad is %p, topad is %p\n",
// connection->frompad,connection->topad);
/* g_print("resizing connection, frompad is %p, topad is %p\n", */
/* connection->frompad,connection->topad); */
/* calculate the new endpoints */
if (connection->topad == NULL) {
@ -283,10 +283,10 @@ void
gst_editor_connection_set_endpad (GstEditorConnection *connection,
GstEditorPad *pad)
{
// first check for the trivial case
/* first check for the trivial case */
if (connection->topad == pad) return;
// now clean up if we've changed pads
/* now clean up if we've changed pads */
if (connection->topad) {
if (connection->ghost)
connection->topad->ghostconnection = NULL;

View file

@ -35,21 +35,21 @@ gst_editor_create_item(gdouble x,gdouble y)
factory = element_select_dialog();
if (factory) {
// g_print("got factory \"%s\"\n",factory->name);
/* g_print("got factory \"%s\"\n",factory->name); */
element = gst_elementfactory_create(factory, GST_OBJECT_NAME (factory));
if (element) {
if (GST_IS_BIN(element)) {
// g_print("factory is a bin\n");
/* g_print("factory is a bin\n"); */
editorelement = GST_EDITOR_ELEMENT(gst_editor_bin_new(
GST_BIN(element), "x",x,"y",y,"width",50.0,"height",20.0,NULL));
} else {
// g_print("factory is an element\n");
/* g_print("factory is an element\n"); */
editorelement = gst_editor_element_new(element,
"x",x,"y",y,"width",50.0,"height",20.0,NULL);
}
// g_print("created element \"%s\" at %.2fx%.2f\n",
// gst_object_get_name(GST_OBJECT(element)),
// x,y);
/* g_print("created element \"%s\" at %.2fx%.2f\n", */
/* gst_object_get_name(GST_OBJECT(element)), */
/* x,y); */
return editorelement;
}
}

View file

@ -236,7 +236,7 @@ gst_editor_element_construct (GstEditorElement *element,
GSList *arg_list = NULL, *info_list = NULL;
gchar *error;
// g_print("in gst_editor_element_construct()\n");
/* g_print("in gst_editor_element_construct()\n"); */
error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
&info_list,first_arg_name,args);
@ -245,7 +245,7 @@ gst_editor_element_construct (GstEditorElement *element,
g_free(error);
} else {
GSList *arg,*info;
// g_print("setting all the arguments on the element\n");
/* g_print("setting all the arguments on the element\n"); */
for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
gtk_object_arg_set(obj,arg->data,info->data);
gtk_args_collect_cleanup(arg_list,info_list);
@ -284,12 +284,12 @@ gst_editor_element_set_arg (GtkObject *object, GtkArg *arg, guint id)
element->resize = TRUE;
break;
case ARG_X2:
// make sure it's big enough, grow if not
/* make sure it's big enough, grow if not */
element->width = MAX(GTK_VALUE_DOUBLE(*arg),element->minwidth);
element->resize = TRUE;
break;
case ARG_Y2:
// make sure it's big enough, grow if not
/* make sure it's big enough, grow if not */
element->height = MAX(GTK_VALUE_DOUBLE(*arg),element->minheight);
element->resize = TRUE;
break;
@ -371,12 +371,12 @@ gst_editor_element_realize (GstEditorElement *element)
gdouble x1,y1,x2,y2;
GList *pads;
// g_print("realizing editor element %p\n",element);
/* g_print("realizing editor element %p\n",element); */
/* we have to have a parent by this point */
g_return_if_fail(element->parent != NULL);
// set the state signal of the actual element
/* set the state signal of the actual element */
gtk_signal_connect_object (GTK_OBJECT(element->element),"state_change",
GTK_SIGNAL_FUNC(gst_editor_element_sync_state_wrapper),
GTK_OBJECT (element));
@ -389,9 +389,10 @@ gst_editor_element_realize (GstEditorElement *element)
GTK_SIGNAL_FUNC(gst_editor_element_position_changed),
GTK_OBJECT (element));
// create the bounds if we haven't had them set
// g_print("centering element at %.2fx%.2f (%.2fx%.2f)\n",
// element->x,element->y,element->width,element->height);
/* create the bounds if we haven't had them set */
/* g_print("centering element at %.2fx%.2f (%.2fx%.2f)\n", */
/* element->x,element->y,element->width,element->height); */
/* create the group holding all the stuff for this element */
parentgroup = GST_EDITOR_ELEMENT(element->parent)->group;
@ -399,15 +400,15 @@ gst_editor_element_realize (GstEditorElement *element)
gnome_canvas_group_get_type(),
"x",element->x - (element->width / 2.0),
"y",element->y - (element->height / 2.0),NULL));
// g_print("origin of group is %.2fx%.2f\n",
// element->x - (element->width / 2.0),
// element->y - (element->height / 2.0));
/* g_print("origin of group is %.2fx%.2f\n", */
/* element->x - (element->width / 2.0), */
/* element->y - (element->height / 2.0)); */
g_return_if_fail(element->group != NULL);
GST_EDITOR_SET_OBJECT(element->group,element);
gtk_signal_connect(GTK_OBJECT(element->group),"event",
GTK_SIGNAL_FUNC(gst_editor_element_group_event),element);
// calculate the inter-group coords (x1,y1,x2,y2 are convenience vars)
/* calculate the inter-group coords (x1,y1,x2,y2 are convenience vars) */
x1 = 0.0;y1 = 0.0;
x2 = element->width;y2 = element->height;
@ -465,7 +466,7 @@ gst_editor_element_realize (GstEditorElement *element)
GINT_TO_POINTER(i));
}
// get all the padtemplates
/* get all the padtemplates */
pads = gst_element_get_padtemplate_list(element->element);
while (pads) {
GstPadTemplate *temp = (GstPadTemplate *) pads->data;
@ -475,7 +476,7 @@ gst_editor_element_realize (GstEditorElement *element)
pads = g_list_next(pads);
}
// get all the pads
/* get all the pads */
pads = gst_element_get_pad_list(element->element);
while (pads) {
GstPad *pad = GST_PAD(pads->data);
@ -487,18 +488,18 @@ gst_editor_element_realize (GstEditorElement *element)
element->realized = TRUE;
// force a resize
/* force a resize */
element->resize = TRUE;
gst_editor_element_resize(element);
// recenter things on the supposed center
// g_print("recentering element at %.2fx%.2f (%.2fx%.2f)\n",
// element->x,element->y,element->width,element->height);
/* recenter things on the supposed center */
/* g_print("recentering element at %.2fx%.2f (%.2fx%.2f)\n", */
/* element->x,element->y,element->width,element->height); */
element->x -= (element->width / 2.0);
element->y -= (element->height / 2.0);
gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->group),
"x",element->x,"y",element->y,NULL);
// g_print("origin of group is %.2fx%.2f\n",element->x,element->y);
/* g_print("origin of group is %.2fx%.2f\n",element->x,element->y); */
gst_editor_element_repack(element);
}
@ -517,12 +518,12 @@ gst_editor_element_resize (GstEditorElement *element)
if (element->resize != TRUE) return;
element->resize = FALSE;
// g_print("resizing element\n");
/* g_print("resizing element\n"); */
element->minwidth = element->insidewidth;
element->minheight = element->insideheight;
// get the text size and add it into minsize
/* get the text size and add it into minsize */
g_return_if_fail(element->title != NULL);
itemwidth = gst_util_get_double_arg(GTK_OBJECT(element->title),
"text_width") + 2.0;
@ -534,8 +535,8 @@ gst_editor_element_resize (GstEditorElement *element)
element->minwidth = MAX(element->minwidth,itemwidth);
element->minheight += itemheight;
// now do the bottom bar
// find the biggest of the state chars
/* now do the bottom bar */
/* find the biggest of the state chars */
element->statewidth = 0.0;element->stateheight = 0.0;
for (i=0;i<4;i++) {
g_return_if_fail(element->statetext[i] != NULL);
@ -546,17 +547,17 @@ gst_editor_element_resize (GstEditorElement *element)
element->statewidth = MAX(element->statewidth,itemwidth);
element->stateheight = MAX(element->stateheight,itemheight);
}
// calculate the size of the primary group
groupwidth = element->statewidth * 5; // 4 states plus playstate
/* calculate the size of the primary group */
groupwidth = element->statewidth * 5; /* 4 states plus playstate */
groupheight = element->stateheight;
// add in the resize box
groupwidth += 7.0; // 2.0 for buffer, 5.0 for actual size
/* add in the resize box */
groupwidth += 7.0; /* 2.0 for buffer, 5.0 for actual size */
groupheight = MAX(groupheight,5.0);
// update the minsize
/* update the minsize */
element->minwidth = MAX(element->minwidth,groupwidth);
element->minheight += groupheight;
// now go and try to calculate necessary space for the pads
/* now go and try to calculate necessary space for the pads */
element->sinkwidth = 10.0;element->sinkheight = 0.0;element->sinks = 0;
pads = element->sinkpads;
while (pads) {
@ -591,23 +592,23 @@ gst_editor_element_resize (GstEditorElement *element)
element->srcs++;
pads = g_list_next(pads);
}
// add in the needed space
/* add in the needed space */
element->minheight += MAX((element->sinkheight*element->sinks),
(element->srcheight*element->srcs)) + 4.0;
element->minwidth = MAX(element->minwidth,
((element->sinkwidth) +
(element->srcwidth) + 4.0));
// g_print("have %d sinks (%.2fx%.2f) and %d srcs (%.2fx%.2f)\n",
// element->sinks,element->sinkwidth,element->sinkheight,
// element->srcs,element->srcwidth,element->srcheight);
/* g_print("have %d sinks (%.2fx%.2f) and %d srcs (%.2fx%.2f)\n", */
/* element->sinks,element->sinkwidth,element->sinkheight, */
/* element->srcs,element->srcwidth,element->srcheight); */
// grow the element to hold all the stuff
// g_print("minsize is %.2fx%.2f,
//",element->minwidth,element->minheight);
// g_print("size was %.2fx%.2f, ",element->width,element->height);
/* grow the element to hold all the stuff */
/* g_print("minsize is %.2fx%.2f, */
/*",element->minwidth,element->minheight); */
/* g_print("size was %.2fx%.2f, ",element->width,element->height); */
element->width = MAX(element->width,element->minwidth);
element->height = MAX(element->height,element->minheight);
// g_print("is now %.2fx%.2f\n",element->width,element->height);
/* g_print("is now %.2fx%.2f\n",element->width,element->height); */
gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[SIZE_CHANGED], element);
}
@ -627,35 +628,35 @@ gst_editor_element_repack (GstEditorElement *element)
gst_editor_element_resize(element);
// still use x1,y1,x2,y2 so we can change around later
/* still use x1,y1,x2,y2 so we can change around later */
x1 = 0.0;y1 = 0.0;
x2 = element->width;y2 = element->height;
// g_print("repacking element at %.2fx%.2f + %.2fx%.2f\n",
// element->x,element->y,x2,y2);
/* g_print("repacking element at %.2fx%.2f + %.2fx%.2f\n", */
/* element->x,element->y,x2,y2); */
// move the element group to match
/* move the element group to match */
gnome_canvas_item_set(GNOME_CANVAS_ITEM(element->group),
"x",element->x,"y",element->y,NULL);
// start by resizing the bordering box
/* start by resizing the bordering box */
g_return_if_fail(element->border != NULL);
gtk_object_set(GTK_OBJECT(element->border),
"x1",x1,"y1",y1,"x2",x2,"y2",y2,NULL);
// then move the text to the new top left
/* then move the text to the new top left */
g_return_if_fail(element->title != NULL);
gtk_object_set(GTK_OBJECT(element->title),
"x",x1+1.0,"y",y1+1.0,
"anchor",GTK_ANCHOR_NORTH_WEST,
NULL);
// and move the resize box
/* and move the resize box */
g_return_if_fail(element->resizebox != NULL);
gtk_object_set(GTK_OBJECT(element->resizebox),
"x1",x2-5.0,"y1",y2-5.0,"x2",x2,"y2",y2,NULL);
// now place the state boxes
/* now place the state boxes */
for (i=0;i<4;i++) {
g_return_if_fail(element->statebox[i] != NULL);
gtk_object_set(GTK_OBJECT(element->statebox[i]),
@ -670,7 +671,7 @@ gst_editor_element_repack (GstEditorElement *element)
}
gst_editor_element_sync_state(element);
// now we try to place all the pads
/* now we try to place all the pads */
sinks = element->sinks;
pads = element->sinkpads;
while (pads) {
@ -724,7 +725,7 @@ gst_editor_element_repack (GstEditorElement *element)
}
gtk_signal_emit(GTK_OBJECT(element),gst_editor_element_signals[SIZE_CHANGED], element);
// g_print("done resizing element\n");
/* g_print("done resizing element\n"); */
}
static void
@ -746,15 +747,15 @@ gst_editor_element_add_pad_func (GstEditorElement *element,
editorpad = gst_editor_pad_new (element, pad, NULL);
// FIXME does this need to check for ghost/real?
/* FIXME does this need to check for ghost/real? */
if (GST_PAD_DIRECTION(pad) == GST_PAD_SINK) {
element->sinkpads = g_list_prepend(element->sinkpads,editorpad);
element->sinks++;
// g_print("added 'new' pad to sink list\n");
/* g_print("added 'new' pad to sink list\n"); */
} else if (GST_PAD_DIRECTION(pad) == GST_PAD_SRC) {
element->srcpads = g_list_prepend(element->srcpads,editorpad);
element->srcs++;
// g_print("added 'new' pad to src list\n");
/* g_print("added 'new' pad to src list\n"); */
} else
g_print("HUH?!? Don't know which direction this pad is...\n");
@ -772,7 +773,7 @@ gst_editor_element_add_pad (GstEditorElement *element,
gst_editor_element_add_pad_func (element,pad);
}
else {
// find the template
/* find the template */
GList *temppads;
temppads = element->sinkpadtemps;
@ -811,9 +812,9 @@ gst_editor_element_add_padtemplate (GstEditorElement *element,
if (pad->direction == GST_PAD_SINK) {
element->sinkpadtemps = g_list_prepend(element->sinkpadtemps,editorpad);
element->sinks++;
// g_print("added 'new' pad to sink list\n");
/* g_print("added 'new' pad to sink list\n"); */
} else if (pad->direction == GST_PAD_SRC) {
// g_print("added 'new' pad to src list\n");
/* g_print("added 'new' pad to src list\n"); */
element->srcpadtemps = g_list_prepend(element->srcpadtemps,editorpad);
element->srcs++;
} else
@ -851,7 +852,7 @@ gst_editor_element_event(GnomeCanvasItem *item,
gdouble dx,dy;
GdkCursor *fleur;
// g_print("element in event, type %d\n",event->type);
/* g_print("element in event, type %d\n",event->type); */
switch(event->type) {
case GDK_ENTER_NOTIFY:
@ -871,17 +872,17 @@ gst_editor_element_event(GnomeCanvasItem *item,
return TRUE;
}
else {
// dragxy coords are world coords of button press
/* dragxy coords are world coords of button press */
element->dragx = event->button.x;
element->dragy = event->button.y;
// set some flags
/* set some flags */
element->dragging = TRUE;
element->moved = FALSE;
fleur = gdk_cursor_new (GDK_FLEUR);
gnome_canvas_item_grab(item,
GDK_POINTER_MOTION_MASK |
// GDK_ENTER_NOTIFY_MASK |
// GDK_LEAVE_NOTIFY_MASK |
/* GDK_ENTER_NOTIFY_MASK | */
/* GDK_LEAVE_NOTIFY_MASK | */
GDK_BUTTON_RELEASE_MASK,
fleur,event->button.time);
return TRUE;
@ -908,8 +909,8 @@ gst_editor_element_event(GnomeCanvasItem *item,
if (elementclass->button_event)
(elementclass->button_event)(item,event,element);
}
//g_print("in element group_event, setting inchild");
//element->canvas->inchild = TRUE;
/* g_print("in element group_event, setting inchild"); */
/* element->canvas->inchild = TRUE; */
return TRUE;
default:
@ -927,9 +928,9 @@ gst_editor_element_resizebox_event (GnomeCanvasItem *item,
GdkCursor *bottomright;
gdouble item_x,item_y;
// g_print("in resizebox_event...\n");
/* g_print("in resizebox_event...\n"); */
// calculate coords relative to the group, not the box
/* calculate coords relative to the group, not the box */
item_x = event->button.x;
item_y = event->button.y;
gnome_canvas_item_w2i(item->parent,&item_x,&item_y);
@ -962,8 +963,8 @@ gst_editor_element_resizebox_event (GnomeCanvasItem *item,
break;
case GDK_MOTION_NOTIFY:
if (element->resizing) {
// doing a set because the code is in the arg set code
// g_print("resizing to x2,y2 of %.2f,%.2f\n",item_x,item_y);
/* doing a set because the code is in the arg set code */
/* g_print("resizing to x2,y2 of %.2f,%.2f\n",item_x,item_y); */
gtk_object_set(GTK_OBJECT(element),"x2",item_x,"y2",item_y,NULL);
element->resize = TRUE;
gst_editor_element_repack(element);
@ -974,8 +975,8 @@ gst_editor_element_resizebox_event (GnomeCanvasItem *item,
if (element->resizing) {
element->resizing = FALSE;
gnome_canvas_item_ungrab(item,event->button.time);
//g_print("in element resizebox_event, setting inchild");
//element->canvas->inchild = TRUE;
/* g_print("in element resizebox_event, setting inchild"); */
/* element->canvas->inchild = TRUE; */
return TRUE;
}
break;
@ -1032,8 +1033,8 @@ gst_editor_element_state_event(GnomeCanvasItem *item,
gdk_threads_enter ();
} else
g_warning("Uh, shouldn't have gotten here, unknown state\n");
//g_print("in element statebox_event, setting inchild");
//element->canvas->inchild = TRUE;
/* g_print("in element statebox_event, setting inchild"); */
/* element->canvas->inchild = TRUE; */
return TRUE;
}
default:
@ -1048,7 +1049,7 @@ gst_editor_element_set_state(GstEditorElement *element,
gint id,gboolean set)
{
gboolean stateset = TRUE; /* if we have no element, set anyway */
//g_print("element set state %d\n", id);
/* g_print("element set state %d\n", id); */
if (element->element)
stateset = gst_element_set_state(element->element,_gst_element_states[id]);
}
@ -1096,7 +1097,7 @@ static void
gst_editor_element_move(GstEditorElement *element,
gdouble dx,gdouble dy)
{
// this is a 'little' trick to keep from repacking the whole thing...
/* this is a 'little' trick to keep from repacking the whole thing... */
element->x += dx;element->y += dy;
gnome_canvas_item_move(GNOME_CANVAS_ITEM(element->group),dx,dy);

View file

@ -33,9 +33,9 @@ static void gst_editor_pad_realize(GstEditorPad *pad);
static void gst_editor_pad_position_changed(GstEditorPad *pad, GstEditorElement *element);
/* class implementation functions */
//static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine,
// ArtSVP *clip_path,int flags);
//static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event);
/* static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine, */
/* ArtSVP *clip_path,int flags); */
/* static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event); */
/* events fired by items within self */
static gint gst_editor_pad_padbox_event(GnomeCanvasItem *item,
@ -60,7 +60,7 @@ enum {
};
static GtkObjectClass *parent_class;
//static guint gst_editor_pad_signals[LAST_SIGNAL] = { 0 };
/* static guint gst_editor_pad_signals[LAST_SIGNAL] = { 0 }; */
GtkType
gst_editor_pad_get_type (void)
@ -138,7 +138,7 @@ gst_editor_pad_new(GstEditorElement *parent,GstPad *pad,
GstPad *peerpad;
GstEditorPad *peereditorpad;
// FIXME does this need to check for ghost/real?
/* FIXME does this need to check for ghost/real? */
peerpad = gst_pad_get_peer (pad);
peereditorpad = GST_EDITOR_GET_OBJECT (peerpad);
@ -167,7 +167,7 @@ gst_editor_pad_construct(GstEditorPad *pad,
gchar *error;
GstEditorPadClass *padclass;
// g_print("in gst_editor_pad_construct()\n");
/* g_print("in gst_editor_pad_construct()\n"); */
error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
&info_list,first_arg_name,args);
@ -176,7 +176,7 @@ gst_editor_pad_construct(GstEditorPad *pad,
g_free(error);
} else {
GSList *arg,*info;
// g_print("setting all the arguments on the pad\n");
/* g_print("setting all the arguments on the pad\n"); */
for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
gtk_object_arg_set(obj,arg->data,info->data);
gtk_args_collect_cleanup(arg_list,info_list);
@ -252,7 +252,7 @@ gst_editor_pad_get_arg (GtkObject *object,GtkArg *arg,guint id)
static void
gst_editor_pad_realize (GstEditorPad *pad)
{
// g_print("realizing editor pad %p\n",pad);
/* g_print("realizing editor pad %p\n",pad); */
/* we must be attached to an element */
g_return_if_fail(pad->parent != NULL);
@ -271,7 +271,7 @@ gst_editor_pad_realize (GstEditorPad *pad)
GST_EDITOR_SET_OBJECT(pad->border,pad);
/* create the pad box on the correct side */
// FIXME does this need to check for ghost/real?
/* FIXME does this need to check for ghost/real? */
pad->issrc = (GST_PAD_DIRECTION(pad->pad) == GST_PAD_SRC);
if (pad->issrc)
pad->padbox = gnome_canvas_item_new(pad->group,
@ -309,7 +309,7 @@ gst_editor_pad_resize (GstEditorPad *pad)
{
gdouble minwidth,minheight;
// g_print("resizing pad\n");
/* g_print("resizing pad\n"); */
minwidth = 0;minheight = 0;
@ -329,7 +329,7 @@ gst_editor_pad_resize (GstEditorPad *pad)
pad->height = MAX(pad->height,minheight);
/* update the connection if there is one */
// g_print("connection is %p\n",pad->connection);
/* g_print("connection is %p\n",pad->connection); */
if (pad->connection != NULL)
gst_editor_connection_resize(pad->connection);
}
@ -345,7 +345,7 @@ gst_editor_pad_repack (GstEditorPad *pad)
x1 = 0;y1 = 0;
x2 = x1 + pad->width;y2 = y1 + pad->height;
// g_print("repacking pad at %.2fx%.2f - %.2fx%.2f\n",x1,y1,x2,y2);
/* g_print("repacking pad at %.2fx%.2f - %.2fx%.2f\n",x1,y1,x2,y2); */
/* move the group */
gtk_object_set(GTK_OBJECT(pad->group),"x",pad->x,"y",pad->y,NULL);
@ -399,10 +399,10 @@ static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event) {
switch(event->type) {
case GDK_ENTER_NOTIFY:
// g_print("entered pad\n");
/* g_print("entered pad\n"); */
break;
case GDK_LEAVE_NOTIFY:
// g_print("left pad\n");
/* g_print("left pad\n"); */
break;
default:
break;
@ -420,7 +420,7 @@ gst_editor_pad_padbox_event(GnomeCanvasItem *item,
GstEditorElement *element;
GstEditorBin *bin;
// g_print("padbox has event %d\n",event->type);
/* g_print("padbox has event %d\n",event->type); */
g_return_val_if_fail(GST_IS_EDITOR_PAD(pad), FALSE);
element = pad->parent;
@ -436,13 +436,13 @@ gst_editor_pad_padbox_event(GnomeCanvasItem *item,
"fill_color_rgba", 0xCCFFCC00, NULL);
break;
case GDK_BUTTON_PRESS:
// g_print("have button press in pad '%s'\n",
// gst_pad_get_name(pad->pad));
/* g_print("have button press in pad '%s'\n", */
/* gst_pad_get_name(pad->pad)); */
gst_editor_bin_start_banding(bin,pad);
return TRUE;
break;
case GDK_MOTION_NOTIFY:
// g_print("have motion in pad\n");
/* g_print("have motion in pad\n"); */
break;
default:
break;

View file

@ -31,9 +31,9 @@ static void gst_editor_padtemplate_get_arg(GtkObject *object,GtkArg *arg,guint i
static void gst_editor_padtemplate_realize(GstEditorPadTemplate *padtemplate);
/* class implementation functions */
//static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine,
// ArtSVP *clip_path,int flags);
//static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event);
/* static void gst_editor_pad_update(GnomeCanvasItem *item,double *affine, */
/* ArtSVP *clip_path,int flags); */
/* static gint gst_editor_pad_event(GnomeCanvasItem *item,GdkEvent *event); */
/* events fired by items within self */
static gint gst_editor_padtemplate_padbox_event(GnomeCanvasItem *item,
@ -58,7 +58,7 @@ enum {
};
static GtkObjectClass *parent_class;
//static guint gst_editor_padtemplate_signals[LAST_SIGNAL] = { 0 };
/* static guint gst_editor_padtemplate_signals[LAST_SIGNAL] = { 0 }; */
GtkType
gst_editor_padtemplate_get_type (void)
@ -126,7 +126,7 @@ gst_editor_padtemplate_new (GstEditorElement *parent,
editorpadtemplate = GST_EDITOR_PADTEMPLATE(gtk_type_new(GST_TYPE_EDITOR_PADTEMPLATE));
editorpadtemplate->padtemplate = padtemplate;
//GST_EDITOR_SET_OBJECT(padtemplate, editorpadtemplate);
/* GST_EDITOR_SET_OBJECT(padtemplate, editorpadtemplate); */
va_start(args,first_arg_name);
gst_editor_padtemplate_construct(editorpadtemplate,parent,first_arg_name,args);
@ -145,7 +145,7 @@ gst_editor_padtemplate_construct (GstEditorPadTemplate *padtemplate,
gchar *error;
GstEditorPadTemplateClass *padtemplateclass;
// g_print("in gst_editor_padtemplate_construct()\n");
/* g_print("in gst_editor_padtemplate_construct()\n"); */
error = gtk_object_args_collect(GTK_OBJECT_TYPE(obj),&arg_list,
&info_list,first_arg_name,args);
@ -154,7 +154,7 @@ gst_editor_padtemplate_construct (GstEditorPadTemplate *padtemplate,
g_free(error);
} else {
GSList *arg,*info;
// g_print("setting all the arguments on the padtemplate\n");
/* g_print("setting all the arguments on the padtemplate\n"); */
for (arg=arg_list,info=info_list;arg;arg=arg->next,info=info->next)
gtk_object_arg_set(obj,arg->data,info->data);
gtk_args_collect_cleanup(arg_list,info_list);
@ -298,7 +298,7 @@ gst_editor_padtemplate_resize (GstEditorPadTemplate *padtemplate)
{
gdouble minwidth,minheight;
// g_print("resizing padtemplate\n");
/* g_print("resizing padtemplate\n"); */
minwidth = 0;minheight = 0;
@ -318,7 +318,7 @@ gst_editor_padtemplate_resize (GstEditorPadTemplate *padtemplate)
padtemplate->height = MAX(padtemplate->height,minheight);
/* update the connection if there is one */
// g_print("connection is %p\n",padtemplate->connection);
/* g_print("connection is %p\n",padtemplate->connection); */
if (padtemplate->connection != NULL)
gst_editor_connection_resize(padtemplate->connection);
}
@ -335,7 +335,7 @@ gst_editor_padtemplate_repack (GstEditorPadTemplate *padtemplate)
x1 = 0;y1 = 0;
x2 = x1 + padtemplate->width;y2 = y1 + padtemplate->height;
// g_print("repacking padtemplate at %.2fx%.2f %.2fx%.2f - %.2fx%.2f\n",padtemplate->x, padtemplate->y,x1,y1,x2,y2);
/* g_print("repacking padtemplate at %.2fx%.2f %.2fx%.2f - %.2fx%.2f\n",padtemplate->x, padtemplate->y,x1,y1,x2,y2); */
/* move the group */
gtk_object_set(GTK_OBJECT(padtemplate->group),"x",padtemplate->x,"y",padtemplate->y,NULL);
@ -404,10 +404,10 @@ static gint gst_editor_padtemplate_event(GnomeCanvasItem *item,GdkEvent *event)
switch(event->type) {
case GDK_ENTER_NOTIFY:
// g_print("entered padtemplate\n");
/* g_print("entered padtemplate\n"); */
break;
case GDK_LEAVE_NOTIFY:
// g_print("left padtemplate\n");
/* g_print("left padtemplate\n"); */
break;
default:
break;
@ -425,7 +425,7 @@ gst_editor_padtemplate_padbox_event(GnomeCanvasItem *item,
GstEditorElement *element;
GstEditorBin *bin;
// g_print("padtemplatebox has event %d\n",event->type);
/* g_print("padtemplatebox has event %d\n",event->type); */
g_return_val_if_fail(GST_IS_EDITOR_PADTEMPLATE(padtemplate), FALSE);
element = padtemplate->parent;
@ -435,23 +435,23 @@ gst_editor_padtemplate_padbox_event(GnomeCanvasItem *item,
case GDK_ENTER_NOTIFY:
gtk_object_set(GTK_OBJECT(padtemplate->border),
"fill_color_rgba", 0xDDBBBB00, NULL);
// g_print("entered padtemplate '%s'\n",
// gst_padtemplate_get_name(padtemplate->padtemplate));
/* g_print("entered padtemplate '%s'\n", */
/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
break;
case GDK_LEAVE_NOTIFY:
gtk_object_set(GTK_OBJECT(padtemplate->border),
"fill_color_rgba", 0xFFCCCC00, NULL);
// g_print("left padtemplate '%s'\n",
// gst_padtemplate_get_name(padtemplate->padtemplate));
/* g_print("left padtemplate '%s'\n", */
/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
break;
case GDK_BUTTON_PRESS:
// g_print("have button press in padtemplate '%s'\n",
// gst_padtemplate_get_name(padtemplate->padtemplate));
//gst_editor_bin_start_banding(bin,padtemplate);
/* g_print("have button press in padtemplate '%s'\n", */
/* gst_padtemplate_get_name(padtemplate->padtemplate)); */
/* gst_editor_bin_start_banding(bin,padtemplate); */
return TRUE;
break;
case GDK_MOTION_NOTIFY:
// g_print("have motion in padtemplate\n");
/* g_print("have motion in padtemplate\n"); */
break;
default:
break;

View file

@ -78,24 +78,26 @@ gst_editor_project_class_init (GstEditorProjectClass *klass)
parent_class = gtk_type_class(gtk_object_get_type());
gst_editor_project_signals[ELEMENT_ADDED] =
gtk_signal_new("element_added",GTK_RUN_FIRST,object_class->type,
gtk_signal_new("element_added",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_added),
gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
GST_TYPE_ELEMENT);
gst_editor_project_signals[ELEMENT_REMOVED] =
gtk_signal_new("element_removed",GTK_RUN_FIRST,object_class->type,
gtk_signal_new("element_removed",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_removed),
gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
GST_TYPE_ELEMENT);
gst_editor_project_signals[ELEMENT_CHANGED] =
gtk_signal_new("element_changed",GTK_RUN_FIRST,object_class->type,
gtk_signal_new("element_changed",GTK_RUN_FIRST,G_TYPE_FROM_CLASS (object_class),
GTK_SIGNAL_OFFSET(GstEditorProjectClass,element_changed),
gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1,
GST_TYPE_ELEMENT);
#ifndef USE_GLIB2
gtk_object_class_add_signals(object_class,gst_editor_project_signals,LAST_SIGNAL);
#endif
object_class->set_arg = gst_editor_project_set_arg;
object_class->get_arg = gst_editor_project_get_arg;

Some files were not shown because too many files have changed in this diff Show more