Skip to content
Snippets Groups Projects
Commit 583f6660 authored by Erik Walthinsen's avatar Erik Walthinsen
Browse files

Merged from HEAD to INCSCHED1 on 200104251

Original commit message from CVS:
Merged from HEAD to INCSCHED1 on 200104251
parent 99aa793b
No related branches found
No related merge requests found
Showing
with 768 additions and 125 deletions
......@@ -71,6 +71,9 @@ fi
# popd > /dev/null
#done
# now remove the cache, because it can be considered dangerous in this case
rm -f config.cache
./configure --enable-maintainer-mode --enable-plugin-srcdir --enable-debug --enable-debug-verbose "$@"
echo
......
......@@ -4,44 +4,45 @@ AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
dnl FIXME this should be GSTREAMER_ now
STREAMER_MAJOR_VERSION=0
STREAMER_MINOR_VERSION=1
STREAMER_MICRO_VERSION=1
STREAMER_VERSION=$STREAMER_MAJOR_VERSION.$STREAMER_MINOR_VERSION.$STREAMER_MICRO_VERSION
GST_VERSION_MAJOR=0
GST_VERSION_MINOR=1
GST_VERSION_MICRO=1
GST_VERSION=$GST_VERSION_MAJOR.$GST_VERSION_MINOR.$GST_VERSION_MICRO
PACKAGE=gstreamer
VERSION=$STREAMER_VERSION
VERSION=$GST_VERSION
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
dnl libtool
STREAMER_CURRENT=0
STREAMER_REVISION=0
STREAMER_AGE=0
GSTREAMER_LIBVERSION=$STREAMER_CURRENT:$STREAMER_REVISION:$STREAMER_AGE
GST_CURRENT=0
GST_REVISION=0
GST_AGE=0
GST_LIBVERSION=$GST_CURRENT:$GST_REVISION:$GST_AGE
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
dnl Add parameters for aclocal
dnl (This must come after AM_INIT_AUTOMAKE, since it modifies ACLOCAL)
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AC_SUBST(STREAMER_MAJOR_VERSION)
AC_SUBST(STREAMER_MINOR_VERSION)
AC_SUBST(STREAMER_MICRO_VERSION)
AC_SUBST(STREAMER_VERSION)
AC_SUBST(GST_VERSION_MAJOR)
AC_SUBST(GST_VERSION_MINOR)
AC_SUBST(GST_VERSION_MICRO)
AC_SUBST(GST_VERSION)
AC_SUBST(STREAMER_CURRENT)
AC_SUBST(STREAMER_REVISION)
AC_SUBST(STREAMER_AGE)
AC_SUBST(GSTREAMER_LIBVERSION)
AC_SUBST(GST_CURRENT)
AC_SUBST(GST_REVISION)
AC_SUBST(GST_AGE)
AC_SUBST(GST_LIBVERSION)
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP
AC_ISC_POSIX
AC_STDC_HEADERS
AC_ARG_PROGRAM
......@@ -432,6 +433,26 @@ dnl 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)
dnl Check for arts
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_MSG_CHECKING(arts library)
dnl AC_CHECK_LIB(artsflow, convert_stereo_ifloat_2float, HAVE_ARTS=yes, HAVE_ARTS=no, -lmcop -lartsflow_idl)
AC_CHECK_HEADER(arts/artsflow.h, HAVE_ARTS=yes, HAVE_ARTS=no)
AC_LANG_RESTORE
dnl Check for libraw1394
AC_MSG_CHECKING(raw1394 library)
AC_CHECK_LIB(raw1394, raw1394_get_handle, HAVE_RAW1394=yes, HAVE_RAW1394=no, )
dnl Check for libdv
AC_MSG_CHECKING(libdv)
AC_CHECK_LIB(dv, dv_init, HAVE_LIBDV=yes, HAVE_LIBDV=no, -lm $GLIB_LIBS $GLIB_CFLAGS)
dnl Check for aalib
AC_MSG_CHECKING(aalib)
AC_CHECK_LIB(aa, aa_init, HAVE_LIBAA=yes, HAVE_LIBAA=no, )
dnl check if css-auth.c exists (FIXME)
AC_MSG_CHECKING(DVD CSS code)
......@@ -695,6 +716,10 @@ AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
AM_CONDITIONAL(HAVE_LIBXMMS, test "x$HAVE_LIBXMMS" = "xyes")
AM_CONDITIONAL(HAVE_LIBRTP, test "x$HAVE_LIBRTP" = "xyes")
AM_CONDITIONAL(HAVE_ARTS, test "x$HAVE_ARTS" = "xyes")
AM_CONDITIONAL(HAVE_RAW1394, test "x%HAVE_RAW1394" = "xyes")
AM_CONDITIONAL(HAVE_LIBDV, test "x%HAVE_LIBDV" = "xyes")
AM_CONDITIONAL(HAVE_LIBAA, test "x%HAVE_LIBAA" = "xyes")
......@@ -779,6 +804,7 @@ AC_OUTPUT([Makefile
include/Makefile
include/wine/Makefile
gst/Makefile
gst/gstversion.h
gst/types/Makefile
gst/meta/Makefile
gst/elements/Makefile
......@@ -792,6 +818,7 @@ libs/putbits/Makefile
libs/winloader/Makefile
libs/idct/Makefile
plugins/Makefile
plugins/aasink/Makefile
plugins/alsa/Makefile
plugins/au/Makefile
plugins/audioscale/Makefile
......@@ -837,8 +864,10 @@ plugins/filters/median/Makefile
plugins/filters/ladspa/Makefile
plugins/filters/stereo2mono/Makefile
plugins/filters/passthrough/Makefile
plugins/filters/adder/Makefile
plugins/filters/colorspace/Makefile
plugins/filters/volenv/Makefile
plugins/filters/adder/Makefile
plugins/icecast/Makefile
plugins/icecast/icecastsend/Makefile
plugins/effects/Makefile
......@@ -864,7 +893,9 @@ plugins/esd/Makefile
plugins/esd/esdsink/Makefile
plugins/artsd/Makefile
plugins/xmms/Makefile
plugins/mulaw/Makefile
plugins/arts/Makefile
plugins/1394/Makefile
plugins/dv/Makefile
gstplay/Makefile
dnl components/bonobo-gstmediaplay/Makefile
test/Makefile
......@@ -886,10 +917,12 @@ examples/queue2/Makefile
examples/queue3/Makefile
examples/queue4/Makefile
examples/thread/Makefile
examples/mixer/Makefile
examples/launch/Makefile
examples/xml/Makefile
examples/plugins/Makefile
examples/typefind/Makefile
examples/mixer/Makefile
editor/Makefile
editor/pixmaps/Makefile
tools/Makefile
......
......@@ -32,6 +32,7 @@
<!entity GstFakeSrc SYSTEM "sgml/gstfakesrc.sgml">
<!entity GstFakeSink SYSTEM "sgml/gstfakesink.sgml">
<!entity GstDiskSrc SYSTEM "sgml/gstdisksrc.sgml">
<!entity GstDiskSink SYSTEM "sgml/gstdisksink.sgml">
<!entity GstHttpSrc SYSTEM "sgml/gsthttpsrc.sgml">
<!entity GstFdSrc SYSTEM "sgml/gstfdsrc.sgml">
<!entity GstSineSrc SYSTEM "sgml/gstsinesrc.sgml">
......@@ -122,6 +123,8 @@ with some more specialized elements.</para>
&GstFakeSink;
&GstDiskSrc;
&GstDiskSink;
&GstHttpSrc;
&GstSineSrc;
......
......@@ -27,6 +27,9 @@ cothread_get_data
gst_init
gst_main
gst_main_quit
GST_VERSION_MICRO
GST_VERSION_MAJOR
GST_VERSION_MINOR
<SUBSECTION Standard>
</SECTION>
......@@ -130,19 +133,25 @@ GST_BUFFER_FLAGS
GST_BUFFER_FLAG_IS_SET
GST_BUFFER_FLAG_SET
GST_BUFFER_FLAG_UNSET
GST_BUFFER_TYPE
GST_BUFFER_DATA
GST_BUFFER_SIZE
GST_BUFFER_OFFSET
GST_BUFFER_MAXSIZE
GST_BUFFER_TIMESTAMP
GST_BUFFER_BUFFERPOOL
GST_BUFFER_POOL_PRIVATE
GST_BUFFER_LOCK
GST_BUFFER_TRYLOCK
GST_BUFFER_UNLOCK
GST_BUFFER_PARENT
GST_BUFFER_MAXAGE
GstBufferFlags
GstBuffer
gst_buffer_new
gst_buffer_new_from_pool
gst_buffer_copy
gst_buffer_create_sub
gst_buffer_append
gst_buffer_ref
......@@ -367,12 +376,11 @@ GstPadGetRegionFunction
GstPadQoSFunction
GstPadEOSFunction
GstPadNewCapsFunction
GstPadBufferPoolFunction
GstPadNegotiateReturn
GstPadNegotiateFunction
GstPadPushFunction
GstPadPullFunction
GstRegionType
......@@ -391,6 +399,7 @@ gst_pad_set_negotiate_function
gst_pad_set_qos_function
gst_pad_set_eos_function
gst_pad_set_newcaps_function
gst_pad_set_bufferpool_function
gst_pad_set_caps
gst_pad_get_caps
gst_pad_check_compatibility
......@@ -410,6 +419,7 @@ gst_pad_disconnect
gst_pad_push
gst_pad_pull
gst_pad_pullregion
gst_pad_get_bufferpool
gst_pad_set_eos
gst_pad_handle_qos
gst_pad_eos
......@@ -439,6 +449,7 @@ GST_RPAD_QOSFUNC
GST_RPAD_EOSFUNC
GST_RPAD_NEGOTIATEFUNC
GST_RPAD_NEWCAPSFUNC
GST_RPAD_BUFFERPOOLFUNC
GST_GPAD_REALPAD
GstGhostPad
......@@ -450,6 +461,9 @@ GST_PADTEMPLATE_CAPS
GST_PADTEMPLATE_DIRECTION
GST_PADTEMPLATE_NAME_TEMPLATE
GST_PADTEMPLATE_PRESENCE
GST_PADTEMPLATE_NEW
GST_PADTEMPLATE_FACTORY
GST_PADTEMPLATE_GET
gst_padtemplate_new
gst_padtemplate_load_thyself
gst_padtemplate_save_thyself
......@@ -512,8 +526,8 @@ gst_pipeline_details
<FILE>gstplugin</FILE>
<TITLE>GstPlugin</TITLE>
GstPlugin
GstPluginElement
GstPluginInitFunc
GstPluginDesc
gst_plugin_new
gst_plugin_set_name
gst_plugin_get_name
......@@ -615,6 +629,9 @@ gst_typefactory_save_thyself
GST_CAPS_LOCK
GST_CAPS_TRYLOCK
GST_CAPS_UNLOCK
GST_CAPS_NEW
GST_CAPS_FACTORY
GST_CAPS_GET
GstCaps
gst_caps_new
gst_caps_destroy
......@@ -622,6 +639,7 @@ gst_caps_ref
gst_caps_unref
gst_caps_copy
gst_caps_copy_on_write
gst_caps_chain
gst_caps_append
gst_caps_prepend
gst_caps_set_name
......@@ -652,6 +670,7 @@ GST_CAPS
<TITLE>GstProps</TITLE>
GstProps
GST_MAKE_FOURCC
GST_STR_FOURCC
GST_PROPS_LIST
GST_PROPS_INT
GST_PROPS_INT_RANGE
......@@ -911,6 +930,20 @@ GST_IS_TYPEFIND
GST_IS_TYPEFIND_CLASS
</SECTION>
<SECTION>
<FILE>gstdisksink</FILE>
<TITLE>GstDiskSink</TITLE>
GstDiskSinkFlags
<SUBSECTION Standard>
GstDiskSink
GST_DISKSINK
GST_IS_DISKSINK
GST_TYPE_DISKSINK
gst_disksink_get_type
GST_DISKSINK_CLASS
GST_IS_DISKSINK_CLASS
</SECTION>
<SECTION>
<FILE>gstmultidisksrc</FILE>
<TITLE>GstMultiDiskSrc</TITLE>
......
......@@ -9,6 +9,7 @@ GtkObject
GstFakeSrc
GstFakeSink
GstDiskSrc
GstDiskSink
GstHttpSrc
GstFdSrc
GstSineSrc
......
......@@ -53,3 +53,24 @@ pipeline</ulink> and Microsoft's DirectShow for some background.
<!-- ##### MACRO GST_VERSION_MICRO ##### -->
<para>
</para>
<!-- ##### MACRO GST_VERSION_MAJOR ##### -->
<para>
</para>
<!-- ##### MACRO GST_VERSION_MINOR ##### -->
<para>
</para>
......@@ -7,12 +7,92 @@ Automatically create and connect elements
<!-- ##### SECTION Long_Description ##### -->
<para>
GstAutoplug is an abstract class that is used for constructing and
connecting elements.
connecting elements. Two types og autopluggers exist: renderer ones and non
renderer ones. the renderer autopluggers will not have any src pads while the
non renderer ones do.
</para>
<para>
You first need to create a suitable autoplugger with gst_autoplugfactory_make().
The name of the autoplugger must be one of the registered autopluggers
(see #GstStaticAutoplug and #GstStaticAutoplugRender).
</para>
<para>
A list of all available autopluggers can be obtained with gst_autoplugfactory_get_list().
</para>
<para>
If the autoplugger supports the RENDERER API, use gst_autoplug_to_renderers() call to
create a bin that connectes the src caps to the specified rendrer elements. You can
then add the bin to a pipeline and run it.
<programlisting>
GstAutoplug *autoplug;
GstElement *element;
GstElement *sink;
/* create a static autoplugger */
autoplug = gst_autoplugfactory_make ("staticrender");
/* create an osssink */
sink = gst_elementfactory_make ("osssink", "our_sink");
/* create an element that can play audio/mp3 through osssink */
element = gst_autoplug_to_renderers (autoplug,
gst_caps_new (
"sink_audio_caps",
"audio/mp3",
NULL
),
sink,
NULL);
/* add the element to a bin and connect the sink pad */
...
</programlisting>
</para>
<para>
If the autoplugger supports the CAPS API, use gst_autoplug_to_caps() call to
connect the src caps to the destination caps. The created bin will have src pads
compatible with the provided sink caps.
<programlisting>
GstAutoplug *autoplug;
GstElement *element;
/* create a static autoplugger */
autoplug = gst_autoplugfactory_make ("static");
/* create an element that converts audio/mp3 to audio/raw */
element = gst_autoplug_to_caps (autoplug,
gst_caps_new (
"sink_audio_caps",
"audio/mp3",
NULL
),
gst_caps_new (
"src_audio_caps",
"audio/raw",
NULL
),
NULL);
/* add the element to a bin and connect the src/sink pads */
...
</programlisting>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
Optionally you can get a notification when a new object is added to the created
pipeline with a gtk_signal_connect to the "new_object" signal.
</para>
<para>
Use the regular gst_object_destroy() call to destroy the autoplugger.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
GstStaticAutoplug, GstStaticAutoplugRender
</para>
<!-- ##### STRUCT GstAutoplug ##### -->
......@@ -24,7 +104,7 @@ connecting elements.
<!-- ##### ENUM GstAutoplugFlags ##### -->
<para>
The type of the autoplugger.
</para>
@GST_AUTOPLUG_TO_CAPS:
......
......@@ -11,6 +11,32 @@ become children of itself. Pads from the child elements can be ghosted to
the bin, making the bin itself look transparently like any other element,
allowing for deep nesting of predefined sub-pipelines.
</para>
<para>
A new GstBin is created with gst_bin_new()
</para>
<para>
After the bin has been created you will typically add elements to it with
gst_bin_add(). You can remove elements with gst_bin_remove().
</para>
<para>
An element can be retrieved from a bin with gst_bin_get_by_name(), using the
elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal
purposes and will query the parent bins when the element is not found in the
current bin.
</para>
<para>
The list of elements in a bin can be retrieved with gst_bin_get_list().
</para>
<para>
After the bin has been set to the PLAYING state (with gst_element_set_state()),
gst_bin_iterate() is used to process the elements in the bin.
</para>
<para>
The "object_added" signal is fired whenever a new object is added to the bin.
</para>
<para>
gst_bin_destroy() is used to destroy the bin.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
......@@ -43,10 +69,10 @@ Flags for a bin.
<!-- ##### MACRO gst_bin_destroy ##### -->
<para>
Free the memory allocated by this bin
</para>
@bin:
@bin: the bin to free
<!-- ##### FUNCTION gst_bin_add ##### -->
......
......@@ -10,13 +10,54 @@ Buffers are the basic unit of data transfer in GST. The GstBuffer type
provides all the state necessary to define a region of memory as part of a
stream. Sub-buffer are also supported, allowing a smaller region of a
buffer to become its own buffer, with mechanisms in place to ensure that
nither memory space goes away. Metadata is supported as a list of
neither memory space goes away. Metadata is supported as a list of
pointers to arbitrary metadata.
</para>
<para>
Buffers are usually created with gst_buffer_new(). After a buffer has been
created one will typically allocate memory for it and set the size of the
buffer data.
<programlisting>
GstBuffer *buffer;
gint size, widht, height, bpp;
size = width * height * bpp;
buffer = gst_buffer_new ();
GST_BUFFER_SIZE (buffer) = size;
GST_BUFFER_DATA (buffer) = g_alloc (size);
...
</programlisting>
</para>
<para>
GstBuffers can also be created from a GstBufferPool with
gst_buffer_new_from_pool(). The bufferpool can be obtained from a
peer element with gst_pad_get_bufferpool().
</para>
<para>
gst_buffer_ref() is used to increase the refcount of a buffer. This must be
done when you want to keep a handle to the buffer after pushing it to the
next element.
</para>
<para>
To efficiently create a smaller buffer out of an existing one, you can
use gst_buffer_create_sub().
</para>
<para>
Several flags of the buffer can be set and unset with the GST_BUFFER_FLAG_SET()
and GST_BUFFER_FLAG_UNSET() macros. Use GST_BUFFER_FLAG_IS_SET() to test it
a certain flag is set.
</para>
<para>
Buffers usually are freed by unreffing them with gst_buffer_unref().
gst_buffer_destroy() can also be used to effectively destroy the buffer
regardless of the refcount (dangerous).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstBufferPool, #GstPad
</para>
<!-- ##### MACRO GST_BUFFER_FLAGS ##### -->
......@@ -54,14 +95,6 @@ Clear a flag in a buffer.
@flag: the flag to clear
<!-- ##### MACRO GST_BUFFER_TYPE ##### -->
<para>
Retrieves the type id of the data in the buffer.
</para>
@buf: GstBuffer
<!-- ##### MACRO GST_BUFFER_DATA ##### -->
<para>
Retrieves a pointer to the data element of this buffer
......@@ -88,7 +121,7 @@ Get the offset in the source file of this buffer.
<!-- ##### MACRO GST_BUFFER_MAXSIZE ##### -->
<para>
Gets the maximun size of this buffer.
</para>
@buf: GstBuffer
......@@ -102,6 +135,22 @@ Get the timestamp for this buffer.
@buf: GstBuffer
<!-- ##### MACRO GST_BUFFER_BUFFERPOOL ##### -->
<para>
Get the bufferpool for this buffer.
</para>
@buf: GstBuffer
<!-- ##### MACRO GST_BUFFER_POOL_PRIVATE ##### -->
<para>
Get the bufferpool private data.
</para>
@buf: GstBuffer
<!-- ##### MACRO GST_BUFFER_LOCK ##### -->
<para>
This macro will obtain a lock on the object, making serialization
......@@ -131,6 +180,22 @@ This macro releases a lock on the object.
@buf: GstBuffer to unlock.
<!-- ##### MACRO GST_BUFFER_PARENT ##### -->
<para>
Get the parent of this buffer. The parent is set on subbuffers.
</para>
@buf: GstBuffer to get the parent of.
<!-- ##### MACRO GST_BUFFER_MAXAGE ##### -->
<para>
Get the maximun age of a buffer.
</para>
@buf: GstBuffer to get the maxage of.
<!-- ##### ENUM GstBufferFlags ##### -->
<para>
......@@ -150,7 +215,6 @@ used when data in a stream has been skipped
</para>
@lock:
@flags:
@data:
@size:
@maxsize:
......@@ -160,6 +224,7 @@ used when data in a stream has been skipped
@metas:
@parent:
@pool:
@pool_private:
<!-- ##### FUNCTION gst_buffer_new ##### -->
<para>
......@@ -178,6 +243,15 @@ used when data in a stream has been skipped
@Returns:
<!-- ##### FUNCTION gst_buffer_copy ##### -->
<para>
</para>
@buffer:
@Returns:
<!-- ##### FUNCTION gst_buffer_create_sub ##### -->
<para>
......
......@@ -10,17 +10,40 @@ A bufferpool is used to create buffers in an efficient way. En element
can maintain a bufferpool with a fixed number of buffers. This will reduce
the g_malloc and g_free overhead.
</para>
<para>
A bufferpool can also be used to implement direct access. A bufferpool can be
sent from one element to another so that the latter can directly write into
the memory of the element that maintains the bufferpool. This can greatly reduce
the number of memcpy operations.
</para>
<para>
A bufferpool is created with gst_buffer_pool_new(). You'll have to set the
buffer allocation and destroy function afterwards with gst_buffer_pool_set_create_function() and
gst_buffer_pool_set_destroy_function().
</para>
<para>
To create a buffer from the bufferpool use gst_buffer_pool_new_buffer(), which is
functionally equivalent to gst_buffer_new_from_pool().
</para>
<para>
When the buffer is unreffed and has reached a refcount of 0, the bufferpools destroy
function is called with the buffer as an argument.
</para>
<para>
A bufferpool can store private data in the buffer it creates with the GST_BUFFER_POOL_PRIVATE()
macro. To check it a buffer was made by a specific bufferpool, use the GST_BUFFER_BUFFERPOOL()
macro to get it's bufferpool.
</para>
<para>
Destroy the bufferpool with gst_buffer_pool_destroy().
</para>
<para>
A bufferpool can be requested from a pad with the gst_pad_get_bufferpool() function.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstBuffer, #GstPad
</para>
<!-- ##### STRUCT GstBufferPool ##### -->
......
......@@ -7,12 +7,72 @@ Capabilities of pads
<!-- ##### SECTION Long_Description ##### -->
<para>
GstCaps is used to attach capabilities to a pad. Capabilities are made of
a mime-type and a set of properties.
a mime-type and a set of properties. GstCaps can be named and chained into
a list, which is then a GstCaps on its own.
</para>
<para>
GstCaps are created with gst_caps_new(), which takes a name, a mime type and
a pointer to a #GstProps. A convenience macro with a cleaner syntax is
available to create a caps with GST_CAPS_NEW(). The following example shows how
to create a GstCaps.
<programlisting>
GstCaps *caps;
caps = gst_caps_new (
"my_caps", /* capability name */
"audio/raw", /* mime type */
gst_props_new ( /* properties */
"format", GST_PROPS_STRING ("float"),
"layout", GST_PROPS_INT (5),
NULL));
</programlisting>
The following code example is equivalent to the above example:
<programlisting>
GstCaps *caps;
caps = GST_CAPS_NEW (
"my_caps", /* capability name */
"audio/raw", /* mime type */
"format", GST_PROPS_STRING ("float"),
"channels", GST_PROPS_INT (5)
);
</programlisting>
</para>
<para>
GstCaps are refcounted with gst_caps_ref() and gst_caps_unref().
</para>
<para>
GstCaps can be chained with the gst_caps_append(), gst_caps_prepend() and
gst_caps_chain() functions. Use gst_caps_get_by_name() to get a named caps
structure from a chained list.
</para>
<para>
To get the properties of a caps structure the functions
gst_caps_get_boolean(), gst_caps_get_fourcc_int(), gst_caps_get_int(),
gst_caps_get_string(), which all take a property name as an argument.
</para>
<para>
The properties of the caps structure can be modified with gst_caps_set, which
takes a list of key value pairs in the #GstProps syntax as shown by this example:
<!-- ##### SECTION See_Also ##### -->
<programlisting>
GstCaps *caps;
....
gst_caps_set (caps, "format", GST_PROPS_STRING ("int"), NULL);
gst_caps_set (caps, "channels", GST_PROPS_INT (20), NULL);
</programlisting>
</para>
<para>
before modifying a GstCaps, it is a good idea to make a copy if it first with
gst_caps_copy_on_write(). This will copy thr GstCaps if the refcount is &gt;1.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstProps, #GstPad
</para>
<!-- ##### MACRO GST_CAPS_LOCK ##### -->
......@@ -39,6 +99,34 @@ Unlock the caps structure
@caps: The caps structure to unlock
<!-- ##### MACRO GST_CAPS_NEW ##### -->
<para>
A convenience macro to create a new GstCaps structure.
</para>
@name: the name of the caps structure
@type: the mime type of the caps structure
@a...: the properties of this caps stucture.
<!-- ##### MACRO GST_CAPS_FACTORY ##### -->
<para>
A convenience macro to create a GstCaps factory.
</para>
@factoryname: the name of the factory
@a...: the caps to create with this factory, usualy specified
with GST_CAPS_NEW()
<!-- ##### MACRO GST_CAPS_GET ##### -->
<para>
A convenience macro to get a GstCaps from the given capsfactory.
</para>
@fact: the factory to use.
<!-- ##### STRUCT GstCaps ##### -->
<para>
......@@ -76,6 +164,7 @@ Unlock the caps structure
</para>
@caps:
@Returns:
<!-- ##### FUNCTION gst_caps_unref ##### -->
......@@ -84,6 +173,7 @@ Unlock the caps structure
</para>
@caps:
@Returns:
<!-- ##### FUNCTION gst_caps_copy ##### -->
......@@ -104,6 +194,16 @@ Unlock the caps structure
@Returns:
<!-- ##### FUNCTION gst_caps_chain ##### -->
<para>
</para>
@caps:
@Varargs:
@Returns:
<!-- ##### FUNCTION gst_caps_append ##### -->
<para>
......@@ -212,21 +312,21 @@ Unlock the caps structure
<!-- ##### MACRO gst_caps_set ##### -->
<para>
Set a property of a caps structure.
</para>
@caps:
@name:
@args...:
@caps: the caps structure to modify
@name: the name of the property to change
@args...: the new value of the property
<!-- ##### MACRO gst_caps_get_boolean ##### -->
<para>
Get the value of the named property as a boolean.
</para>
@caps:
@name:
@caps: the caps to query
@name: the name of the property to get
<!-- ##### FUNCTION gst_caps_get_by_name ##### -->
......@@ -241,29 +341,29 @@ Unlock the caps structure
<!-- ##### MACRO gst_caps_get_fourcc_int ##### -->
<para>
Get the value of the named property as a fourcc.
</para>
@caps:
@name:
@caps: the caps to query
@name: the name of the property to get
<!-- ##### MACRO gst_caps_get_int ##### -->
<para>
Get the value of the named property as an int.
</para>
@caps:
@name:
@caps: the caps to query
@name: the name of the property to get
<!-- ##### MACRO gst_caps_get_string ##### -->
<para>
Get the value of the named property as a string.
</para>
@caps:
@name:
@caps: the caps to query
@name: the name of the property to get
<!-- ##### FUNCTION gst_caps_save_thyself ##### -->
......
......@@ -10,7 +10,9 @@ Request the features of the CPU.
This module can be used when developing plugins. It is
typically used to enable special optimisations based on the
features of the CPU.
</para>
<para>
You'll get a bitmask of flags with gst_cpu_get_flags().
</para>
<!-- ##### SECTION See_Also ##### -->
......
<!-- ##### SECTION Title ##### -->
GstDiskSink
<!-- ##### SECTION Short_Description ##### -->
Write to a file
<!-- ##### SECTION Long_Description ##### -->
<para>
The disksink write to a file. The filename can be given as an argument.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstFdSink
</para>
<!-- ##### ENUM GstDiskSinkFlags ##### -->
<para>
</para>
@GST_DISKSINK_OPEN:
@GST_DISKSINK_FLAG_LAST:
<!-- ##### SIGNAL GstDiskSink::handoff ##### -->
<para>
Is emited after the buffer has been written to the disk.
</para>
@gstdisksink: the object which received the signal.
<!-- ##### ARG GstDiskSink:location ##### -->
<para>
The filename to write to.
</para>
......@@ -28,3 +28,8 @@ with the buffer. (fakesink)
</para>
<!-- ##### ARG GstFakeSink:silent ##### -->
<para>
</para>
......@@ -24,3 +24,8 @@ Pass data without modification.
</para>
<!-- ##### ARG GstIdentity:silent ##### -->
<para>
</para>
......@@ -6,14 +6,66 @@ The connection between Elements
<!-- ##### SECTION Long_Description ##### -->
<para>
Elements are connected to each other via "pads", which are extremely light-weight generic
connections.
#GstElement are connected to each other via "pads", which are extremely light-weight generic
connections. After two pad are retrieved from an element with gst_element_get_pad(), the pads
can be connected with gst_pad_connect().
</para>
<para>
PedTemplates are use to describe the runtime behaviour of an element and what pads it
will have during its lifetime. Pads are typically created from a padtemplate with
GST_PADTEMPLATE_NEW() or with the factory macro GST_PADTEMPLATE_FACTORY().
</para>
<para>
Pad and PadTemplates have #GstCaps attached to it to describe the media type they
are capable of dealing with. gst_pad_get_caps() and gst_pad_set_caps() are used to
manipulate the caps of the pads. gst_padtemplate_get_caps() is used to get the
caps of a padtemplate. It's not possible to modify the caps of a padtemplate after
creation. The following code example shows the code to create a pad from a padtemplate.
<programlisting>
GST_PADTEMPLATE_FACTORY (my_factory,
"sink", /* the name of the pad */
GST_PAD_SINK, /* the direction of the pad */
GST_PAD_ALWAYS, /* when this pad will be present */
GST_CAPS_NEW ( /* the capabilities of the padtemplate */
"my_caps",
"audio/raw",
"format", GST_PROPS_STRING ("int"),
"channels", GST_PROPS_INT_RANGE (1, 6)
)
)
void
my_method (void)
{
GstPad *pad;
pad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (my_factory), "sink");
...
}
</programlisting>
Pads created from a padtemplate cannot set capabilities that are incompatible with
the padtemplates capabilities.
</para>
<para>
Pads without padtemplates can be created with gst_pad_new() which takes a direction and
a name as an argument.
</para>
<para>
gst_pad_get_parent() will retrieve the GstElement that owns the pad.
</para>
<para>
GstElements creating a pad will typicilally use the various gst_pad_set_*_function() calls
to register callbacks for various events on the pads.
</para>
<para>
GstElements will use gst_pad_push() and gst_pad_pull() to push out or pull a buffer in. The
gst_pad_pullregion() function can be used to request for a buffer with a specific offset (in
time or in bytes).
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstCaps, #GstElement
</para>
<!-- ##### MACRO GST_PAD_NAME ##### -->
......@@ -157,11 +209,22 @@ The function that will be called in an EOS case.
<!-- ##### USER_FUNCTION GstPadNewCapsFunction ##### -->
<para>
The function that will be called when the caps of the pad has
changed.
</para>
@pad: The pad that has its caps changed
@caps: the new caps of the pad
<!-- ##### USER_FUNCTION GstPadBufferPoolFunction ##### -->
<para>
The function that will be called when a bufferpool is requested
from this pad.
</para>
@pad:
@caps:
@pad: the pad with the bufferpool
@Returns: the GstBufferPool associated with this pad.
<!-- ##### ENUM GstPadNegotiateReturn ##### -->
......@@ -180,10 +243,8 @@ The function that will be called when negotiating.
@pad: The pad that is being negotiated
@caps: The current caps that are being negotiated
@data:
@data: A generic gpointer that can be used to store user_data
@Returns: The result of the negotiation process
<!-- # Unused Parameters # -->
@count: A counter to keep track of the negotiation process
<!-- ##### USER_FUNCTION GstPadPushFunction ##### -->
......@@ -349,6 +410,15 @@ Destroy the pad.
@newcaps:
<!-- ##### FUNCTION gst_pad_set_bufferpool_function ##### -->
<para>
</para>
@pad:
@bufpool:
<!-- ##### FUNCTION gst_pad_set_caps ##### -->
<para>
......@@ -530,6 +600,15 @@ Destroy the pad.
@size:
<!-- ##### FUNCTION gst_pad_get_bufferpool ##### -->
<para>
</para>
@pad:
@Returns:
<!-- ##### FUNCTION gst_pad_set_eos ##### -->
<para>
......@@ -611,26 +690,26 @@ Call the EOS function of the pad
<!-- ##### MACRO GST_RPAD_LEN ##### -->
<para>
Get the length of the region that is being pulled.
</para>
@pad:
@pad: the real pad to query.
<!-- ##### MACRO GST_RPAD_OFFSET ##### -->
<para>
Get the offset of the region that is being pulled.
</para>
@pad:
@pad: the real pad to query.
<!-- ##### MACRO GST_RPAD_REGIONTYPE ##### -->
<para>
Get the type of the region that is being pulled.
</para>
@pad:
@pad: the real pad to query.
<!-- ##### STRUCT GstRealPad ##### -->
......@@ -657,6 +736,7 @@ Call the EOS function of the pad
@pullregionfunc:
@negotiatefunc:
@newcapsfunc:
@bufferpoolfunc:
@ghostpads:
<!-- ##### MACRO GST_RPAD_DIRECTION ##### -->
......@@ -757,18 +837,26 @@ Get the EOS function of the real pad.
<!-- ##### MACRO GST_RPAD_NEGOTIATEFUNC ##### -->
<para>
Get the negotiate function from the real pad.
</para>
@pad:
@pad: the real pad to query.
<!-- ##### MACRO GST_RPAD_NEWCAPSFUNC ##### -->
<para>
Get the newcaps function from the real pad.
</para>
@pad: the real pad to query.
<!-- ##### MACRO GST_RPAD_BUFFERPOOLFUNC ##### -->
<para>
Get the bufferpoolfunction from the real pad.
</para>
@pad:
@pad: the real pad to query.
<!-- ##### MACRO GST_GPAD_REALPAD ##### -->
......@@ -804,7 +892,8 @@ Indicates when this pad will become available.
@GST_PAD_ALWAYS: the pad is always available
@GST_PAD_SOMETIMES: the pad will become available depending on the media stream
@GST_PAD_REQUEST:
@GST_PAD_REQUEST: th pad is only available on request with
gst_element_request_pad_by_name() or gst_element_request_compatible_pad().
<!-- ##### STRUCT GstPadTemplate ##### -->
<para>
......@@ -819,34 +908,66 @@ Indicates when this pad will become available.
<!-- ##### MACRO GST_PADTEMPLATE_CAPS ##### -->
<para>
Get a handle to the padtemplate #GstCaps
</para>
@templ:
@templ: the template to query
<!-- ##### MACRO GST_PADTEMPLATE_DIRECTION ##### -->
<para>
Get the direction of the padtemplate.
</para>
@templ:
@templ: the template to query
<!-- ##### MACRO GST_PADTEMPLATE_NAME_TEMPLATE ##### -->
<para>
Get the nametemplate of the padtemplate.
</para>
@templ:
@templ: the template to query
<!-- ##### MACRO GST_PADTEMPLATE_PRESENCE ##### -->
<para>
Get the presence of the padtemplate.
</para>
@templ: the template to query
<!-- ##### MACRO GST_PADTEMPLATE_NEW ##### -->
<para>
Create a new padtemplate.
</para>
@templ:
@padname: the nametemplate for the pads that will be created with this template
@dir: the direction of the pads.
@pres: the presence of the pads.
@a...: the capabilities of this padtemplate usually created with GST_CAPS_NEW()
<!-- ##### MACRO GST_PADTEMPLATE_FACTORY ##### -->
<para>
Create a factory for a padtemplate. This can be used if you only want one instance
of the padtemplate. Use GST_PADTEMPLATE_GET() to get the unique padtemplate.
</para>
@name: th name of the factory
@padname: the nametemplate of the pads
@dir: the direction of the pads.
@pres: the presence of the pads.
@a...: the capabilities of this padtemplate, usually created with GST_CAPS_NEW()
<!-- ##### MACRO GST_PADTEMPLATE_GET ##### -->
<para>
Get the padtemplate of the factory created with GST_PADTEMPLATE_FACTORY()
</para>
@fact: the factory name to get the padtemplate from.
<!-- ##### FUNCTION gst_padtemplate_new ##### -->
......@@ -860,8 +981,6 @@ Indicates when this pad will become available.
@caps:
@Varargs:
@Returns:
<!-- # Unused Parameters # -->
@factory:
<!-- ##### FUNCTION gst_padtemplate_load_thyself ##### -->
......@@ -881,8 +1000,6 @@ Indicates when this pad will become available.
@templ:
@parent:
@Returns:
<!-- # Unused Parameters # -->
@pad:
<!-- ##### FUNCTION gst_padtemplate_get_caps ##### -->
......
......@@ -7,7 +7,36 @@ Parses commandline syntax into a pipeline.
<!-- ##### SECTION Long_Description ##### -->
<para>
This method allows you to create a pipeline from a command
line syntax description.
line syntax description. The following example creates a simple
mp3 player.
<programlisting>
GstElement *pipeline;
/* create a pipeline to hold our elements */
pipeline = gst_pipeline_new ("launch");
/* build a pipeline in the pipeline */
gst_parse_launch ("disksrc location=some.mp3 ! mad ! osssink", GST_BIN (pipeline));
/* play the thing */
gst_element_set_state (pipeline, GST_STATE_PLAYING);
while (gst_bin_iterate (GST_BIN (pipeline)));
gst_element_set_state (pipeline, GST_STATE_NULL);
</programlisting>
</para>
<para>
Elements are separated with a <option>!</option>, properties are set with
<replaceable>property</replaceable>=<replaceable>value</replaceable>, specific pads
of an element are selected by replacing the <option>!</option> with
<replaceable>padname</replaceable><option>!</option>.
</para>
<para>
Elements can be added to a bin by embracing them with <option>()</option>. Threads
can be made with <option>{}</option>.
</para>
<!-- ##### SECTION See_Also ##### -->
......
......@@ -12,12 +12,6 @@ including threading, as well as provide simple interfaces to common
functions, like 'Play'.
</para>
<para>
The pipeline also has the capability to autoplug. This feature
allows you to only define the input/output plugins and let the
pipeline figure out what plugins to use.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
......
......@@ -6,13 +6,51 @@ Dynamically loadable Elements
<!-- ##### SECTION Long_Description ##### -->
<para>
GStreamer is extensible so <classname>GstElements</classname> can be loaded at runtime.
GStreamer is extensible so <classname>GstElements</classname> can be loaded at runtime. A plugin
system can provide one or more of the following basic <application>GStreamer</application>
objects factories:
<itemizedlist>
<listitem>
<para>
A #GstElementFactory: the components to build a pipeline.
</para>
</listitem>
<listitem>
<para>
A #GstTypeFactory: A MIME type and an optional typefind function.
</para>
</listitem>
<listitem>
<para>
A #GstAutoplugFactory: An object used to automatically construct pipelines.
</para>
</listitem>
</itemizedlist>
</para>
<para>
A new plugin is created with gst_plugin_new(). this function will return a handle
to the GstPlugin or NULL if the plugin could not be created.
</para>
<para>
Once a GstPlugin element has been created, you can add the different types of factories
to it with gst_plugin_add_factory(), gst_plugin_add_type(), gst_plugin_add_autoplugger().
</para>
<para>
<application>Gstreamer</application> plugins should have a method plugin_init that is called
by the loader.
</para>
<para>
use gst_plugin_find(), gst_plugin_get_list(), gst_plugin_get_factory_list(), gst_plugin_get_type_list() and
gst_plugin_get_autoplug_list() to query the plugin repository.
</para>
<para>
Plugins are always automaticlly loaded so you don't need to call gst_plugin_load() explicitly
to bring it into memory.
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstElement, #GstType, #GstAutoplug
</para>
<!-- ##### STRUCT GstPlugin ##### -->
......@@ -31,12 +69,6 @@ GStreamer is extensible so <classname>GstElements</classname> can be loaded at r
@numautopluggers:
@loaded:
<!-- ##### STRUCT GstPluginElement ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION GstPluginInitFunc ##### -->
<para>
A plugin should implement this function called plugin_init. It will be called
......@@ -44,15 +76,28 @@ by the loader at statup.
</para>
@module: The <classname>GModule</classname> it was loaded from
@plugin:
@Returns: The plugin or NULL is an error was detected.
<!-- ##### STRUCT GstPluginDesc ##### -->
<para>
</para>
@major_version:
@minor_version:
@name:
@plugin_init:
<!-- ##### FUNCTION gst_plugin_new ##### -->
<para>
</para>
@name:
@major:
@minor:
@Returns:
......
......@@ -12,7 +12,7 @@ are usually used in conjunction with GstCaps.
<!-- ##### SECTION See_Also ##### -->
<para>
GstCaps
#GstCaps
</para>
<!-- ##### STRUCT GstProps ##### -->
......@@ -26,13 +26,32 @@ GstCaps
<!-- ##### MACRO GST_MAKE_FOURCC ##### -->
<para>
Create a FOURCC value that can easily be used to construct
a fourcc property.
<programlisting>
...
"format", GST_PROPS_FOURCC (GST_MAKE_FOURCC ('Y','U','Y','2')),
...
</programlisting>
</para>
@a: first fourcc byte
@b: second fourcc byte
@c: third fourcc byte
@d: fourth fourcc byte
<!-- ##### MACRO GST_STR_FOURCC ##### -->
<para>
Create a FOURCC value from a string. example:
<programlisting>
...
"format", GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")),
...
</programlisting>
</para>
@a:
@b:
@c:
@d:
@f: the string describing the fourcc value.
<!-- ##### MACRO GST_PROPS_LIST ##### -->
......@@ -65,11 +84,7 @@ Create an integer range property.
Construct a fourcc property out of four bytes.
</para>
@a: first byte
<!-- # Unused Parameters # -->
@b: second byte
@c: third byte
@d: fourth byte
@a: a fourcc value usualy created with GST_FOURCC_MAKE ()
<!-- ##### MACRO GST_PROPS_BOOLEAN ##### -->
......@@ -82,27 +97,27 @@ Create a boolean property.
<!-- ##### MACRO GST_PROPS_STRING ##### -->
<para>
Create a string value.
</para>
@a:
@a: the string value.
<!-- ##### MACRO GST_PROPS_FLOAT ##### -->
<para>
Create a floating point value.
</para>
@a:
@a: the float value
<!-- ##### MACRO GST_PROPS_FLOAT_RANGE ##### -->
<para>
Create a float range value.
</para>
@a:
@b:
@a: lower float bounds
@b: upper float bounds
<!-- ##### FUNCTION gst_props_new ##### -->
......@@ -113,8 +128,6 @@ Create a boolean property.
@firstname:
@Varargs:
@Returns:
<!-- # Unused Parameters # -->
@entry:
<!-- ##### FUNCTION gst_props_newv ##### -->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment