From bf8c785fb0ff5b69b48ef032b1a26efe97cbc438 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 27 Mar 2000 19:53:43 +0000 Subject: [PATCH] Documentation updates. All standard library objects and standard elements are documented. Modified some of the elemen... Original commit message from CVS: Documentation updates. All standard library objects and standard elements are documented. Modified some of the elements to more accuratly report about their arguments so the documentation builds more reasonable output. Added aviencoder and jpegencoder elements (not working yet) --- docs/Makefile.am | 7 +- docs/gst/Makefile.am | 70 +- docs/gst/gstreamer-decl.txt | 524 +++--- docs/gst/gstreamer-docs.sgml | 151 +- docs/gst/gstreamer-sections.txt | 772 ++++----- docs/gst/gstreamer.hierarchy | 25 +- docs/gst/gstreamer.types | 27 +- docs/gst/tmpl/audioraw.sgml | 22 + docs/gst/tmpl/cothreads.sgml | 118 ++ docs/gst/tmpl/gst.sgml | 9 +- docs/gst/tmpl/gstasyncdisksrc.sgml | 52 + docs/gst/tmpl/gstaudiosink.sgml | 24 + docs/gst/tmpl/gstaudiosrc.sgml | 41 + docs/gst/tmpl/gstbin.sgml | 9 +- docs/gst/tmpl/gstbuffer.sgml | 76 +- docs/gst/tmpl/gstconnection.sgml | 7 +- docs/gst/tmpl/gstdisksrc.sgml | 37 +- docs/gst/tmpl/gstelement.sgml | 100 +- docs/gst/tmpl/gstesdsink.sgml | 16 + docs/gst/tmpl/gstfakesink.sgml | 18 + docs/gst/tmpl/gstfakesrc.sgml | 16 + docs/gst/tmpl/gstfdsink.sgml | 21 + docs/gst/tmpl/gstfdsrc.sgml | 31 + docs/gst/tmpl/gstfilter.sgml | 11 +- docs/gst/tmpl/gsthttpsrc.sgml | 27 + docs/gst/tmpl/gstidentity.sgml | 16 + docs/gst/tmpl/gstlog.sgml | 32 + docs/gst/tmpl/gstmeta.sgml | 119 +- docs/gst/tmpl/gstobject.sgml | 16 +- docs/gst/tmpl/gstpad.sgml | 60 +- docs/gst/tmpl/gstpipeline.sgml | 4 +- docs/gst/tmpl/gstplugin.sgml | 34 +- docs/gst/tmpl/gstqueue.sgml | 44 +- docs/gst/tmpl/gstreamer-unused.sgml | 1539 ++++++++++++++++++ docs/gst/tmpl/gstsinesrc.sgml | 36 + docs/gst/tmpl/gstsink.sgml | 8 +- docs/gst/tmpl/gstsrc.sgml | 52 +- docs/gst/tmpl/gsttee.sgml | 8 +- docs/gst/tmpl/gstthread.sgml | 34 +- docs/gst/tmpl/gsttrace.sgml | 15 +- docs/gst/tmpl/gsttype.sgml | 58 +- docs/gst/tmpl/gstutils.sgml | 4 +- docs/gst/tmpl/gstxml.sgml | 5 +- docs/gst/tmpl/spectrum.sgml | 23 + docs/gst/tmpl/{plugin.sgml => videoraw.sgml} | 22 +- gst/elements/gstasyncdisksrc.h | 2 +- gst/elements/gstaudiosink.c | 9 +- gst/elements/gstaudiosink.h | 12 +- gst/elements/gstaudiosrc.c | 24 +- gst/elements/gstaudiosrc.h | 4 - gst/elements/gstdisksrc.c | 1 + gst/elements/gstesdsink.h | 8 - gst/elements/gstfakesink.c | 18 + gst/elements/gstfakesink.h | 2 - gst/elements/gstfakesrc.c | 15 + gst/elements/gstfakesrc.h | 2 - gst/elements/gstfdsink.c | 1 + gst/elements/gstfdsink.h | 3 - gst/elements/gstfdsrc.c | 2 +- gst/elements/gstidentity.c | 9 +- gst/elements/gstidentity.h | 2 - gst/elements/gstqueue.c | 2 + gst/elements/gstqueue.h | 3 - gst/elements/gstsinesrc.c | 11 +- gst/elements/gstsinesrc.h | 3 - gst/gstbin.c | 25 +- gst/gstbuffer.c | 56 + gst/gstbuffer.h | 3 +- gst/gstelement.c | 32 +- gst/gstelement.h | 2 +- gst/gstfilter.h | 2 +- gst/gstobject.c | 3 +- gst/gstobject.h | 10 +- gst/gstpad.c | 32 +- gst/gstpad.h | 23 +- gst/gstplugin.c | 7 + gst/gstsink.c | 9 + gst/gstsink.h | 2 +- gst/gstsrc.c | 15 +- gst/gstsrc.h | 14 +- gst/gsttee.c | 25 +- gst/gstthread.c | 23 +- gst/gstxml.c | 8 + gst/meta/videoraw.h | 42 +- plugins/elements/gstasyncdisksrc.h | 2 +- plugins/elements/gstaudiosink.c | 9 +- plugins/elements/gstaudiosink.h | 12 +- plugins/elements/gstaudiosrc.c | 24 +- plugins/elements/gstaudiosrc.h | 4 - plugins/elements/gstdisksrc.c | 1 + plugins/elements/gstesdsink.h | 8 - plugins/elements/gstfakesink.c | 18 + plugins/elements/gstfakesink.h | 2 - plugins/elements/gstfakesrc.c | 15 + plugins/elements/gstfakesrc.h | 2 - plugins/elements/gstfdsink.c | 1 + plugins/elements/gstfdsink.h | 3 - plugins/elements/gstfdsrc.c | 2 +- plugins/elements/gstidentity.c | 9 +- plugins/elements/gstidentity.h | 2 - plugins/elements/gstqueue.c | 2 + plugins/elements/gstqueue.h | 3 - plugins/elements/gstsinesrc.c | 11 +- plugins/elements/gstsinesrc.h | 3 - test/Makefile.am | 2 +- test/vidcapture.c | 56 + 106 files changed, 3825 insertions(+), 1172 deletions(-) create mode 100644 docs/gst/tmpl/audioraw.sgml create mode 100644 docs/gst/tmpl/cothreads.sgml create mode 100644 docs/gst/tmpl/gstasyncdisksrc.sgml create mode 100644 docs/gst/tmpl/gstaudiosink.sgml create mode 100644 docs/gst/tmpl/gstaudiosrc.sgml create mode 100644 docs/gst/tmpl/gstesdsink.sgml create mode 100644 docs/gst/tmpl/gstfakesink.sgml create mode 100644 docs/gst/tmpl/gstfakesrc.sgml create mode 100644 docs/gst/tmpl/gstfdsink.sgml create mode 100644 docs/gst/tmpl/gstfdsrc.sgml create mode 100644 docs/gst/tmpl/gsthttpsrc.sgml create mode 100644 docs/gst/tmpl/gstidentity.sgml create mode 100644 docs/gst/tmpl/gstlog.sgml create mode 100644 docs/gst/tmpl/gstreamer-unused.sgml create mode 100644 docs/gst/tmpl/gstsinesrc.sgml create mode 100644 docs/gst/tmpl/spectrum.sgml rename docs/gst/tmpl/{plugin.sgml => videoraw.sgml} (53%) create mode 100644 test/vidcapture.c diff --git a/docs/Makefile.am b/docs/Makefile.am index fd03b09df4..9e35835159 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,7 +1,8 @@ +SUBDIRS = if HAVE_GTK_DOC - SUBDIRS += gst manual + SUBDIRS += gst endif -DIST_SUBDIRS = gst manual +DIST_SUBDIRS = gst -#EXTRA_DIST = random slides +EXTRA_DIST = random slides diff --git a/docs/gst/Makefile.am b/docs/gst/Makefile.am index 186922bb8f..50000b56f1 100644 --- a/docs/gst/Makefile.am +++ b/docs/gst/Makefile.am @@ -10,34 +10,51 @@ DOC_MAIN_SGML_FILE=gstreamer-docs.sgml DOC_SOURCE_DIR=$(top_srcdir)/gst CFLAGS = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) -LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la +LDFLAGS = $(GLIB_LIBS) $(GTK_LIBS) $(top_srcdir)/gst/libgst.la $(top_srcdir)/gst/elements/libgstelements.la HTML_DIR=$(datadir)/gstreamer/gst/html TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) tmpl_sources = \ - tmpl/gst.sgml \ - tmpl/gstbin.sgml \ - tmpl/gstbuffer.sgml \ - tmpl/gstconnection.sgml \ - tmpl/gstelement.sgml \ - tmpl/gstfilter.sgml \ - tmpl/gstmeta.sgml \ - tmpl/gstobject.sgml \ - tmpl/gstpad.sgml \ - tmpl/gstpipeline.sgml \ - tmpl/gstplugin.sgml \ - tmpl/gstqueue.sgml \ - tmpl/gstsink.sgml \ - tmpl/gstsrc.sgml \ - tmpl/gsttee.sgml \ - tmpl/gstthread.sgml \ - tmpl/gsttrace.sgml \ - tmpl/gsttype.sgml \ - tmpl/gstutils.sgml \ - tmpl/gstxml.sgml \ - tmpl/plugin.sgml + tmpl/audioraw.sgml \ + tmpl/cothreads.sgml \ + tmpl/gst.sgml \ + tmpl/gstasyncdisksrc.sgml \ + tmpl/gstaudiosink.sgml \ + tmpl/gstaudiosrc.sgml \ + tmpl/gstbin.sgml \ + tmpl/gstbuffer.sgml \ + tmpl/gstconnection.sgml \ + tmpl/gstdisksrc.sgml \ + tmpl/gstelement.sgml \ + tmpl/gstesdsink.sgml \ + tmpl/gstfakesink.sgml \ + tmpl/gstfakesrc.sgml \ + tmpl/gstfdsink.sgml \ + tmpl/gstfdsrc.sgml \ + tmpl/gstfilter.sgml \ + tmpl/gsthttpsrc.sgml \ + tmpl/gstidentity.sgml \ + tmpl/gstlog.sgml \ + tmpl/gstmeta.sgml \ + tmpl/gstobject.sgml \ + tmpl/gstpad.sgml \ + tmpl/gstpipeline.sgml \ + tmpl/gstplugin.sgml \ + tmpl/gstqueue.sgml \ + tmpl/gstreamer-unused.sgml \ + tmpl/gstsinesrc.sgml \ + tmpl/gstsink.sgml \ + tmpl/gstsrc.sgml \ + tmpl/gsttee.sgml \ + tmpl/gstthread.sgml \ + tmpl/gsttrace.sgml \ + tmpl/gsttype.sgml \ + tmpl/gstutils.sgml \ + tmpl/gstxml.sgml \ + tmpl/spectrum.sgml \ + tmpl/videoraw.sgml gstreamer_docdir = $(HTML_DIR) gstreamer_doc_DATA = \ @@ -65,6 +82,9 @@ html/book1.html: sgml/gstreamer-doc.bottom sgml/gstreamer-doc.bottom: $(tmpl_sources) $(MAKE) sgml +gstreamer-decl.txt: + $(MAKE) scan + scanobj: env CC="$(LIBTOOL) --mode=link $(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ gtkdoc-scanobj --module=$(DOC_MODULE) \ @@ -73,10 +93,10 @@ scanobj: scan: gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="gsttypefind.h" -tmpl: scan +tmpl: scanobj scan gtkdoc-mktmpl --module=$(DOC_MODULE) -sgml: +sgml: tmpl gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) html: @@ -84,7 +104,7 @@ html: -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) clean-local: - rm -f *~ *.bak *.signals *-unused.txt + rm -f *~ *.bak *.signals *-unused.txt *.args maintainer-clean-local: clean rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt diff --git a/docs/gst/gstreamer-decl.txt b/docs/gst/gstreamer-decl.txt index ecf6df0b35..1ad134b115 100644 --- a/docs/gst/gstreamer-decl.txt +++ b/docs/gst/gstreamer-decl.txt @@ -136,6 +136,25 @@ struct GstBin { cothread_context *threadcontext; }; + +GstBinClass +struct GstBinClass { + GstElementClass parent_class; + + void (*object_added) (GstObject *object,GstObject *child); + + /* change the state of elements of the given type */ + gboolean (*change_state_type) (GstBin *bin, + GstElementState state, + GtkType type); + + /* create a plan for the execution of the bin */ + void (*create_plan) (GstBin *bin); + + /* run a full iteration of operation */ + void (*iterate) (GstBin *bin); +}; + gst_bin_get_type GtkType @@ -183,7 +202,8 @@ GstBin *bin GST_BUFFER -#define GST_BUFFER(buf) ((GstBuffer *)(buf)) +#define GST_BUFFER(buf) \ + ((GstBuffer *)(buf)) GST_BUFFER_FLAGS @@ -376,6 +396,15 @@ struct GstConnection { GstElement element; }; + +GstConnectionClass +struct GstConnectionClass { + GstElementClass parent_class; + + /* push function */ + void (*push) (GstConnection *connection); +}; + gst_connection_get_type GtkType @@ -450,7 +479,7 @@ gst_info("unset '%s' state %d\n",gst_element_get_name(obj),flag); \ GST_IS_ELEMENT_CLASS #define GST_IS_ELEMENT_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT)) GstElement @@ -488,6 +517,32 @@ struct GstElement { }; +GstElementClass +struct GstElementClass { + GstObjectClass parent_class; + + /* the elementfactory that created us */ + GstElementFactory *elementfactory; + + /* signal callbacks */ + void (*state_change) (GstElement *element,GstElementState state); + void (*new_pad) (GstElement *element,GstPad *pad); + void (*new_ghost_pad) (GstElement *element,GstPad *pad); + void (*error) (GstElement *element,gchar *error); + + /* events */ + gboolean (*start) (GstElement *element,GstElementState state); + gboolean (*stop) (GstElement *element); + + /* change the element state */ + gboolean (*change_state) (GstElement *element,GstElementState state); + + /* create or read XML representation of self */ + xmlNodePtr (*save_thyself)(GstElement *element,xmlNodePtr parent); + void (*restore_thyself)(GstElement *element,xmlNodePtr *self); +}; + + GstElementDetails struct GstElementDetails { gchar *longname; /* long, english name */ @@ -649,7 +704,7 @@ int argc,char **argv GST_IS_FILTER_CLASS #define GST_IS_FILTER_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FILTER))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FILTER)) GstFilter @@ -663,6 +718,12 @@ struct GstFilter { GstElement element; }; + +GstFilterClass +struct GstFilterClass { + GstElementClass parent_class; +}; + gst_filter_get_type GtkType @@ -780,7 +841,7 @@ GstMeta *meta GST_IS_OBJECT_CLASS #define GST_IS_OBJECT_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_OBJECT))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_OBJECT)) GstObject @@ -807,6 +868,17 @@ struct GstObject { GstObject *parent; }; + +GstObjectClass +struct GstObjectClass { + GtkObjectClass parent_class; + + /* signals */ + void (*parent_set) (GstObject *object,GstObject *parent); + + /* functions go here */ +}; + GST_FLAGS #define GST_FLAGS(obj) GTK_OBJECT_FLAGS(obj) @@ -862,48 +934,49 @@ GstObject *object gst_object_ref -#define gst_object_ref(obj) gtk_object_ref(GTK_OBJECT(obj)); +#define gst_object_ref(object) gtk_object_ref(GTK_OBJECT(object)); gst_object_unref -#define gst_object_unref(obj) gtk_object_unref(GTK_OBJECT(obj)); +#define gst_object_unref(object) gtk_object_unref(GTK_OBJECT(object)); gst_object_sink -#define gst_object_sink(obj) gtk_object_sink(GTK_OBJECT(obj)); +#define gst_object_sink(object) gtk_object_sink(GTK_OBJECT(object)); gst_object_destroy -#define gst_object_destroy(obj) gtk_object_destroy(GTK_OBJECT(obj)) +#define gst_object_destroy(object) gtk_object_destroy(GTK_OBJECT(object)) GST_TYPE_PAD -#define GST_TYPE_PAD \ - (gst_pad_get_type()) +#define GST_TYPE_PAD (gst_pad_get_type()) GST_PAD -#define GST_PAD(obj) \ - (GTK_CHECK_CAST((obj),GST_TYPE_PAD,GstPad)) +#define GST_PAD(obj) (GTK_CHECK_CAST((obj),GST_TYPE_PAD,GstPad)) GST_PAD_CLASS -#define GST_PAD_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_PAD,GstPadClass)) +#define GST_PAD_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_PAD,GstPadClass)) GST_IS_PAD -#define GST_IS_PAD(obj) \ - (GTK_CHECK_TYPE((obj),GST_TYPE_PAD)) +#define GST_IS_PAD(obj) (GTK_CHECK_TYPE((obj),GST_TYPE_PAD)) GST_IS_PAD_CLASS -#define GST_IS_PAD_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PAD))) +#define GST_IS_PAD_CLASS(obj) (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PAD)) GST_PAD_CONNECTED -#define GST_PAD_CONNECTED(pad) ((pad)->peer != NULL) +#define GST_PAD_CONNECTED(pad) \ + ((pad)->peer != NULL) + + +GST_PAD_CAN_PULL +#define GST_PAD_CAN_PULL(pad) \ + ((pad)->pull != NULL) GstPad @@ -917,6 +990,11 @@ GstObject *object GstPad *pad,GstBuffer *buf +GstPadPullFunction +GstBuffer * +GstPad *pad + + GstPadPushFunction void GstPad *pad @@ -944,11 +1022,18 @@ struct GstPad { GstBuffer *bufpen; GstPadChainFunction chain; + GstPadPullFunction pull; GstObject *parent; GList *ghostparents; }; + +GstPadClass +struct GstPadClass { + GstObjectClass parent_class; +}; + gst_pad_get_type GtkType @@ -975,8 +1060,13 @@ GstPad *pad GstPad *pad,GstPadChainFunction chain +gst_pad_set_pull_function +void +GstPad *pad, GstPadPullFunction pull + + gst_pad_get_type_id -guint32 +guint16 GstPad *pad @@ -999,11 +1089,6 @@ GstPad *pad #define gst_pad_destroy(pad) gst_object_destroy(GST_OBJECT(pad)) -gst_pad_get_directory -GstPadDirection -GstPad *pad - - gst_pad_set_parent void GstPad *pad,GstObject *parent @@ -1090,6 +1175,12 @@ struct GstPipeline { GstBin bin; }; + +GstPipelineClass +struct GstPipelineClass { + GstBinClass parent_class; +}; + gst_pipeline_get_type GtkType @@ -1141,11 +1232,6 @@ gchar *name gst_plugin_set_longname void GstPlugin *plugin,gchar *longname - - -gst_plugin_init -void - gst_plugin_load_all @@ -1158,6 +1244,11 @@ GstPlugin *plugin,gchar *longname gchar *name +gst_library_load +gboolean +gchar *name + + gst_plugin_load_absolute gboolean gchar *name @@ -1205,7 +1296,7 @@ gchar *name GST_IS_SINK_CLASS #define GST_IS_SINK_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINK))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINK)) GstSink @@ -1219,6 +1310,12 @@ struct GstSink { GstElement element; }; + +GstSinkClass +struct GstSinkClass { + GstElementClass parent_class; +}; + gst_sink_get_type GtkType @@ -1252,7 +1349,7 @@ gchar *name GST_IS_SRC_CLASS #define GST_IS_SRC_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC)) GstSrcFlags @@ -1262,11 +1359,13 @@ typedef enum { GST_SRC_FLAGS -#define GST_SRC_FLAGS(obj) (GST_SRC(obj)->flags) +#define GST_SRC_FLAGS(obj) \ + (GST_SRC(obj)->flags) GST_SRC_ASYNC -#define GST_SRC_ASYNC(obj) ((GST_SRC_FLAGS(obj) & GST_SRC_ASYNC) +#define GST_SRC_ASYNC(obj) \ + ((GST_SRC_FLAGS(obj) & GST_SRC_ASYNC)) GstSrc @@ -1281,13 +1380,28 @@ struct GstSrc { gint32 flags; }; + +GstSrcClass +struct GstSrcClass { + GstElementClass parent_class; + + /* subclass functions */ + void (*push) (GstSrc *src); + void (*push_region) (GstSrc *src,gulong offset,gulong size); + + /* signals */ + void (*eos) (GstSrc *src); +}; + GST_SRC_SET_FLAGS -#define GST_SRC_SET_FLAGS(src,flag) G_STMT_START{ (GST_SRC_FLAGS (src) |= (flag)); }G_STMT_END +#define GST_SRC_SET_FLAGS(src,flag) \ + G_STMT_START{ (GST_SRC_FLAGS (src) |= (flag)); }G_STMT_END GST_SRC_UNSET_FLAGS -#define GST_SRC_UNSET_FLAGS(src,flag) G_STMT_START{ (GST_SRC_FLAGS (src) &= ~(flag)); }G_STMT_END +#define GST_SRC_UNSET_FLAGS(src,flag) \ + G_STMT_START{ (GST_SRC_FLAGS (src) &= ~(flag)); }G_STMT_END gst_src_get_type @@ -1351,6 +1465,12 @@ struct GstTee { GSList *srcpads; }; + +GstTeeClass +struct GstTeeClass { + GstFilterClass parent_class; +}; + gst_tee_get_type GtkType @@ -1423,6 +1543,12 @@ struct GstThread { GCond *cond; /* used to control the thread */ }; + +GstThreadClass +struct GstThreadClass { + GstBinClass parent_class; +}; + gst_thread_get_type GtkType @@ -1557,11 +1683,6 @@ struct GstTypeFactory { }; -gst_type_initialize -void - - - gst_type_register guint16 GstTypeFactory *factory @@ -1646,26 +1767,6 @@ GtkObject *object,guchar *argname xmlDocPtr GstElement *element - -plugin_initialize -void - - - -plugin_load_all -void - - - -plugin_load -GModule * -gchar *name - - -plugin_load_absolute -GModule * -gchar *name - GST_TYPE_ASYNCDISKSRC #define GST_TYPE_ASYNCDISKSRC \ @@ -1689,7 +1790,7 @@ gchar *name GST_IS_ASYNCDISKSRC_CLASS #define GST_IS_ASYNCDISKSRC_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC)) GstAsyncDiskSrcFlags @@ -1726,6 +1827,12 @@ struct GstAsyncDiskSrc { gulong seq; /* buffer sequence number */ }; + +GstAsyncDiskSrcClass +struct GstAsyncDiskSrcClass { + GstSrcClass parent_class; +}; + gst_asyncdisksrc_get_type GtkType @@ -1765,7 +1872,7 @@ void GstAudioSink struct GstAudioSink { - GstFilter filter; + GstSink sink; GstPad *sinkpad; @@ -1776,41 +1883,20 @@ struct GstAudioSink { gint frequency; }; + +GstAudioSinkClass +struct GstAudioSinkClass { + GstSinkClass parent_class; + + /* signals */ + void (*handoff) (GstElement *element,GstPad *pad); +}; + gst_audiosink_get_type GtkType void - -gst_audiosink_new -GstElement * -gchar *name - - -gst_audiosink_chain -void -GstPad *pad,GstBuffer *buf - - -gst_audiosink_sync_parms -void -GstAudioSink *audiosink - - -gst_audiosink_set_format -void -GstAudioSink *audiosink,gint format - - -gst_audiosink_set_channels -void -GstAudioSink *audiosink,gint channels - - -gst_audiosink_set_frequency -void -GstAudioSink *audiosink,gint frequency - GST_TYPE_AUDIOSRC #define GST_TYPE_AUDIOSRC \ @@ -1851,7 +1937,6 @@ struct GstAudioSrc { GstPad *srcpad; /* sound card */ - gchar *filename; gint fd; /* audio parameters */ @@ -1868,21 +1953,17 @@ struct GstAudioSrc { MetaAudioRaw *meta; }; + +GstAudioSrcClass +struct GstAudioSrcClass { + GstSrcClass parent_class; +}; + gst_audiosrc_get_type GtkType void - -gst_audiosrc_new -GstElement * -gchar *name - - -gst_audiosrc_push -void -GstSrc *src - GST_TYPE_DISKSRC #define GST_TYPE_DISKSRC \ @@ -1938,6 +2019,12 @@ struct GstDiskSrc { gulong seq; /* buffer sequence number */ }; + +GstDiskSrcClass +struct GstDiskSrcClass { + GstSrcClass parent_class; +}; + gst_disksrc_get_type GtkType @@ -1989,41 +2076,20 @@ struct GstEsdSink { gint frequency; }; + +GstEsdSinkClass +struct GstEsdSinkClass { + GstFilterClass parent_class; + + /* signals */ + void (*handoff) (GstElement *element,GstPad *pad); +}; + gst_esdsink_get_type GtkType void - -gst_esdsink_new -GstElement * -gchar *name - - -gst_esdsink_chain -void -GstPad *pad,GstBuffer *buf - - -gst_esdsink_sync_parms -void -GstEsdSink *esdsink - - -gst_esdsink_set_format -void -GstEsdSink *esdsink,gint format - - -gst_esdsink_set_channels -void -GstEsdSink *esdsink,gint channels - - -gst_esdsink_set_frequency -void -GstEsdSink *esdsink,gint frequency - GST_TYPE_FAKESINK #define GST_TYPE_FAKESINK \ @@ -2063,21 +2129,17 @@ struct GstFakeSink { GstPad *sinkpad; }; + +GstFakeSinkClass +struct GstFakeSinkClass { + GstSinkClass parent_class; +}; + gst_fakesink_get_type GtkType void - -gst_fakesink_new -GstElement * -gchar *name - - -gst_fakesink_chain -void -GstPad *pad,GstBuffer *buf - GST_TYPE_FAKESRC #define GST_TYPE_FAKESRC \ @@ -2117,21 +2179,17 @@ struct GstFakeSrc { GstPad *srcpad; }; + +GstFakeSrcClass +struct GstFakeSrcClass { + GstSrcClass parent_class; +}; + gst_fakesrc_get_type GtkType void - -gst_fakesrc_new -GstElement * -gchar *name - - -gst_fakesrc_push -void -GstSrc *src - GST_TYPE_FDSINK #define GST_TYPE_FDSINK \ @@ -2173,26 +2231,17 @@ struct GstFdSink { int fd; }; + +GstFdSinkClass +struct GstFdSinkClass { + GstSinkClass parent_class; +}; + gst_fdsink_get_type GtkType void - -gst_fdsink_new -GstElement * -gchar *name - - -gst_fdsink_new_with_fd -GstElement * -gchar *name,gint fd - - -gst_fdsink_chain -void -GstPad *pad,GstBuffer *buf - GST_TYPE_FDSRC #define GST_TYPE_FDSRC \ @@ -2240,6 +2289,12 @@ struct GstFdSrc { gulong seq; /* buffer sequence number */ }; + +GstFdSrcClass +struct GstFdSrcClass { + GstSrcClass parent_class; +}; + gst_fdsrc_get_type GtkType @@ -2291,6 +2346,12 @@ struct GstHttpSrc { gulong bytes_per_read; /* bytes per read */ }; + +GstHttpSrcClass +struct GstHttpSrcClass { + GstSrcClass parent_class; +}; + gst_httpsrc_get_type GtkType @@ -2338,21 +2399,17 @@ struct GstIdentity { gint control; }; + +GstIdentityClass +struct GstIdentityClass { + GstFilterClass parent_class; +}; + gst_identity_get_type GtkType void - -gst_identity_new -GstElement * -gchar *name - - -gst_identity_chain -void -GstPad *pad,GstBuffer *buf - GST_TYPE_QUEUE #define GST_TYPE_QUEUE \ @@ -2397,12 +2454,21 @@ struct GstQueue { GList *tail; /* have to keep track of this myself */ gint level_buffers; /* number of buffers queued here */ + gint max_buffers; /* maximum number of buffers queued here */ gint level_bytes; /* number of bytes queued here */ gint size_buffers; /* size of queue in buffers */ gint size_bytes; /* size of queue in bytes */ - GMutex *waiterlock; /* used when the queue is empty */ - GCond *waitercond; + GMutex *emptylock; /* used when the queue is empty */ + GCond *emptycond; + GMutex *fulllock; /* used when the queue is full */ + GCond *fullcond; +}; + + +GstQueueClass +struct GstQueueClass { + GstConnectionClass parent_class; }; @@ -2410,21 +2476,6 @@ struct GstQueue { GtkType void - -gst_queue_new -GstElement * -gchar *name - - -gst_queue_chain -void -GstPad *pad,GstBuffer *buf - - -gst_queue_push -void -GstConnection *connection - GST_TYPE_SINESRC #define GST_TYPE_SINESRC \ @@ -2479,21 +2530,17 @@ struct GstSineSrc { gboolean sentmeta; }; + +GstSineSrcClass +struct GstSineSrcClass { + GstSrcClass parent_class; +}; + gst_sinesrc_get_type GtkType void - -gst_sinesrc_new -GstElement * -gchar *name - - -gst_sinesrc_push -void -GstSrc *src - MetaAudioRaw @@ -2528,3 +2575,68 @@ struct MetaAudioSpectrum { gint16 steps; }; + +MetaVideoRaw + + +MetaDGA + + +MetaOverlay + + +OverlayClip + + +OverlayClip +struct OverlayClip { + int x1, x2, y1, y2; +}; + + +MetaDGA +struct MetaDGA { + // the base address of the screen + void *base; + // the dimensions of the screen + int swidth, sheight; + // the number of bytes in a line + int bytes_per_line; +}; + + +MetaOverlay +struct MetaOverlay { + // the position of the window + int wx, wy; + // a reference to the object sending overlay change events + GtkWidget *overlay_element; + // the number of overlay regions + int clip_count; + // the overlay regions of the display window + struct _OverlayClip overlay_clip[32]; + + gint width; + gint height; + + gboolean did_overlay; + gboolean fully_obscured; +}; + + +MetaVideoRaw +struct MetaVideoRaw { + GstMeta meta; + + /* formatting information */ + gint format; + GdkVisual *visual; + // dimensions of the video buffer + gint width; + gint height; + // a pointer to the overlay info if the sink supports this + MetaOverlay *overlay_info; + // a pointer to the DGA info if the sink supports this + MetaDGA *dga_info; +}; + diff --git a/docs/gst/gstreamer-docs.sgml b/docs/gst/gstreamer-docs.sgml index 104241b114..ddc55c9558 100644 --- a/docs/gst/gstreamer-docs.sgml +++ b/docs/gst/gstreamer-docs.sgml @@ -1,39 +1,47 @@ - - + + + + + - + + + + - - - - + + + + + + + + - - - - + + - + + + + + + + + + + ]> @@ -61,38 +69,85 @@ with some more specialized elements. &GstSrc; &GstBuffer; &GstPad; + &GstConnection; &GstPlugin; + &GstThread; + &GstTee; - &gstreamer-gsttype; - &gstreamer-gstmeta; - &gstreamer-gstutils; - &gstreamer-gsttrace; + &GstType; + &GstMeta; + &GstUtils; + &GstTrace; + &GstXml; - Index diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 76869e107d..f1965faf72 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -1,77 +1,35 @@ +gst/gst.h +
-gstobject -GstObject -GstObject -GST_FLAGS -GST_FLAG_IS_SET -GST_FLAG_SET -GST_FLAG_UNSET -GST_LOCK -GST_TRYLOCK -GST_UNLOCK -gst_object_new -gst_object_set_parent -gst_object_get_parent -gst_object_unparent -gst_object_ref -gst_object_unref -gst_object_sink -gst_object_destroy +cothreads +COTHREAD_STACKSIZE +COTHREAD_MAXTHREADS +STACK_SIZE +CURRENT_STACK_FRAME +cothread_state +cothread_context +cothread_func +COTHREAD_STARTED +cothread_init +cothread_create +cothread_setfunc +cothread_switch +cothread_main -gst_object_get_type -GST_TYPE_OBJECT -GST_IS_OBJECT -GST_OBJECT_CLASS -GST_IS_OBJECT_CLASS
-gstelement -GstElement -GstElementState -GST_STATE -GST_STATE_IS_SET -GST_STATE_SET -GST_STATE_UNSET -GstElementDetails -GstElementFactory -GstElementLoopFunction -GstElement -gst_element_new -gst_element_set_loop_function -gst_element_set_name -gst_element_get_name -gst_element_set_manager -gst_element_get_manager -gst_element_add_pad -gst_element_add_ghost_pad -gst_element_get_pad -gst_element_get_pad_list -gst_element_connect -gst_element_set_state -gst_element_error -gst_element_change_state -gst_element_destroy -gst_element_save_thyself -gst_elementfactory_new -gst_elementfactory_register -gst_elementfactory_find -gst_elementfactory_get_list -gst_elementfactory_create -gst_elementfactory_make -gst_element_loopfunc_wrapper +gst +Gst +gst_init +DEBUG -gst_element_get_type -GST_TYPE_ELEMENT -GST_IS_ELEMENT -GST_ELEMENT_CLASS -GST_IS_ELEMENT_CLASS
gstbin -GST_BIN GstBin +GstBin gst_bin_new gst_bin_add gst_bin_remove @@ -81,17 +39,20 @@ gst_bin_set_state_type gst_bin_iterate gst_bin_create_plan -GST_TYPE_BIN -GST_IS_BIN +GstBinClass gst_bin_get_type +GST_TYPE_BIN +GST_BIN GST_BIN_CLASS +GST_IS_BIN GST_IS_BIN_CLASS
gstbuffer -GST_BUFFER +GstBuffer GST_BUFFER_FLAGS +GST_BUFFER_FLAG_IS_SET GST_BUFFER_FLAG_SET GST_BUFFER_FLAG_UNSET GST_BUFFER_TYPE @@ -116,40 +77,96 @@ gst_buffer_get_first_meta gst_buffer_get_metas gst_buffer_remove_meta -GST_BUFFER_FLAG_IS_SET +GST_BUFFER
gstconnection -GST_CONNECTION GstConnection +GstConnection gst_connection_new gst_connection_push GST_TYPE_CONNECTION -GST_IS_CONNECTION gst_connection_get_type +GST_CONNECTION GST_CONNECTION_CLASS +GST_IS_CONNECTION GST_IS_CONNECTION_CLASS +GstConnectionClass +
+ +
+gstelement +GstElement +GstElementState +GST_STATE +GST_STATE_IS_SET +GST_STATE_SET +GST_STATE_UNSET +GstElement +GstElementDetails +GstElementFactory +GstElementLoopFunction +gst_element_new +gst_element_set_loop_function +gst_element_set_name +gst_element_get_name +gst_element_set_manager +gst_element_get_manager +gst_element_add_pad +gst_element_add_ghost_pad +gst_element_get_pad +gst_element_get_pad_list +gst_element_connect +gst_element_set_state +gst_element_error +gst_element_change_state +gst_element_destroy +gst_element_save_thyself +gst_elementfactory_new +gst_elementfactory_register +gst_elementfactory_find +gst_elementfactory_get_list +gst_elementfactory_create +gst_elementfactory_make +gst_element_loopfunc_wrapper + +GstElementClass +GST_TYPE_ELEMENT +GST_ELEMENT +GST_ELEMENT_CLASS +GST_IS_ELEMENT +GST_IS_ELEMENT_CLASS +gst_element_get_type
gstfilter -GST_FILTER GstFilter +GstFilter gst_filter_new -GST_TYPE_FILTER -GST_IS_FILTER +GstFilterClass gst_filter_get_type +GST_TYPE_FILTER +GST_FILTER GST_FILTER_CLASS +GST_IS_FILTER GST_IS_FILTER_CLASS
+
+gstlog +GST_SHOW_INFO +gst_info + +
+
gstmeta -GST_META GST_META_FLAGS +GST_META_FLAG_IS_SET GST_META_FLAG_SET GST_META_FLAG_UNSET GstMetaFlags @@ -159,26 +176,57 @@ gst_meta_new gst_meta_ref gst_meta_unref -GST_META_FLAG_IS_SET +GST_META +
+ +
+gstobject +GstObject +GstObject +GST_FLAGS +GST_FLAG_IS_SET +GST_FLAG_SET +GST_FLAG_UNSET +GST_LOCK +GST_TRYLOCK +GST_UNLOCK +gst_object_new +gst_object_set_parent +gst_object_get_parent +gst_object_unparent +gst_object_ref +gst_object_unref +gst_object_sink +gst_object_destroy + +gst_object_get_type +GstObjectClass +GST_TYPE_OBJECT +GST_OBJECT +GST_OBJECT_CLASS +GST_IS_OBJECT +GST_IS_OBJECT_CLASS
gstpad -GST_PAD +GstPad GST_PAD_CONNECTED +GST_PAD_CAN_PULL +GstPad GstPadChainFunction +GstPadPullFunction GstPadPushFunction GstPadDirection -GstPad gst_pad_new gst_pad_destroy gst_pad_get_direction gst_pad_set_chain_function +gst_pad_set_pull_function gst_pad_get_type_id gst_pad_set_type_id gst_pad_set_name gst_pad_get_name -gst_pad_get_directory gst_pad_set_parent gst_pad_add_ghost_parent gst_pad_remove_ghost_parent @@ -190,326 +238,126 @@ gst_pad_push gst_pad_pull gst_pad_save_thyself +GstPadClass GST_TYPE_PAD -GST_IS_PAD -gst_pad_get_type +GST_PAD GST_PAD_CLASS +GST_IS_PAD GST_IS_PAD_CLASS +gst_pad_get_type
gstpipeline -GstPipeline GstPipeline +GstPipeline gst_pipeline_new gst_pipeline_destroy gst_pipeline_iterate +GstPipelineClass gst_pipeline_get_type GST_TYPE_PIPELINE -GST_IS_PIPELINE +GST_PIPELINE GST_PIPELINE_CLASS +GST_IS_PIPELINE GST_IS_PIPELINE_CLASS
-
-gstsink -GST_SINK -GstSink -gst_sink_new - -GST_TYPE_SINK -GST_IS_SINK -gst_sink_get_type -GST_SINK_CLASS -GST_IS_SINK_CLASS -
- -
-gstsrc -GST_SRC -GstSrcFlags -GST_SRC_FLAGS -GST_SRC_ASYNC -GstSrc -GST_SRC_SET_FLAGS -GST_SRC_UNSET_FLAGS -gst_src_signal_eos -gst_src_push -gst_src_push_region - -GST_TYPE_SRC -GST_IS_SRC -gst_src_get_type -GST_SRC_CLASS -GST_IS_SRC_CLASS -
- -
-gsttee -GST_TEE -GstTee -gst_tee_new -gst_tee_chain -gst_tee_new_pad - -GST_TYPE_TEE -GST_IS_TEE -gst_tee_get_type -GST_TEE_CLASS -GST_IS_TEE_CLASS -
- -
-gstthread -GstThreadState -GST_THREAD -GstThread -gst_thread_new -gst_thread_main_loop -gst_thread_iterate - -GST_TYPE_THREAD -GST_IS_THREAD -gst_thread_get_type -GST_THREAD_CLASS -GST_IS_THREAD_CLASS -
- -
-gstasyncdisksrc -GST_ASYNCDISKSRC -GstAsyncDiskSrcFlags -GstAsyncDiskSrc - -GST_TYPE_ASYNCDISKSRC -GST_IS_ASYNCDISKSRC -gst_asyncdisksrc_get_type -GST_ASYNCDISKSRC_CLASS -GST_IS_ASYNCDISKSRC_CLASS -
- -
-gstaudiosink -GST_AUDIOSINK -GstAudioSink -gst_audiosink_new -gst_audiosink_chain -gst_audiosink_sync_parms -gst_audiosink_set_format -gst_audiosink_set_channels -gst_audiosink_set_frequency - -GST_TYPE_AUDIOSINK -GST_IS_AUDIOSINK -gst_audiosink_get_type -GST_AUDIOSINK_CLASS -GST_IS_AUDIOSINK_CLASS -
- -
-gstaudiosrc -GST_AUDIOSRC -GstAudioSrc -gst_audiosrc_new -gst_audiosrc_push - -GST_TYPE_AUDIOSRC -GST_IS_AUDIOSRC -gst_audiosrc_get_type -GST_AUDIOSRC_CLASS -GST_IS_AUDIOSRC_CLASS -
- -
-gstdisksrc -GST_DISKSRC -GstDiskSrcFlags -GstDiskSrc - -GST_TYPE_DISKSRC -GST_IS_DISKSRC -gst_disksrc_get_type -GST_DISKSRC_CLASS -GST_IS_DISKSRC_CLASS -
- -
-gstesdsink -GST_ESDSINK -GstEsdSink -gst_esdsink_new -gst_esdsink_chain -gst_esdsink_sync_parms -gst_esdsink_set_format -gst_esdsink_set_channels -gst_esdsink_set_frequency - -GST_TYPE_ESDSINK -GST_IS_ESDSINK -gst_esdsink_get_type -GST_ESDSINK_CLASS -GST_IS_ESDSINK_CLASS -
- -
-gstfakesink -GST_FAKESINK -GstFakeSink -gst_fakesink_new -gst_fakesink_chain - -GST_TYPE_FAKESINK -GST_IS_FAKESINK -gst_fakesink_get_type -GST_FAKESINK_CLASS -GST_IS_FAKESINK_CLASS -
- -
-gstfakesrc -GST_FAKESRC -GstFakeSrc -gst_fakesrc_new -gst_fakesrc_push - -GST_TYPE_FAKESRC -GST_IS_FAKESRC -gst_fakesrc_get_type -GST_FAKESRC_CLASS -GST_IS_FAKESRC_CLASS -
- -
-gstfdsink -GST_FDSINK -GstFdSink -gst_fdsink_new -gst_fdsink_new_with_fd -gst_fdsink_chain - -GST_TYPE_FDSINK -GST_IS_FDSINK -gst_fdsink_get_type -GST_FDSINK_CLASS -GST_IS_FDSINK_CLASS -
- -
-gstfdsrc -GST_FDSRC -GstFdSrc - -GST_TYPE_FDSRC -GST_IS_FDSRC -gst_fdsrc_get_type -GST_FDSRC_CLASS -GST_IS_FDSRC_CLASS -
- -
-gsthttpsrc -GST_HTTPSRC -GstHttpSrc - -GST_TYPE_HTTPSRC -GST_IS_HTTPSRC -gst_httpsrc_get_type -GST_HTTPSRC_CLASS -GST_IS_HTTPSRC_CLASS -
- -
-gstidentity -GST_IDENTITY -GstIdentity -gst_identity_new -gst_identity_chain - -GST_TYPE_IDENTITY -GST_IS_IDENTITY -gst_identity_get_type -GST_IDENTITY_CLASS -GST_IS_IDENTITY_CLASS -
- -
-gstqueue -GST_QUEUE -GstQueue -gst_queue_new -gst_queue_chain -gst_queue_push - -GST_TYPE_QUEUE -GST_IS_QUEUE -gst_queue_get_type -GST_QUEUE_CLASS -GST_IS_QUEUE_CLASS -
- -
-gstsinesrc -GST_SINESRC -GstSineSrc -gst_sinesrc_new -gst_sinesrc_push - -GST_TYPE_SINESRC -GST_IS_SINESRC -gst_sinesrc_get_type -GST_SINESRC_CLASS -GST_IS_SINESRC_CLASS -
- -
-cothreads -COTHREAD_STACKSIZE -COTHREAD_MAXTHREADS -STACK_SIZE -CURRENT_STACK_FRAME -cothread_state -cothread_context -cothread_func -COTHREAD_STARTED -cothread_init -cothread_create -cothread_setfunc -cothread_switch -cothread_main -
- -
-gst -gst_init -DEBUG -
- -
-gstlog -GST_SHOW_INFO -gst_info -
-
gstplugin +GstPlugin GstPlugin GstPluginElement GstPluginInitFunc gst_plugin_new gst_plugin_set_longname -gst_plugin_init gst_plugin_load_all gst_plugin_load +gst_library_load gst_plugin_load_absolute gst_plugin_add_factory gst_plugin_find gst_plugin_get_list gst_plugin_find_elementfactory + +
+ +
+gstsink +GstSink +GstSink +gst_sink_new + +GstSinkClass +gst_sink_get_type +GST_TYPE_SINK +GST_SINK +GST_SINK_CLASS +GST_IS_SINK +GST_IS_SINK_CLASS +
+ +
+gstsrc +GstSrc +GstSrcFlags +GST_SRC_FLAGS +GST_SRC_ASYNC +GST_SRC_SET_FLAGS +GST_SRC_UNSET_FLAGS +GstSrc +gst_src_signal_eos +gst_src_push +gst_src_push_region + +gst_src_get_type +GstSrcClass +GST_TYPE_SRC +GST_SRC +GST_SRC_CLASS +GST_IS_SRC +GST_IS_SRC_CLASS +
+ +
+gsttee +GstTee +GstTee +gst_tee_new +gst_tee_chain +gst_tee_new_pad + +gst_tee_get_type +GstTeeClass +GST_TYPE_TEE +GST_TEE +GST_TEE_CLASS +GST_IS_TEE +GST_IS_TEE_CLASS +
+ +
+gstthread +GstThread +GstThreadState +GstThread +gst_thread_new +gst_thread_main_loop +gst_thread_iterate + +GstThreadClass +gst_thread_get_type +GST_TYPE_THREAD +GST_THREAD +GST_THREAD_CLASS +GST_IS_THREAD +GST_IS_THREAD_CLASS
gsttrace +GstTrace gst_trace_read_tsc GstTrace GstTraceEntry @@ -522,14 +370,15 @@ gst_trace_get_remaining gst_trace_set_default TRACE_ENABLE gst_trace_add_entry +
gsttype +GstType GstTypeFindFunc GstType GstTypeFactory -gst_type_initialize gst_type_register gst_type_find_by_mime gst_type_find_by_ext @@ -539,10 +388,12 @@ gst_type_get_srcs gst_type_get_sinks gst_type_find_by_id gst_type_get_list +
gstutils +GstUtils gst_util_get_int_arg gst_util_get_long_arg gst_util_get_float_arg @@ -550,19 +401,197 @@ gst_util_get_double_arg gst_util_get_string_arg gst_util_get_pointer_arg gst_util_get_widget_arg +
gstxml +GstXml gst_xml_write
-plugin -plugin_initialize -plugin_load_all -plugin_load -plugin_load_absolute +gstasyncdisksrc +GstAsyncDiskSrc +GstAsyncDiskSrcFlags + +GstAsyncDiskSrc +GstAsyncDiskSrcClass +gst_asyncdisksrc_get_type +GST_TYPE_ASYNCDISKSRC +GST_ASYNCDISKSRC +GST_ASYNCDISKSRC_CLASS +GST_IS_ASYNCDISKSRC +GST_IS_ASYNCDISKSRC_CLASS +
+ +
+gstaudiosink +GstAudioSink + +GstAudioSink +GstAudioSinkClass +gst_audiosink_get_type +GST_TYPE_AUDIOSINK +GST_AUDIOSINK +GST_AUDIOSINK_CLASS +GST_IS_AUDIOSINK +GST_IS_AUDIOSINK_CLASS +
+ +
+gstaudiosrc +GstAudioSrc + +GstAudioSrc +GstAudioSrcClass +gst_audiosrc_get_type +GST_TYPE_AUDIOSRC +GST_AUDIOSRC +GST_AUDIOSRC_CLASS +GST_IS_AUDIOSRC +GST_IS_AUDIOSRC_CLASS +
+ +
+gstdisksrc +GstDiskSrc +GstDiskSrcFlags + +GstDiskSrc +GstDiskSrcClass +gst_disksrc_get_type +GST_TYPE_DISKSRC +GST_DISKSRC +GST_DISKSRC_CLASS +GST_IS_DISKSRC +GST_IS_DISKSRC_CLASS +
+ +
+gstesdsink +GstEsdSink + +GstEsdSink +GstEsdSinkClass +gst_esdsink_get_type +GST_TYPE_ESDSINK +GST_ESDSINK +GST_ESDSINK_CLASS +GST_IS_ESDSINK +GST_IS_ESDSINK_CLASS +
+ +
+gstfakesink +GstFakeSink + +GstFakeSink +GstFakeSinkClass +gst_fakesink_get_type +GST_TYPE_FAKESINK +GST_FAKESINK +GST_FAKESINK_CLASS +GST_IS_FAKESINK +GST_IS_FAKESINK_CLASS +
+ +
+gstfakesrc +GstFakeSrc + +GstFakeSrc +gst_fakesrc_get_type +GstFakeSrcClass +GST_TYPE_FAKESRC +GST_FAKESRC +GST_FAKESRC_CLASS +GST_IS_FAKESRC +GST_IS_FAKESRC_CLASS +
+ +
+gstfdsink +GstFdSink + +GstFdSink +GstFdSinkClass +gst_fdsink_get_type +GST_TYPE_FDSINK +GST_FDSINK +GST_FDSINK_CLASS +GST_IS_FDSINK +GST_IS_FDSINK_CLASS +
+ +
+gstfdsrc +GstFdSrc + +GstFdSrc +GstFdSrcClass +gst_fdsrc_get_type +GST_TYPE_FDSRC +GST_FDSRC +GST_FDSRC_CLASS +GST_IS_FDSRC +GST_IS_FDSRC_CLASS +
+ +
+gsthttpsrc +GstHttpSrc + +GstHttpSrc +gst_httpsrc_get_type +GstHttpSrcClass +GST_TYPE_HTTPSRC +GST_HTTPSRC +GST_HTTPSRC_CLASS +GST_IS_HTTPSRC +GST_IS_HTTPSRC_CLASS +
+ +
+gstidentity +GstIdentity + +GstIdentity +GstIdentityClass +gst_identity_get_type +GST_TYPE_IDENTITY +GST_IDENTITY +GST_IDENTITY_CLASS +GST_IS_IDENTITY +GST_IS_IDENTITY_CLASS +
+ +
+gstqueue +GstQueue + +GstQueue +GstQueueClass +gst_queue_get_type +GST_TYPE_QUEUE +GST_QUEUE +GST_QUEUE_CLASS +GST_IS_QUEUE +GST_IS_QUEUE_CLASS +
+ +
+gstsinesrc +GstSineSrc + +GstSineSrc +GstSineSrcClass +gst_sinesrc_get_type +GST_TYPE_SINESRC +GST_SINESRC +GST_SINESRC_CLASS +GST_IS_SINESRC +GST_IS_SINESRC_CLASS
@@ -575,3 +604,12 @@ MetaAudioRaw MetaAudioSpectrum
+
+gst/meta/videoraw.h +videoraw +MetaVideoRaw +MetaDGA +MetaOverlay +OverlayClip +
+ diff --git a/docs/gst/gstreamer.hierarchy b/docs/gst/gstreamer.hierarchy index 3232665eb9..9f67b2d2e1 100644 --- a/docs/gst/gstreamer.hierarchy +++ b/docs/gst/gstreamer.hierarchy @@ -1,12 +1,27 @@ GtkObject + GtkWidget + GtkRange + GtkContainer GstObject - GstPad GstElement - GstFilter - GstTee GstBin GstPipeline GstThread - GstConnection - GstSrc + GstFilter + GstTee + GstIdentity GstSink + GstFakeSink + GstAudioSink + GstFdSink + GstSrc + GstFakeSrc + GstDiskSrc + GstAsyncDiskSrc + GstHttpSrc + GstFdSrc + GstAudioSrc + GstSineSrc + GstConnection + GstQueue + GstPad diff --git a/docs/gst/gstreamer.types b/docs/gst/gstreamer.types index d80aa1ef2a..22d98eaa4d 100644 --- a/docs/gst/gstreamer.types +++ b/docs/gst/gstreamer.types @@ -1,14 +1,29 @@ #include #include - gst_object_get_type -gst_pad_get_type gst_element_get_type -gst_filter_get_type gst_bin_get_type gst_pipeline_get_type -gst_thread_get_type -gst_connection_get_type -gst_src_get_type +gst_filter_get_type gst_sink_get_type +gst_src_get_type +gst_pad_get_type +gst_connection_get_type +gst_thread_get_type gst_tee_get_type + +gst_fakesrc_get_type +gst_fakesink_get_type + +gst_disksrc_get_type +gst_asyncdisksrc_get_type +gst_httpsrc_get_type +gst_fdsrc_get_type +gst_audiosrc_get_type +gst_sinesrc_get_type + +gst_audiosink_get_type +gst_fdsink_get_type + +gst_identity_get_type +gst_queue_get_type diff --git a/docs/gst/tmpl/audioraw.sgml b/docs/gst/tmpl/audioraw.sgml new file mode 100644 index 0000000000..d3ef062716 --- /dev/null +++ b/docs/gst/tmpl/audioraw.sgml @@ -0,0 +1,22 @@ + +audioraw + + +Information about audio buffers. + + + +Information about audio buffers. + + + + + + + + + + + + + diff --git a/docs/gst/tmpl/cothreads.sgml b/docs/gst/tmpl/cothreads.sgml new file mode 100644 index 0000000000..8c1326fd23 --- /dev/null +++ b/docs/gst/tmpl/cothreads.sgml @@ -0,0 +1,118 @@ + +cothreads + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@argc: +@argv: +@Returns: + + + + + + + + + + + + + + +@Returns: + + + + + + + +@ctx: +@Returns: + + + + + + + +@thread: +@func: +@argc: +@argv: + + + + + + + +@thread: + + + + + + + +@ctx: +@Returns: + + diff --git a/docs/gst/tmpl/gst.sgml b/docs/gst/tmpl/gst.sgml index 13fcdf3240..a3b3089f0a 100644 --- a/docs/gst/tmpl/gst.sgml +++ b/docs/gst/tmpl/gst.sgml @@ -41,10 +41,13 @@ pipeline and Microsoft's DirectShow for some background. - +Use this macro to show debugging info. This is only usefull when developing new +plugin elements. +If you #define DEBUG_ENABLED before including gst/gst.h, this macro will produce +g_print messages. -@format: -@args...: +@format: the format specification as in g_print +@args...: arguments diff --git a/docs/gst/tmpl/gstasyncdisksrc.sgml b/docs/gst/tmpl/gstasyncdisksrc.sgml new file mode 100644 index 0000000000..1e3fea6fd8 --- /dev/null +++ b/docs/gst/tmpl/gstasyncdisksrc.sgml @@ -0,0 +1,52 @@ + +GstAsyncDiskSrc + + +Asynchronous disk reader. (asyncdisksrc) + + + +Reads data from a file. You can seek to a specific location by setting +the offset. + + + + + + + + + + + + + +GST_ASYNCDISKSRC_OPEN +the asyncdisksrc is open for reading + + + + + + + + + +Specify the location of the file to read. + + + + +Specify how many bytes to read at a time. + + + + +Get the size of the current file. + + + + +Specify the current offset in the file. + + diff --git a/docs/gst/tmpl/gstaudiosink.sgml b/docs/gst/tmpl/gstaudiosink.sgml new file mode 100644 index 0000000000..8f40703c46 --- /dev/null +++ b/docs/gst/tmpl/gstaudiosink.sgml @@ -0,0 +1,24 @@ + +GstAudioSink + + +Output to a sound card via OSS. (audiosink) + + + +Output to a sound card via OSS. + + + + + + + + + +The buffer is sent to the sound card. + + +@gstaudiosink: the object which received the signal. +@arg1: the audiosink. + diff --git a/docs/gst/tmpl/gstaudiosrc.sgml b/docs/gst/tmpl/gstaudiosrc.sgml new file mode 100644 index 0000000000..721a58f3e7 --- /dev/null +++ b/docs/gst/tmpl/gstaudiosrc.sgml @@ -0,0 +1,41 @@ + +GstAudioSrc + + +Read from the sound card. (audiosrc) + + + +Create buffers from an OSS sound card. + + + + + + + + + +The number of bytes per read. + + + + +Get the current number of bytes read. + + + + +The audio format as defined in soundcard.h + + + + +The number of channels (mono, stereo, ...) + + + + +The frequency. + + diff --git a/docs/gst/tmpl/gstbin.sgml b/docs/gst/tmpl/gstbin.sgml index a2deee2069..df2ccaf2f2 100644 --- a/docs/gst/tmpl/gstbin.sgml +++ b/docs/gst/tmpl/gstbin.sgml @@ -7,7 +7,7 @@ Base container element GstBin is the simplest of the container elements, allowing elements to -beocme children of itself. Pads from the child elements can be ghosted to +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. @@ -17,13 +17,11 @@ allowing for deep nesting of predefined sub-pipelines. - + -@obj: - @@ -100,9 +98,10 @@ allowing for deep nesting of predefined sub-pipelines. +is signaled whenever a new GstElement is added to the GstBin @gstbin: the object which received the signal. -@arg1: +@arg1: the element that was added diff --git a/docs/gst/tmpl/gstbuffer.sgml b/docs/gst/tmpl/gstbuffer.sgml index 301ae6ad1d..50edcf99a6 100644 --- a/docs/gst/tmpl/gstbuffer.sgml +++ b/docs/gst/tmpl/gstbuffer.sgml @@ -19,38 +19,39 @@ pointers to arbitrary metadata. - - - - - -@buf: - - - +get the flags from this buffer -@buf: +@buf: GstBuffer to retrieve the flags from + + + + +gives the status of a given flag + + +@buf: GstBuffer to query +@flag: the flag to check - +set a flag in a buffer -@buf: -@flag: +@buf: GstBuffer to query +@flag: the flag to set - +clear a flag in a buffer -@buf: -@flag: +@buf: GstBuffer to modify +@flag: the flag to clear @@ -58,23 +59,23 @@ pointers to arbitrary metadata. -@buf: +@buf: GstBuffer - +retrieves a pointer to the data element of this buffer -@buf: +@buf: GstBuffer - +get the size of the data in this buffer -@buf: +@buf: GstBuffer @@ -82,7 +83,7 @@ pointers to arbitrary metadata. -@buf: +@buf: GstBuffer @@ -90,39 +91,44 @@ pointers to arbitrary metadata. -@buf: +@buf: GstBuffer - +get the timestamp for this buffer -@buf: +@buf: GstBuffer +This macro will obtain a lock on the object, making serialization +possible. -@buf: +@buf: GstBuffer to lock +This macro will try to obtain a lock on the object, but will return with +FALSE if it can't get it immediately. -@buf: +@buf: GstBuffer to try to lock +this macro releases a lock on the object. -@buf: +@buf: GstBuffer to unlock. @@ -130,26 +136,12 @@ pointers to arbitrary metadata. -@GST_BUFFER_READONLY: -@GST_BUFFER_EOS: -@GST_BUFFER_ORIGINAL: -@GST_BUFFER_DONTFREE: -@lock: -@flags: -@data: -@size: -@maxsize: -@offset: -@timestamp: -@maxage: -@metas: -@parent: diff --git a/docs/gst/tmpl/gstconnection.sgml b/docs/gst/tmpl/gstconnection.sgml index c9d1e41d90..b8470095f8 100644 --- a/docs/gst/tmpl/gstconnection.sgml +++ b/docs/gst/tmpl/gstconnection.sgml @@ -2,10 +2,11 @@ GstConnection - +Passes buffers between elements. +Passes buffers between elements. @@ -14,13 +15,11 @@ GstConnection - + -@obj: - diff --git a/docs/gst/tmpl/gstdisksrc.sgml b/docs/gst/tmpl/gstdisksrc.sgml index 8442f23a9d..82f7512908 100644 --- a/docs/gst/tmpl/gstdisksrc.sgml +++ b/docs/gst/tmpl/gstdisksrc.sgml @@ -2,10 +2,12 @@ GstDiskSrc - +Synchronous read from a file (disksrc) +Synchonously read buffers from a file. If you need asynchronous reading +with seeking capabilities use a GstAsynDiskSrc instead. @@ -14,18 +16,33 @@ GstDiskSrc - - - - - -@obj: - - + + + + +GST_DISKSRC_OPEN +the disksrc is open for reading + + + -@GST_DISKSRC_OPEN: + + + +Specify the location of the file to read. + + + + +Specify how many bytes to read at a time. + + + + +Get the current offset in the file. + diff --git a/docs/gst/tmpl/gstelement.sgml b/docs/gst/tmpl/gstelement.sgml index d222783dbc..105fa16107 100644 --- a/docs/gst/tmpl/gstelement.sgml +++ b/docs/gst/tmpl/gstelement.sgml @@ -28,25 +28,57 @@ simpler to connect pads of two elements together. - - - - - - This enum defines the standard states an element may be in. GST_STATE_MAX is the highest bit that can be set, and is used internally. + + + + + +GST_STATE_COMPLETE +means all the necesary information is available to run, i.e. the +filename for the disksrc, etc. + + + +GST_STATE_RUNNING +means that it's actually doing something, but that's fuzzy. + + + +GST_STATE_DISCOVERY +is intended for the autoconnect case, in those instances where +the only way to determine the input or output type of some pad is for an +element to actually process some data. The idea in that case is that the +source element would be responsible for sending the data non-destructively +(in the case of a network client, it would have to save it all up, unless +it has seek capabilities over the network), and all downstream elements +process it in such a way as to not hose their own state. Or rather, when +they cease to do discovery, they completely wipe their state as if nothing +ever happened. + + + +GST_STATE_PREROLL +is a local state, used for things like sending the first half of +an MPEG GOP through the decoder in order to start playback at a frame +somewhere in the middle of said GOP. Not sure how that will work, +exactly. + + + +GST_STATE_PLAYING +means there really is data flowing +through the graph, where GST_STATE_PAUSED temporary stops the flow. GST_STATE_PLAYING && +GST_STATE_PAUSED is the same idea as !GST_STATE_PLAYING, but there are probably going to be +many cases where there really is a distinction. + + + -@GST_STATE_COMPLETE: -@GST_STATE_RUNNING: -@GST_STATE_DISCOVERY: -@GST_STATE_PREROLL: -@GST_STATE_PLAYING: -@GST_STATE_PAUSED: -@GST_STATE_MAX: @@ -83,18 +115,18 @@ This macro unsets the given state on the element. @flag: State to unset, can be any number of bits in guint32. + + + + + + This struct is used to define public information about the element. It describes the element, mostly for the benefit of editors. -@longname: -@class: -@description: -@version: -@author: -@copyright: @@ -103,9 +135,6 @@ of the element, the GtkType value for it, as well as a pointer to the GstElementDetails struct for the element. -@name: -@type: -@details: @@ -195,7 +224,7 @@ circumstances. @element: @name: -@Returns: +@Returns: GList of pads @@ -255,7 +284,7 @@ circumstances. -@element: +@element: the element to destroy @@ -324,35 +353,46 @@ circumstances. @Returns: + + + + +@argc: +@argv: +@Returns: + + - +Is trigered whenever the state of an element changes @gstelement: the object which received the signal. -@arg1: +@arg1: the new state of the object - +Is trigered whenever a new pad is added to an element @gstelement: the object which received the signal. -@arg1: +@arg1: the new pad that was added +Is trigered whenever a new ghost pad is added to an element @gstelement: the object which received the signal. -@arg1: +@arg1: the new ghost pad that was added +Is trigered whenever an error occured @gstelement: the object which received the signal. -@arg1: +@arg1: the error message diff --git a/docs/gst/tmpl/gstesdsink.sgml b/docs/gst/tmpl/gstesdsink.sgml new file mode 100644 index 0000000000..f665c9ae7c --- /dev/null +++ b/docs/gst/tmpl/gstesdsink.sgml @@ -0,0 +1,16 @@ + +GstEsdSink + + + + + + + + + + + + + + diff --git a/docs/gst/tmpl/gstfakesink.sgml b/docs/gst/tmpl/gstfakesink.sgml new file mode 100644 index 0000000000..361a67d1a7 --- /dev/null +++ b/docs/gst/tmpl/gstfakesink.sgml @@ -0,0 +1,18 @@ + +GstFakeSink + + +Sources a buffer without doing anything with it. (fakesink) + + + +Take a buffer and gst_buffer_unref() it. This element does nothing +with the buffer. (fakesink) + + + + + + + + diff --git a/docs/gst/tmpl/gstfakesrc.sgml b/docs/gst/tmpl/gstfakesrc.sgml new file mode 100644 index 0000000000..dfc2d57101 --- /dev/null +++ b/docs/gst/tmpl/gstfakesrc.sgml @@ -0,0 +1,16 @@ + +GstFakeSrc + + +Generate empty buffers. (fakesrc) + + + +The GstFakeSrc generates empty buffers. (fakesrc) + + + + + + + diff --git a/docs/gst/tmpl/gstfdsink.sgml b/docs/gst/tmpl/gstfdsink.sgml new file mode 100644 index 0000000000..a9f7327643 --- /dev/null +++ b/docs/gst/tmpl/gstfdsink.sgml @@ -0,0 +1,21 @@ + +GstFdSink + + +Write data to a file descriptor. (fdsink) + + + +Write data to a file descriptor. + + + + + + + + + +The filedescriptor to write to. + + diff --git a/docs/gst/tmpl/gstfdsrc.sgml b/docs/gst/tmpl/gstfdsrc.sgml new file mode 100644 index 0000000000..882a451986 --- /dev/null +++ b/docs/gst/tmpl/gstfdsrc.sgml @@ -0,0 +1,31 @@ + +GstFdSrc + + +Read buffers from a file descriptor. (fdsrc) + + + +Read buffers from a file descriptor. + + + + + + + + + +The filedescriptor to read from. Pass the argument as a char* (???) + + + + +The number of bytes per read. + + + + +Get the current offset in the file. + + diff --git a/docs/gst/tmpl/gstfilter.sgml b/docs/gst/tmpl/gstfilter.sgml index 2a382029a7..5a8782a0c1 100644 --- a/docs/gst/tmpl/gstfilter.sgml +++ b/docs/gst/tmpl/gstfilter.sgml @@ -2,11 +2,14 @@ GstFilter - +Take data in and spit data out - +Filters take data in and spit data out. They are the main Element in a filter graph. +Filters have zero or more inputs and zero or more outputs. Filters are connected +together to form filter graphs. A GstFilter is the base class and is not very usefull +on its own. @@ -14,13 +17,11 @@ GstFilter - + -@obj: - diff --git a/docs/gst/tmpl/gsthttpsrc.sgml b/docs/gst/tmpl/gsthttpsrc.sgml new file mode 100644 index 0000000000..f1c74b859a --- /dev/null +++ b/docs/gst/tmpl/gsthttpsrc.sgml @@ -0,0 +1,27 @@ + +GstHttpSrc + + +Reads data from a URL. (httpsrc) + + + +Reads data from a URL. + + + + + + + + + +Specify the location of the file. The location must be a fully qualified URL. + + + + +Specify how many bytes to read at a time. + + + diff --git a/docs/gst/tmpl/gstidentity.sgml b/docs/gst/tmpl/gstidentity.sgml new file mode 100644 index 0000000000..e5a1a65bde --- /dev/null +++ b/docs/gst/tmpl/gstidentity.sgml @@ -0,0 +1,16 @@ + +GstIdentity + + +Pass data without modification. (identity) + + + +Pass data without modification. + + + + + + + diff --git a/docs/gst/tmpl/gstlog.sgml b/docs/gst/tmpl/gstlog.sgml new file mode 100644 index 0000000000..77b7d6056b --- /dev/null +++ b/docs/gst/tmpl/gstlog.sgml @@ -0,0 +1,32 @@ + +gstlog + + + + + + + + + + + + + + + + + + + + + + + + + + +@format: +@args...: + + diff --git a/docs/gst/tmpl/gstmeta.sgml b/docs/gst/tmpl/gstmeta.sgml index bef25e1e5d..184eebc49b 100644 --- a/docs/gst/tmpl/gstmeta.sgml +++ b/docs/gst/tmpl/gstmeta.sgml @@ -1,12 +1,105 @@ -gstmeta +GstMeta - +Provide context for buffers +The point of the metadata is to provide some context for each buffer. In +the case of audio data, for instance, it would provide the samplerate, bit +depth, and channel count. + + +The trick is that there may be multiple types of metadata ganged onto a +single buffer. This is why they're going to be a GList. This does mean +extra overhead in all cases, but I think it's minimal. The GList type +uses a chunk allocater so we're not wasting too much memory or time when +adding to the list. + + + +The trick is dealing with these structs as they pass through a pipeline, +since they have potentially different mutability properties. For +instance, if you've got a mp3 decoder connected to a tee, which sends the +buffers off to both the decoder and a spectrum analyzer (and then a +visualization element). The preferred setup would be where every time a +audio/raw metadata comes down the pipe (indicating a potential change in +audio format), the audiosink and spectrum would just save off pointers. + + + +So when exactly does this metadata go away (deallocated)? Well, that +means metadata has to be refcounted. But that gets rather hairy. OK, in +the simple case you create a metadata struct, it comes with refcount set +to 1. You pass it through, it stays one, eventually someone drops the +last reference on the buffer it's tied to, you free the metadata too. +Easy. What if you tee? You could go through and for every metadata in +the buffer, increment the refcount by the same as the buffer. So in the +above case (tee'd), the audiosink and spectrum would get the buffer with a +refcount of 2, and it'd have a metadata with refcount 2. Do they ref it +each themselves, then unref the buffer? Or do they remove the metadata? +Removing the metadata would require a buffer CoW, which would suck, so +yes, they'd just ref the metadata. + + + +But.... what if they're all in different threads? Then we're off into +the magical world of mutexes. Everything with a refcount in a threaded +world must be mutexed, else you can do atomic increment and atomic +dec and test. Can this be done from C easily? Perhaps it needs to be found +from kernel includes via autoconf? + + + +The goal in designing the way metadata will be defined and used is to keep +it as simple as possible. The basis for accomplishing this is the fact +that in order to actually use (rather than just pass) the metadata, you +have to know what the fields are, which means you have to have compiled in +support for that metadata at build time. Therefore, if you're using +metadata, you must have build-time access to the necessary include file +that defines it. + + + +So, given that you've got an include file, it would be nice if the whole +thing could be contained there. This would limit the need to be linked +against something, or have load-time requirements as to that has to be +loaded before you are. + + + +Given that really all metadata is is a region of memory of a given size +with a certain signature, this isn't all that hard. First you lay out the +struct that defines the metadata. Then you set up #defines that expand to +the size of the struct in question, as well as the four-cc code that +defines the type. + + + +The work is done by a few #defines, a la the #defines used in all Gtk +objects. The first is a NEW() method that allocates the memory for the +metadata and fills in all the normal fields (type, size, utility +functions). Because of the way it's defined (as a #define, no less), +you'll have to invoke it as META_NEW(meta), since it can't return() +anything. + + + +Another #define will check to make sure a meta is indeed that type by +verifying the type code and size. Theoretically, meta types can overlap +with the same fourcc code, as long as they have different sizes. But I +probably ought to have a global public registry so people writing things +don't conflict. MSFT got that right, at least. + + + +So, a hairy problem is what to do when there are utility functions +associated with one of these things. One option is to not bother with +them. This is very likely a possible solution, since metadata is supposed +to be flat memory of a given size. Not much to do to either free or copy +it, is there? @@ -14,14 +107,6 @@ gstmeta - - - - - -@meta: - - @@ -30,6 +115,15 @@ gstmeta @buf: + + + + + +@meta: +@flag: + + @@ -53,17 +147,12 @@ gstmeta -@GST_META_FREEABLE: -@lock: -@flags: -@data: -@size: diff --git a/docs/gst/tmpl/gstobject.sgml b/docs/gst/tmpl/gstobject.sgml index 0bfa974fb0..a4c88c6a19 100644 --- a/docs/gst/tmpl/gstobject.sgml +++ b/docs/gst/tmpl/gstobject.sgml @@ -44,7 +44,7 @@ This macro returns the entire set of flags for the object. This macro checks to see if the given flag is set. -@obj: Object to check for flag in. +@obj: GstSrc to check for flag in. @flag: Flag to check for, must be a single bit in guint32. @@ -131,9 +131,7 @@ This macro releases a lock on the object. -@obj: - -@object: +@object: the object @@ -141,9 +139,7 @@ This macro releases a lock on the object. -@obj: - -@object: +@object: the object @@ -151,7 +147,7 @@ This macro releases a lock on the object. -@obj: +@object: the object @@ -159,7 +155,7 @@ This macro releases a lock on the object. -@obj: +@object: the object @@ -168,5 +164,5 @@ This macro releases a lock on the object. @gstobject: the object which received the signal. -@arg1: +@arg1: the new parent diff --git a/docs/gst/tmpl/gstpad.sgml b/docs/gst/tmpl/gstpad.sgml index 45da122569..056647120c 100644 --- a/docs/gst/tmpl/gstpad.sgml +++ b/docs/gst/tmpl/gstpad.sgml @@ -2,10 +2,12 @@ GstPad - +The connection between Elements +Elements are connected to each other via "pads", which are extremely light-weight generic +connections. @@ -14,20 +16,26 @@ GstPad - - - - - -@obj: - - - +is this pad connected -@pad: +@pad: the pad to check + + + + +can this pad be used to pull a buffer + + +@pad: the pad to check + + + + + + @@ -39,6 +47,15 @@ GstPad @buf: + + + + + +@pad: +@Returns: + + @@ -52,9 +69,6 @@ GstPad -@GST_PAD_UNKNOWN: -@GST_PAD_SRC: -@GST_PAD_SINK: @@ -92,6 +106,15 @@ GstPad @chain: + + + + + +@pad: +@pull: + + @@ -128,15 +151,6 @@ GstPad @Returns: - - - - - -@pad: -@Returns: - - diff --git a/docs/gst/tmpl/gstpipeline.sgml b/docs/gst/tmpl/gstpipeline.sgml index 09b7740ac1..7183e1b9f8 100644 --- a/docs/gst/tmpl/gstpipeline.sgml +++ b/docs/gst/tmpl/gstpipeline.sgml @@ -36,10 +36,10 @@ functions, like 'Play'. - +destroys the pipeline -@pipeline: +@pipeline: GstPipeline to destroy diff --git a/docs/gst/tmpl/gstplugin.sgml b/docs/gst/tmpl/gstplugin.sgml index bf121d2fd4..da4741937a 100644 --- a/docs/gst/tmpl/gstplugin.sgml +++ b/docs/gst/tmpl/gstplugin.sgml @@ -1,11 +1,12 @@ -gstplugin +GstPlugin - +Dynamically loadable Elements +GStreamer is extensible so GstElements can be loaded at runtime. @@ -19,12 +20,6 @@ gstplugin -@name: -@longname: -@filename: -@types: -@elements: -@identifiers: @@ -34,11 +29,12 @@ gstplugin - +A plugin should implement this function called plugin_init. It will be called +by the loader at statup. -@module: -@Returns: +@module: The GModule it was loaded from +@Returns: The plugin or NULL is an error was detected. @@ -59,13 +55,6 @@ gstplugin @longname: - - - - - - - @@ -82,6 +71,15 @@ gstplugin @Returns: + + + + + +@name: +@Returns: + + diff --git a/docs/gst/tmpl/gstqueue.sgml b/docs/gst/tmpl/gstqueue.sgml index 2ec710a2a5..c75d8c9625 100644 --- a/docs/gst/tmpl/gstqueue.sgml +++ b/docs/gst/tmpl/gstqueue.sgml @@ -2,11 +2,18 @@ GstQueue - +Simple data queue. (queue) - +Simple data queue. Data is queued till max_level buffers any subsequent buffers +sent to this filter will block until free space becomes available in the buffer. + + +You can query how many buffers are queued with the level argument. + + +The default queue length is set to 10. @@ -14,37 +21,14 @@ GstQueue - + - +Get the number of buffers in the queue. -@obj: - - - + - +Specify the maximum number of buffers in the queue before the queue +blocks. -@name: -@Returns: - - - - - - - -@pad: -@buf: - - - - - - - -@connection: - - diff --git a/docs/gst/tmpl/gstreamer-unused.sgml b/docs/gst/tmpl/gstreamer-unused.sgml new file mode 100644 index 0000000000..3a53dc78ab --- /dev/null +++ b/docs/gst/tmpl/gstreamer-unused.sgml @@ -0,0 +1,1539 @@ + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@src: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@name: +@Returns: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@obj: + + + + + + +@name: +@Returns: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@klass: + + + + + + +@klass: + + + + + + +@obj: + + + + + + + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + + + + + + + +@Returns: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@obj: + + + + + + +@connection: + + + + + + + + + + + + +@klass: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@Returns: + + + + + + + + + + + + +@pad: +@buf: + + + + + + +@Returns: + + + + + + +@pad: +@buf: + + + + + + + + + + + + + + + + + + + + + + + + +@klass: + + + + + + +@klass: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@name: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@name: +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@klass: + + + + + + +@pad: +@buf: + + + + + + +@obj: + + + + + + +@esdsink: +@channels: + + + + + + +@klass: + + + + + + +@klass: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@Returns: + + + +The frequency. + + + + + + + + + + + + + + + + + + + + +@obj: + + + + + + + + + + + + +@Returns: + + + + + + + + + + + + +@klass: + + + + + + +@klass: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@klass: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@klass: + + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@esdsink: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + +plugin + + + + + + + + + + + + + +@pad: +@buf: + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@audiosink: + + + + + + +@obj: + + + + + + +@pad: +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + + + + + + + +@Returns: + + + + + + +@klass: + + + + + + + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@Returns: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@Returns: + + + + + + + + + + + + +@obj: + + + + + + +@buf: + + + + + + + + + + + + + + + + +@Returns: + + + + + + +@klass: + + + + + + + + + + + + +@klass: + + + + + + + + + + + + + + + + + + +@esdsink: +@frequency: + + + + + + + + + + + + + + + + + + +@name: +@Returns: + + + + + + +@audiosink: +@channels: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@pad: +@buf: + + + + + + + + + + + + +@pad: +@buf: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@klass: + + + + + + + + + + + + + + + + + + +@src: + + + + + + +@audiosink: +@frequency: + + + + + + + + + + + + +@meta: + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + +GstElement + + + + + + + +@obj: + + + + + + + + + + + + + + + + + + + + + + + + +@esdsink: +@format: + + + + + + +@klass: + + + + + + + + + + + + +@obj: + + + + + + +@src: + + + + + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + + + + + + + +@name: +@fd: +@Returns: + + + + + + +@audiosink: +@format: + + + + + + +@klass: + + + + + + +@obj: + + + + + + +@Returns: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@obj: + + + + + + +@name: +@Returns: + + + + + + + diff --git a/docs/gst/tmpl/gstsinesrc.sgml b/docs/gst/tmpl/gstsinesrc.sgml new file mode 100644 index 0000000000..7768424330 --- /dev/null +++ b/docs/gst/tmpl/gstsinesrc.sgml @@ -0,0 +1,36 @@ + +GstSineSrc + + +Create a sine wave of a given frequency and volume. (sinesrc) + + + +Create a sine wave of a given frequency and volume. + + + + + + + + + +The volume as a double 0.0 is silent, 1.0 is loudest. + + + + +The format ad defined in soundcard.h + + + + +The number of channels. + + + + +The fequency. + + diff --git a/docs/gst/tmpl/gstsink.sgml b/docs/gst/tmpl/gstsink.sgml index 0bd6958737..e7c8ba1264 100644 --- a/docs/gst/tmpl/gstsink.sgml +++ b/docs/gst/tmpl/gstsink.sgml @@ -2,10 +2,12 @@ GstSink - +The end point of a filter graph +The sink is the end of the filter graph. A typical sink would be an audio +or a video card. @@ -14,13 +16,11 @@ GstSink - + -@obj: - diff --git a/docs/gst/tmpl/gstsrc.sgml b/docs/gst/tmpl/gstsrc.sgml index 4f05fd6dd9..62ec4c410f 100644 --- a/docs/gst/tmpl/gstsrc.sgml +++ b/docs/gst/tmpl/gstsrc.sgml @@ -2,10 +2,12 @@ GstSrc - +The start point of a filter graph +A GstSrc is the start of a filter graph. It typically is a file or an +audio source. It provides data for the next element in the graph. @@ -14,53 +16,63 @@ GstSrc - - - - - -@obj: - - + + + + +GST_SRC_ASYNC +this source is assynchronous + + + -@GST_SRC_ASYNC: - +This macro returns the entire set of flags for the object. -@obj: +@obj: GstSrc to return flags for. - +This macro checks to see if the GST_SRC_ASYNC flag is set. -@obj: +@obj: GstSrc to check for flag in. - +This macro sets the given flags. @src: -@flag: +@flag: Flag to set, can by any number of bits in guint32. + +@obj: GstSrc to set flag in. - +This macro usets the given flags. @src: -@flag: +@flag: Flag to set, must be a single bit in guint32. + +@obj: GstSrc to unset flag in. + + + + + + @@ -91,9 +103,11 @@ GstSrc +An eos signal is triggered whenever the GstSrc has reached the end of +the stream. @gstsrc: the object which received the signal. -@arg1: +@arg1: the object which received the signal diff --git a/docs/gst/tmpl/gsttee.sgml b/docs/gst/tmpl/gsttee.sgml index a1ae13ca96..999f3c1a41 100644 --- a/docs/gst/tmpl/gsttee.sgml +++ b/docs/gst/tmpl/gsttee.sgml @@ -2,11 +2,11 @@ GstTee - +1-to-N pipe fitting - +A tee can be used to split out the filter graph. @@ -14,13 +14,11 @@ GstTee - + -@obj: - diff --git a/docs/gst/tmpl/gstthread.sgml b/docs/gst/tmpl/gstthread.sgml index bf8f97250c..85226c9fd0 100644 --- a/docs/gst/tmpl/gstthread.sgml +++ b/docs/gst/tmpl/gstthread.sgml @@ -2,10 +2,14 @@ GstThread - +A bin that will become a thread +A bin that will become a thread if possible when the pipeline is started +up. Can contain any set of GstObjects except another GstThread. All +starting points and/or clocked events must be registered with this object, +to be dealt with in the separate thread. @@ -17,19 +21,34 @@ GstThread + + + + +GST_THREAD_CREATE +The thread is being created. + + + +GST_THREAD_STATE_SPINNING +The thread is runnning + + + +GST_THREAD_STATE_REAPING +The thread is ending. + + + + -@GST_THREAD_CREATE: -@GST_THREAD_STATE_SPINNING: -@GST_THREAD_STATE_REAPING: - + -@obj: - @@ -58,6 +77,7 @@ GstThread +TRUE if the thread should be created. diff --git a/docs/gst/tmpl/gsttrace.sgml b/docs/gst/tmpl/gsttrace.sgml index 17e8f6bc51..e93cd039f2 100644 --- a/docs/gst/tmpl/gsttrace.sgml +++ b/docs/gst/tmpl/gsttrace.sgml @@ -1,12 +1,12 @@ -gsttrace +GstTrace - +Tracing functionality - +Tracing functionality @@ -27,21 +27,12 @@ gsttrace -@filename: -@fd: -@buf: -@bufsize: -@bufoffset: -@timestamp: -@sequence: -@data: -@message: diff --git a/docs/gst/tmpl/gsttype.sgml b/docs/gst/tmpl/gsttype.sgml index 04a98cce9d..3be88ba077 100644 --- a/docs/gst/tmpl/gsttype.sgml +++ b/docs/gst/tmpl/gsttype.sgml @@ -1,12 +1,50 @@ -gsttype +GstType - +Identifies the data +GstTypes exist to try to make sure data eveyrone is talking about the +right kind of data. They aid quite a bit in autoplugging, in fact make it +possible. Each well-formed type includes a function (typefind) that will +take one or more buffers and determine whether or not it is indeed a +stream of that type, and possible a metadata to go with it. It may +provide related metadata structure IDs (and must if it provides metadata +from the typefind function). + + +Because multiple elements and plugins are very likely to be using the same +types, the process of creating/finding types is designed to be done with a +single function call. All operations on GstTypes occur via their guint16 +ID numbers, with the GstType structure "private" to the GST library. A +plugin wishing to use a give type would contain a static struct of type +GstTypeFactory, which lists the MIME type, possible extensions (which may +overlap the mime-types file), a typefind function, and any other cruft I +decide to add. + + + +A plugin init function would take this typefactory and hand it to the +gst_type_new() (FIXME: badly named) function, which would first search for +that same MIME type in the current list. If it found one, it would +compare the two to see if the new one is "better". Better is defined as +having more extentions (to be merged) or a typefind function verses none. + + + +The point of returning an existing MIME type is a result of the goal of +unifying types enough to guarantee that, for instance, all MP3 decoders +will work interchangably. If MP3 decoder A says "MIME type 'audio/mpeg' +with extensions 'mpeg3'" and decoder B says "MIME type 'audio/mpeg' with +extensions 'mp3'", we don't want to have two types defined, possibly with +two typefind functions. If we did, it's not obvious which of the two would +be tried first (luck) and if both would really identify streams as mp3 +correctly in all cases. And whichever wins, we're stuck using the +associated decoder to play that stream. We lose the choice between any +valid mp3 decoder, and thus the whole point of the type system. @@ -29,28 +67,12 @@ gsttype -@id: -@mime: -@exts: -@typefindfunc: -@srcs: -@sinks: -@mime: -@exts: -@typefindfunc: - - - - - - - diff --git a/docs/gst/tmpl/gstutils.sgml b/docs/gst/tmpl/gstutils.sgml index 4082bc7eba..88ad44354b 100644 --- a/docs/gst/tmpl/gstutils.sgml +++ b/docs/gst/tmpl/gstutils.sgml @@ -1,8 +1,8 @@ -gstutils +GstUtils - +Utility functions diff --git a/docs/gst/tmpl/gstxml.sgml b/docs/gst/tmpl/gstxml.sgml index 778c8b9111..ee985b4c54 100644 --- a/docs/gst/tmpl/gstxml.sgml +++ b/docs/gst/tmpl/gstxml.sgml @@ -1,11 +1,12 @@ -gstxml +GstXml - +Convert Elements into an XML presentation +All GstElements can be serialized to an XML presentation diff --git a/docs/gst/tmpl/spectrum.sgml b/docs/gst/tmpl/spectrum.sgml new file mode 100644 index 0000000000..9835398bab --- /dev/null +++ b/docs/gst/tmpl/spectrum.sgml @@ -0,0 +1,23 @@ + +spectrum + + +Frequencies of a spectrum analysis. + + + +Frequencies of a spectrum analysis. + + + + + + + + + + + + + + diff --git a/docs/gst/tmpl/plugin.sgml b/docs/gst/tmpl/videoraw.sgml similarity index 53% rename from docs/gst/tmpl/plugin.sgml rename to docs/gst/tmpl/videoraw.sgml index 9866772c26..080d0fce29 100644 --- a/docs/gst/tmpl/plugin.sgml +++ b/docs/gst/tmpl/videoraw.sgml @@ -1,12 +1,12 @@ -plugin +videoraw - +Information about video buffers. - +Information about video buffers. @@ -14,35 +14,27 @@ plugin - + - - + - - + -@name: -@Returns: - - + -@name: -@Returns: - diff --git a/gst/elements/gstasyncdisksrc.h b/gst/elements/gstasyncdisksrc.h index 5c50d6ef5b..6add9425b9 100644 --- a/gst/elements/gstasyncdisksrc.h +++ b/gst/elements/gstasyncdisksrc.h @@ -43,7 +43,7 @@ GstElementDetails gst_asyncdisksrc_details; #define GST_IS_ASYNCDISKSRC(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_ASYNCDISKSRC)) #define GST_IS_ASYNCDISKSRC_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC)) // NOTE: per-element flags start with 16 for now typedef enum { diff --git a/gst/elements/gstaudiosink.c b/gst/elements/gstaudiosink.c index 3d1c05e875..491847f221 100644 --- a/gst/elements/gstaudiosink.c +++ b/gst/elements/gstaudiosink.c @@ -47,6 +47,7 @@ static gboolean gst_audiosink_stop(GstElement *element); static gboolean gst_audiosink_change_state(GstElement *element, GstElementState state); +void gst_audiosink_chain(GstPad *pad,GstBuffer *buf); /* AudioSink signals and args */ enum { @@ -64,7 +65,7 @@ static void gst_audiosink_class_init(GstAudioSinkClass *klass); static void gst_audiosink_init(GstAudioSink *audiosink); -static GstFilterClass *parent_class = NULL; +static GstSinkClass *parent_class = NULL; static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 }; static guint16 gst_audiosink_type_audio = 0; @@ -84,7 +85,7 @@ gst_audiosink_get_type(void) { (GtkArgGetFunc)NULL, (GtkClassInitFunc)NULL, }; - audiosink_type = gtk_type_unique(GST_TYPE_FILTER,&audiosink_info); + audiosink_type = gtk_type_unique(GST_TYPE_SINK,&audiosink_info); } if (!gst_audiosink_type_audio) @@ -106,8 +107,8 @@ gst_audiosink_class_init(GstAudioSinkClass *klass) { gst_audiosink_signals[HANDOFF] = gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff), - gtk_marshal_NONE__POINTER_POINTER,GTK_TYPE_NONE,2, - GTK_TYPE_POINTER,GTK_TYPE_POINTER); + gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, + GST_TYPE_AUDIOSINK); gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals, LAST_SIGNAL); diff --git a/gst/elements/gstaudiosink.h b/gst/elements/gstaudiosink.h index 5159eb0a95..fc50a0b6cf 100644 --- a/gst/elements/gstaudiosink.h +++ b/gst/elements/gstaudiosink.h @@ -49,7 +49,7 @@ typedef struct _GstAudioSink GstAudioSink; typedef struct _GstAudioSinkClass GstAudioSinkClass; struct _GstAudioSink { - GstFilter filter; + GstSink sink; GstPad *sinkpad; @@ -61,21 +61,13 @@ struct _GstAudioSink { }; struct _GstAudioSinkClass { - GstFilterClass parent_class; + GstSinkClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); }; GtkType gst_audiosink_get_type(void); -GstElement *gst_audiosink_new(gchar *name); -void gst_audiosink_chain(GstPad *pad,GstBuffer *buf); - -void gst_audiosink_sync_parms(GstAudioSink *audiosink); - -void gst_audiosink_set_format(GstAudioSink *audiosink,gint format); -void gst_audiosink_set_channels(GstAudioSink *audiosink,gint channels); -void gst_audiosink_set_frequency(GstAudioSink *audiosink,gint frequency); #ifdef __cplusplus } diff --git a/gst/elements/gstaudiosrc.c b/gst/elements/gstaudiosrc.c index 75bd188f62..670657ff33 100644 --- a/gst/elements/gstaudiosrc.c +++ b/gst/elements/gstaudiosrc.c @@ -45,7 +45,6 @@ enum { enum { ARG_0, - ARG_LOCATION, ARG_BYTESPERREAD, ARG_CUROFFSET, ARG_FORMAT, @@ -64,6 +63,7 @@ static void gst_audiosrc_close_audio(GstAudioSrc *src); static gboolean gst_audiosrc_open_audio(GstAudioSrc *src); void gst_audiosrc_sync_parms(GstAudioSrc *audiosrc); +void gst_audiosrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 }; @@ -100,8 +100,6 @@ gst_audiosrc_class_init(GstAudioSrcClass *klass) { parent_class = gtk_type_class(GST_TYPE_SRC); - gtk_object_add_arg_type("GstAudioSrc::location", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_LOCATION); gtk_object_add_arg_type("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG, GTK_ARG_READWRITE, ARG_BYTESPERREAD); gtk_object_add_arg_type("GstAudioSrc::curoffset", GTK_TYPE_ULONG, @@ -125,7 +123,6 @@ static void gst_audiosrc_init(GstAudioSrc *audiosrc) { audiosrc->srcpad = gst_pad_new("src",GST_PAD_SRC); gst_element_add_pad(GST_ELEMENT(audiosrc),audiosrc->srcpad); - audiosrc->filename = g_strdup("/dev/dsp"); audiosrc->fd = -1; // audiosrc->meta = (MetaAudioRaw *)gst_meta_new(); @@ -145,12 +142,6 @@ GstElement *gst_audiosrc_new(gchar *name) { return audiosrc; } -GstElement *gst_audiosrc_new_with_fd(gchar *name,gchar *filename) { - GstElement *audiosrc = gst_audiosrc_new(name); - gtk_object_set(GTK_OBJECT(audiosrc),"location",filename,NULL); - return audiosrc; -} - void gst_audiosrc_push(GstSrc *src) { GstAudioSrc *audiosrc; GstBuffer *buf; @@ -190,16 +181,6 @@ static void gst_audiosrc_set_arg(GtkObject *object,GtkArg *arg,guint id) { src = GST_AUDIOSRC(object); switch (id) { - case ARG_LOCATION: - if (src->filename) g_free(src->filename); - if (GTK_VALUE_STRING(*arg) == NULL) { - src->filename = NULL; - gst_element_set_state(GST_ELEMENT(object),~GST_STATE_COMPLETE); - } else { - src->filename = g_strdup(GTK_VALUE_STRING(*arg)); - gst_element_set_state(GST_ELEMENT(object),GST_STATE_COMPLETE); - } - break; case ARG_BYTESPERREAD: src->bytes_per_read = GTK_VALUE_INT(*arg); break; @@ -225,9 +206,6 @@ static void gst_audiosrc_get_arg(GtkObject *object,GtkArg *arg,guint id) { src = GST_AUDIOSRC(object); switch (id) { - case ARG_LOCATION: - GTK_VALUE_STRING(*arg) = g_strdup(src->filename); - break; case ARG_BYTESPERREAD: GTK_VALUE_INT(*arg) = src->bytes_per_read; break; diff --git a/gst/elements/gstaudiosrc.h b/gst/elements/gstaudiosrc.h index bcaedcf4a3..bd2a9c6a60 100644 --- a/gst/elements/gstaudiosrc.h +++ b/gst/elements/gstaudiosrc.h @@ -56,7 +56,6 @@ struct _GstAudioSrc { GstPad *srcpad; /* sound card */ - gchar *filename; gint fd; /* audio parameters */ @@ -78,9 +77,6 @@ struct _GstAudioSrcClass { }; GtkType gst_audiosrc_get_type(void); -GstElement *gst_audiosrc_new(gchar *name); - -void gst_audiosrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/gst/elements/gstdisksrc.c b/gst/elements/gstdisksrc.c index 99ae974911..ac11143fe0 100644 --- a/gst/elements/gstdisksrc.c +++ b/gst/elements/gstdisksrc.c @@ -201,6 +201,7 @@ void gst_disksrc_push(GstSrc *src) { readbytes = read(disksrc->fd,GST_BUFFER_DATA(buf),disksrc->bytes_per_read); if (readbytes == 0) { gst_src_signal_eos(GST_SRC(disksrc)); + gst_buffer_unref(buf); return; } diff --git a/gst/elements/gstesdsink.h b/gst/elements/gstesdsink.h index 97dce1e9bf..0430b1355d 100644 --- a/gst/elements/gstesdsink.h +++ b/gst/elements/gstesdsink.h @@ -64,14 +64,6 @@ struct _GstEsdSinkClass { }; GtkType gst_esdsink_get_type(void); -GstElement *gst_esdsink_new(gchar *name); -void gst_esdsink_chain(GstPad *pad,GstBuffer *buf); - -void gst_esdsink_sync_parms(GstEsdSink *esdsink); - -void gst_esdsink_set_format(GstEsdSink *esdsink,gint format); -void gst_esdsink_set_channels(GstEsdSink *esdsink,gint channels); -void gst_esdsink_set_frequency(GstEsdSink *esdsink,gint frequency); #ifdef __cplusplus } diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index c66949dd3b..4b97c4a1f3 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -46,6 +46,8 @@ enum { static void gst_fakesink_class_init(GstFakeSinkClass *klass); static void gst_fakesink_init(GstFakeSink *fakesink); +GstElement *gst_fakesink_new(gchar *name); +void gst_fakesink_chain(GstPad *pad,GstBuffer *buf); static GstSinkClass *parent_class = NULL; //static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 }; @@ -88,12 +90,28 @@ static void gst_fakesink_init(GstFakeSink *fakesink) { gst_element_set_state(GST_ELEMENT(fakesink),GST_STATE_COMPLETE); } +/** + * gst_fakesink_new: + * @name: the name of the new fakesrc + * + * create a new fakesink + * + * Returns: the new fakesink + */ GstElement *gst_fakesink_new(gchar *name) { GstElement *fakesink = GST_ELEMENT(gtk_type_new(GST_TYPE_FAKESINK)); gst_element_set_name(GST_ELEMENT(fakesink),name); return fakesink; } +/** + * gst_fakesink_chain: + * @pad: the pad this faksink is connected to + * @buf: the buffer that has to be absorbed + * + * take the buffer from the pad and unref it without doing + * anything with it. + */ void gst_fakesink_chain(GstPad *pad,GstBuffer *buf) { GstFakeSink *fakesink; diff --git a/gst/elements/gstfakesink.h b/gst/elements/gstfakesink.h index e6617fc21b..e185ffe9cc 100644 --- a/gst/elements/gstfakesink.h +++ b/gst/elements/gstfakesink.h @@ -59,8 +59,6 @@ struct _GstFakeSinkClass { }; GtkType gst_fakesink_get_type(void); -GstElement *gst_fakesink_new(gchar *name); -void gst_fakesink_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/gst/elements/gstfakesrc.c b/gst/elements/gstfakesrc.c index 3426385660..565caa295e 100644 --- a/gst/elements/gstfakesrc.c +++ b/gst/elements/gstfakesrc.c @@ -46,6 +46,7 @@ enum { static void gst_fakesrc_class_init(GstFakeSrcClass *klass); static void gst_fakesrc_init(GstFakeSrc *fakesrc); +void gst_fakesrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 }; @@ -90,12 +91,26 @@ static void gst_fakesrc_init(GstFakeSrc *fakesrc) { gst_element_set_state(GST_ELEMENT(fakesrc),GST_STATE_COMPLETE); } +/** + * gst_fakesrc_new: + * @name: then name of the fakse source + * + * create a new fakesrc + * + * Returns: The new element. + */ GstElement *gst_fakesrc_new(gchar *name) { GstElement *fakesrc = GST_ELEMENT(gtk_type_new(GST_TYPE_FAKESRC)); gst_element_set_name(GST_ELEMENT(fakesrc),name); return fakesrc; } +/** + * gst_fakesrc_push: + * @src: the faksesrc to push + * + * generate an empty buffer and push it to the next element. + */ void gst_fakesrc_push(GstSrc *src) { GstFakeSrc *fakesrc; GstBuffer *buf; diff --git a/gst/elements/gstfakesrc.h b/gst/elements/gstfakesrc.h index 946e0f154c..4acbdf34ce 100644 --- a/gst/elements/gstfakesrc.h +++ b/gst/elements/gstfakesrc.h @@ -59,8 +59,6 @@ struct _GstFakeSrcClass { }; GtkType gst_fakesrc_get_type(void); -GstElement *gst_fakesrc_new(gchar *name); -void gst_fakesrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/gst/elements/gstfdsink.c b/gst/elements/gstfdsink.c index f39f40d5c6..1308ce6f71 100644 --- a/gst/elements/gstfdsink.c +++ b/gst/elements/gstfdsink.c @@ -48,6 +48,7 @@ static void gst_fdsink_init(GstFdSink *fdsink); static void gst_fdsink_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_fdsink_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_fdsink_chain(GstPad *pad,GstBuffer *buf); static GstSinkClass *parent_class = NULL; //static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; diff --git a/gst/elements/gstfdsink.h b/gst/elements/gstfdsink.h index 8a7cba37bf..8c00bf5d73 100644 --- a/gst/elements/gstfdsink.h +++ b/gst/elements/gstfdsink.h @@ -61,9 +61,6 @@ struct _GstFdSinkClass { }; GtkType gst_fdsink_get_type(void); -GstElement *gst_fdsink_new(gchar *name); -GstElement *gst_fdsink_new_with_fd(gchar *name,gint fd); -void gst_fdsink_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/gst/elements/gstfdsrc.c b/gst/elements/gstfdsrc.c index 31c8cb2ca1..6ca61e128f 100644 --- a/gst/elements/gstfdsrc.c +++ b/gst/elements/gstfdsrc.c @@ -98,7 +98,7 @@ gst_fdsrc_class_init(GstFdSrcClass *klass) { gtk_object_add_arg_type("GstFdSrc::bytesperread", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_BYTESPERREAD); gtk_object_add_arg_type("GstFdSrc::offset", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_OFFSET); + GTK_ARG_READABLE, ARG_OFFSET); gtkobject_class->set_arg = gst_fdsrc_set_arg; gtkobject_class->get_arg = gst_fdsrc_get_arg; diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index 43fae7e4f7..0693c3138b 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -48,6 +48,7 @@ static void gst_identity_init(GstIdentity *identity); static void gst_identity_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_identity_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_identity_chain(GstPad *pad,GstBuffer *buf); static GstFilterClass *parent_class = NULL; //static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; @@ -81,11 +82,11 @@ static void gst_identity_class_init(GstIdentityClass *klass) { parent_class = gtk_type_class(GST_TYPE_FILTER); - gtk_object_add_arg_type("GstIdentity::control", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_CONTROL); + //gtk_object_add_arg_type("GstIdentity::control", GTK_TYPE_INT, + // GTK_ARG_READWRITE, ARG_CONTROL); - gtkobject_class->set_arg = gst_identity_set_arg; - gtkobject_class->get_arg = gst_identity_get_arg; + //gtkobject_class->set_arg = gst_identity_set_arg; + //gtkobject_class->get_arg = gst_identity_get_arg; } static void gst_identity_init(GstIdentity *identity) { diff --git a/gst/elements/gstidentity.h b/gst/elements/gstidentity.h index f186a49847..9c0c2eafd4 100644 --- a/gst/elements/gstidentity.h +++ b/gst/elements/gstidentity.h @@ -62,8 +62,6 @@ struct _GstIdentityClass { }; GtkType gst_identity_get_type(void); -GstElement *gst_identity_new(gchar *name); -void gst_identity_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/gst/elements/gstqueue.c b/gst/elements/gstqueue.c index c6aef6f4e7..7d463e657c 100644 --- a/gst/elements/gstqueue.c +++ b/gst/elements/gstqueue.c @@ -49,6 +49,8 @@ static void gst_queue_init(GstQueue *queue); static void gst_queue_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_queue_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_queue_push(GstConnection *connection); +void gst_queue_chain(GstPad *pad,GstBuffer *buf); static GstConnectionClass *parent_class = NULL; //static guint gst_queue_signals[LAST_SIGNAL] = { 0 }; diff --git a/gst/elements/gstqueue.h b/gst/elements/gstqueue.h index b0ea7680b1..4016b94005 100644 --- a/gst/elements/gstqueue.h +++ b/gst/elements/gstqueue.h @@ -75,9 +75,6 @@ struct _GstQueueClass { }; GtkType gst_queue_get_type(void); -GstElement *gst_queue_new(gchar *name); -void gst_queue_chain(GstPad *pad,GstBuffer *buf); -void gst_queue_push(GstConnection *connection); #ifdef __cplusplus } diff --git a/gst/elements/gstsinesrc.c b/gst/elements/gstsinesrc.c index 9585c15687..cf302d071f 100644 --- a/gst/elements/gstsinesrc.c +++ b/gst/elements/gstsinesrc.c @@ -46,7 +46,6 @@ enum { enum { ARG_0, ARG_VOLUME, - ARG_FREQ, ARG_FORMAT, ARG_CHANNELS, ARG_FREQUENCY, @@ -63,6 +62,7 @@ static void gst_sinesrc_get_arg(GtkObject *object,GtkArg *arg,guint id); //static gboolean gst_sinesrc_open_audio(GstSineSrc *src); void gst_sinesrc_sync_parms(GstSineSrc *sinesrc); +void gst_sinesrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 }; @@ -101,8 +101,6 @@ gst_sinesrc_class_init(GstSineSrcClass *klass) { gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_VOLUME); - gtk_object_add_arg_type("GstSineSrc::freq", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_FREQ); gtk_object_add_arg_type("GstSineSrc::format", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FORMAT); gtk_object_add_arg_type("GstSineSrc::channels", GTK_TYPE_INT, @@ -123,7 +121,6 @@ static void gst_sinesrc_init(GstSineSrc *sinesrc) { gst_element_add_pad(GST_ELEMENT(sinesrc),sinesrc->srcpad); sinesrc->volume = 1.0; - sinesrc->freq = 512; sinesrc->format = AFMT_S16_LE; sinesrc->channels = 2; @@ -193,9 +190,6 @@ static void gst_sinesrc_set_arg(GtkObject *object,GtkArg *arg,guint id) { case ARG_VOLUME: src->volume = GTK_VALUE_DOUBLE(*arg); break; - case ARG_FREQ: - src->freq = GTK_VALUE_INT(*arg); - break; case ARG_FORMAT: src->format = GTK_VALUE_INT(*arg); break; @@ -221,9 +215,6 @@ static void gst_sinesrc_get_arg(GtkObject *object,GtkArg *arg,guint id) { case ARG_VOLUME: GTK_VALUE_DOUBLE(*arg) = src->volume; break; - case ARG_FREQ: - GTK_VALUE_INT(*arg) = src->freq; - break; case ARG_FORMAT: GTK_VALUE_INT(*arg) = src->format; break; diff --git a/gst/elements/gstsinesrc.h b/gst/elements/gstsinesrc.h index 9964ff553f..800f28b594 100644 --- a/gst/elements/gstsinesrc.h +++ b/gst/elements/gstsinesrc.h @@ -75,9 +75,6 @@ struct _GstSineSrcClass { }; GtkType gst_sinesrc_get_type(void); -GstElement *gst_sinesrc_new(gchar *name); - -void gst_sinesrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/gst/gstbin.c b/gst/gstbin.c index 9e1c1d3b52..0ea397ae7a 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -97,7 +97,7 @@ gst_bin_class_init(GstBinClass *klass) { gtk_signal_new("object_added",GTK_RUN_FIRST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstBinClass,object_added), gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + GST_TYPE_ELEMENT); gtk_object_class_add_signals(gtkobject_class,gst_bin_signals,LAST_SIGNAL); klass->change_state_type = gst_bin_change_state_type; @@ -298,6 +298,15 @@ void gst_bin_real_destroy(GtkObject *object) { g_list_free(bin->children); } +/** + * gst_bin_get_by_name: + * @bin: #Gstbin to search + * @name: the element name to search for + * + * get the element with the given name from this bin + * + * Returns: the element with the given name + */ GstElement *gst_bin_get_by_name(GstBin *bin,gchar *name) { GList *children; GstElement *child; @@ -317,6 +326,14 @@ GstElement *gst_bin_get_by_name(GstBin *bin,gchar *name) { return NULL; } +/** + * gst_bin_get_list: + * @bin: #Gstbin to get the list from + * + * get the list of elements in this bin + * + * Returns: a GList of elements + */ GList *gst_bin_get_list(GstBin *bin) { g_return_val_if_fail(bin != NULL, NULL); g_return_val_if_fail(GST_IS_BIN(bin), NULL); @@ -344,6 +361,12 @@ static xmlNodePtr gst_bin_save_thyself(GstElement *element,xmlNodePtr parent) { return childlist; } +/** + * gst_bin_iterate: + * @bin: #Gstbin to iterate + * + * iterates over the elements in this bin + */ void gst_bin_iterate(GstBin *bin) { GstBinClass *oclass; diff --git a/gst/gstbuffer.c b/gst/gstbuffer.c index a3bc6d892d..457d0671bc 100644 --- a/gst/gstbuffer.c +++ b/gst/gstbuffer.c @@ -118,6 +118,12 @@ GstBuffer *gst_buffer_create_sub(GstBuffer *parent,guint32 offset,guint32 size) return buffer; } +/** + * gst_buffer_destroy: + * @buffer: the GstBuffer to destroy + * + * destroy the buffer + */ void gst_buffer_destroy(GstBuffer *buffer) { GSList *metas; @@ -157,6 +163,12 @@ void gst_buffer_destroy(GstBuffer *buffer) { g_mem_chunk_free(_gst_buffer_chunk,buffer); } +/** + * gst_buffer_ref: + * @buffer: the GstBuffer to reference + * + * increment the refcount of this buffer + */ void gst_buffer_ref(GstBuffer *buffer) { g_return_if_fail(buffer != NULL); @@ -173,6 +185,13 @@ void gst_buffer_ref(GstBuffer *buffer) { #endif } +/** + * gst_buffer_ref_by_count: + * @buffer: the GstBuffer to reference + * @count: a number + * + * increment the refcount of this buffer with count + */ void gst_buffer_ref_by_count(GstBuffer *buffer,int count) { g_return_if_fail(buffer != NULL); g_return_if_fail(count > 0); @@ -188,6 +207,13 @@ void gst_buffer_ref_by_count(GstBuffer *buffer,int count) { #endif } +/** + * gst_buffer_unref: + * @buffer: the GstBuffer to unref + * + * decrement the refcount of this buffer. If the refcount is + * zero, the buffer will be destroyed. + */ void gst_buffer_unref(GstBuffer *buffer) { int zero; @@ -211,6 +237,13 @@ void gst_buffer_unref(GstBuffer *buffer) { gst_buffer_destroy(buffer); } +/** + * gst_buffer_add_meta: + * @buffer: the GstBuffer to add the metadata to + * @meta: the metadata to add to this buffer + * + * add the meta data to the buffer + */ void gst_buffer_add_meta(GstBuffer *buffer,GstMeta *meta) { g_return_if_fail(buffer != NULL); g_return_if_fail(meta != NULL); @@ -219,12 +252,28 @@ void gst_buffer_add_meta(GstBuffer *buffer,GstMeta *meta) { buffer->metas = g_slist_append(buffer->metas,meta); } +/** + * gst_buffer_get_metas: + * @buffer: the GstBuffer to get the metadata from + * + * get the metadatas from the buffer + * + * Returns: a GSList of metadata + */ GSList *gst_buffer_get_metas(GstBuffer *buffer) { g_return_val_if_fail(buffer != NULL, NULL); return buffer->metas; } +/** + * gst_buffer_get_first_meta: + * @buffer: the GstBuffer to get the metadata from + * + * get the first metadata from the buffer + * + * Returns: the first metadata from the buffer + */ GstMeta *gst_buffer_get_first_meta(GstBuffer *buffer) { g_return_val_if_fail(buffer != NULL, NULL); @@ -233,6 +282,13 @@ GstMeta *gst_buffer_get_first_meta(GstBuffer *buffer) { return GST_META(buffer->metas->data); } +/** + * gst_buffer_remove_meta: + * @buffer: the GstBuffer to remove the metadata from + * @meta: the metadata to remove + * + * remove the given metadata from the buffer + */ void gst_buffer_remove_meta(GstBuffer *buffer,GstMeta *meta) { g_return_if_fail(buffer != NULL); g_return_if_fail(meta != NULL); diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index 0bc62f7a5c..f52db4f746 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -29,7 +29,8 @@ extern "C" { #endif /* __cplusplus */ -#define GST_BUFFER(buf) ((GstBuffer *)(buf)) +#define GST_BUFFER(buf) \ + ((GstBuffer *)(buf)) #define GST_BUFFER_FLAGS(buf) \ diff --git a/gst/gstelement.c b/gst/gstelement.c index e7ea77d06a..b5bf819f61 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -78,17 +78,17 @@ static void gst_element_class_init(GstElementClass *klass) { gtk_signal_new("new_pad",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstElementClass,new_pad), gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + GST_TYPE_PAD); gst_element_signals[NEW_GHOST_PAD] = gtk_signal_new("new_ghost_pad",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstElementClass,new_ghost_pad), gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + GST_TYPE_PAD); gst_element_signals[ERROR] = gtk_signal_new("error",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstElementClass,error), - gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + gtk_marshal_NONE__STRING,GTK_TYPE_NONE,1, + GTK_TYPE_STRING); gtk_object_class_add_signals(gtkobject_class,gst_element_signals,LAST_SIGNAL); @@ -204,7 +204,7 @@ GstPad *gst_element_get_pad(GstElement *element,gchar *name) { * * Retrieve a list of the pads associated with the element. * - * Returns: GList of pads + * Returns: GList of pads */ GList *gst_element_get_pad_list(GstElement *element) { g_return_val_if_fail(element != NULL, NULL); @@ -310,7 +310,18 @@ gboolean gst_element_set_state(GstElement *element,GstElementState state) { return stateset; } -/* class function to set the state of a simple element */ +/** + * gst_element_change_state: + * @element: element to change state of + * @state: new element state + * + * Changes the state of the element, but more importantly fires off a signal + * indicating the new state. You can clear state by simply prefixing the + * GstElementState value with ~, it will be detected and used to turn off + * that bit. + * + * Returns: whether or not the state change was successfully set. + */ gboolean gst_element_change_state(GstElement *element, GstElementState state) { g_return_val_if_fail(element != NULL, FALSE); @@ -402,6 +413,15 @@ static gchar *_gst_element_type_names[] = { }; */ +/** + * gst_element_save_thyself: + * @element: GstElement to save + * @parent: the xml parent node + * + * saves the element + * + * Returns: the new xml node + */ xmlNodePtr gst_element_save_thyself(GstElement *element,xmlNodePtr parent) { xmlNodePtr self, arglist; GList *pads; diff --git a/gst/gstelement.h b/gst/gstelement.h index 6c92ebd85d..4a3387004d 100644 --- a/gst/gstelement.h +++ b/gst/gstelement.h @@ -69,7 +69,7 @@ gst_info("unset '%s' state %d\n",gst_element_get_name(obj),flag); \ #define GST_IS_ELEMENT(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_ELEMENT)) #define GST_IS_ELEMENT_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ELEMENT)) typedef struct _GstElement GstElement; typedef struct _GstElementClass GstElementClass; diff --git a/gst/gstfilter.h b/gst/gstfilter.h index 860cc4acbd..682a60c793 100644 --- a/gst/gstfilter.h +++ b/gst/gstfilter.h @@ -39,7 +39,7 @@ extern "C" { #define GST_IS_FILTER(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_FILTER)) #define GST_IS_FILTER_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FILTER))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_FILTER)) typedef struct _GstFilter GstFilter; typedef struct _GstFilterClass GstFilterClass; diff --git a/gst/gstobject.c b/gst/gstobject.c index 3c19e9b608..a9fc15dda1 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -71,7 +71,7 @@ static void gst_object_class_init(GstObjectClass *klass) { gtk_signal_new("parent_set",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstObjectClass,parent_set), gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + GST_TYPE_OBJECT); gtk_object_class_add_signals(gtkobject_class,gst_object_signals,LAST_SIGNAL); } @@ -103,6 +103,7 @@ GstObject *gst_object_new() { * * Set the parent of the object. The object's reference count is * incremented. + * signals the parent-set signal */ void gst_object_set_parent(GstObject *object,GstObject *parent) { g_return_if_fail(object != NULL); diff --git a/gst/gstobject.h b/gst/gstobject.h index 060e94831a..7fa8d53e3d 100644 --- a/gst/gstobject.h +++ b/gst/gstobject.h @@ -45,7 +45,7 @@ extern "C" { #define GST_IS_OBJECT(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_OBJECT)) #define GST_IS_OBJECT_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_OBJECT))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_OBJECT)) typedef struct _GstObject GstObject; typedef struct _GstObjectClass GstObjectClass; @@ -98,14 +98,14 @@ void gst_object_unparent(GstObject *object); /* refcounting */ //void gst_object_ref(GstObject *object); -#define gst_object_ref(obj) gtk_object_ref(GTK_OBJECT(obj)); +#define gst_object_ref(object) gtk_object_ref(GTK_OBJECT(object)); //void gst_object_unref(GstObject *object); -#define gst_object_unref(obj) gtk_object_unref(GTK_OBJECT(obj)); +#define gst_object_unref(object) gtk_object_unref(GTK_OBJECT(object)); //void gst_object_sink(GstObject *object); -#define gst_object_sink(obj) gtk_object_sink(GTK_OBJECT(obj)); +#define gst_object_sink(object) gtk_object_sink(GTK_OBJECT(object)); /* destroying an object */ -#define gst_object_destroy(obj) gtk_object_destroy(GTK_OBJECT(obj)) +#define gst_object_destroy(object) gtk_object_destroy(GTK_OBJECT(object)) #ifdef __cplusplus diff --git a/gst/gstpad.c b/gst/gstpad.c index ac41477716..c7b037a308 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -105,6 +105,14 @@ GstPad *gst_pad_new(gchar *name,GstPadDirection direction) { return pad; } +/** + * gst_pad_get_direction: + * @pad: the Pad to get the direction from + * + * get the direction of the pad + * + * Returns: the direction of the pad + */ GstPadDirection gst_pad_get_direction(GstPad *pad) { g_return_val_if_fail(pad != NULL, GST_PAD_UNKNOWN); g_return_val_if_fail(GST_IS_PAD(pad), GST_PAD_UNKNOWN); @@ -112,6 +120,13 @@ GstPadDirection gst_pad_get_direction(GstPad *pad) { return pad->direction; } +/** + * gst_pad_set_name: + * @pad: the pad to set the name of + * @name: the name of the pad + * + * set the name of a pad + */ void gst_pad_set_name(GstPad *pad,gchar *name) { g_return_if_fail(pad != NULL); g_return_if_fail(GST_IS_PAD(pad)); @@ -122,6 +137,14 @@ void gst_pad_set_name(GstPad *pad,gchar *name) { pad->name = g_strdup(name); } +/** + * gst_pad_get_name: + * @pad: the pad to get the name of + * + * get the name of a pad + * + * Returns: the name of the pad + */ gchar *gst_pad_get_name(GstPad *pad) { g_return_val_if_fail(pad != NULL, NULL); g_return_val_if_fail(GST_IS_PAD(pad), NULL); @@ -132,8 +155,6 @@ gchar *gst_pad_get_name(GstPad *pad) { void gst_pad_set_pull_function(GstPad *pad,GstPadPullFunction pull) { g_return_if_fail(pad != NULL); g_return_if_fail(GST_IS_PAD(pad)); - - fprintf(stderr, "pad setting pull function\n"); pad->pull = pull; } @@ -312,13 +333,6 @@ GstPad *gst_pad_get_peer(GstPad *pad) { return pad->peer; } -GstPadDirection gst_pad_get_directory(GstPad *pad) { - g_return_val_if_fail(pad != NULL, GST_PAD_UNKNOWN); - g_return_val_if_fail(GST_IS_PAD(pad), GST_PAD_UNKNOWN); - - return pad->direction; -} - static void gst_pad_real_destroy(GtkObject *object) { GstPad *pad = GST_PAD(object); diff --git a/gst/gstpad.h b/gst/gstpad.h index 4848c3216e..32da9afc8a 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -32,20 +32,17 @@ extern "C" { #endif /* __cplusplus */ -#define GST_TYPE_PAD \ - (gst_pad_get_type()) -#define GST_PAD(obj) \ - (GTK_CHECK_CAST((obj),GST_TYPE_PAD,GstPad)) -#define GST_PAD_CLASS(klass) \ - (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_PAD,GstPadClass)) -#define GST_IS_PAD(obj) \ - (GTK_CHECK_TYPE((obj),GST_TYPE_PAD)) -#define GST_IS_PAD_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PAD))) +#define GST_TYPE_PAD (gst_pad_get_type()) +#define GST_PAD(obj) (GTK_CHECK_CAST((obj),GST_TYPE_PAD,GstPad)) +#define GST_PAD_CLASS(klass) (GTK_CHECK_CLASS_CAST((klass),GST_TYPE_PAD,GstPadClass)) +#define GST_IS_PAD(obj) (GTK_CHECK_TYPE((obj),GST_TYPE_PAD)) +#define GST_IS_PAD_CLASS(obj) (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_PAD)) // quick test to see if the pad is connected -#define GST_PAD_CONNECTED(pad) ((pad)->peer != NULL) -#define GST_PAD_CAN_PULL(pad) ((pad)->pull != NULL) +#define GST_PAD_CONNECTED(pad) \ + ((pad)->peer != NULL) +#define GST_PAD_CAN_PULL(pad) \ + ((pad)->pull != NULL) typedef struct _GstPad GstPad; typedef struct _GstPadClass GstPadClass; @@ -104,8 +101,6 @@ void gst_pad_set_name(GstPad *pad,gchar *name); gchar *gst_pad_get_name(GstPad *pad); #define gst_pad_destroy(pad) gst_object_destroy(GST_OBJECT(pad)) -GstPadDirection gst_pad_get_directory(GstPad *pad); - void gst_pad_set_parent(GstPad *pad,GstObject *parent); void gst_pad_add_ghost_parent(GstPad *pad,GstObject *parent); void gst_pad_remove_ghost_parent(GstPad *pad,GstObject *parent); diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 4169af767b..c7f7cf76cf 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -313,6 +313,13 @@ void gst_plugin_add_factory(GstPlugin *plugin,GstElementFactory *factory) { plugin->elements = g_list_append(plugin->elements,factory); } +/** + * gst_plugin_get_list: + * + * get the currently loaded plugins + * + * Returns; a GList of GstPlugin elements + */ GList *gst_plugin_get_list() { return _gst_plugins; } diff --git a/gst/gstsink.c b/gst/gstsink.c index 26de07ee27..2196292793 100644 --- a/gst/gstsink.c +++ b/gst/gstsink.c @@ -72,6 +72,15 @@ gst_sink_class_init(GstSinkClass *klass) { static void gst_sink_init(GstSink *sink) { } +/** + * gst_sink_new: + * @name: name of new sink + * + * Create a new sink with given name. + * + * Returns: new sink + */ + GstObject *gst_sink_new(gchar *name) { GstObject *sink = GST_OBJECT(gtk_type_new(GST_TYPE_SINK)); gst_element_set_name(GST_ELEMENT(sink),name); diff --git a/gst/gstsink.h b/gst/gstsink.h index 44c3f7ab35..e04bdb0738 100644 --- a/gst/gstsink.h +++ b/gst/gstsink.h @@ -39,7 +39,7 @@ extern "C" { #define GST_IS_SINK(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_SINK)) #define GST_IS_SINK_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINK))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SINK)) typedef struct _GstSink GstSink; typedef struct _GstSinkClass GstSinkClass; diff --git a/gst/gstsrc.c b/gst/gstsrc.c index 472cd29be0..429e804341 100644 --- a/gst/gstsrc.c +++ b/gst/gstsrc.c @@ -71,7 +71,7 @@ gst_src_class_init(GstSrcClass *klass) { gtk_signal_new("eos",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstSrcClass,eos), gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, - GTK_TYPE_POINTER); + GST_TYPE_SRC); gtk_object_class_add_signals(gtkobject_class,gst_src_signals,LAST_SIGNAL); } @@ -79,6 +79,13 @@ static void gst_src_init(GstSrc *src) { src->flags = 0; } +/** + * gst_src_signal_eos: + * @src: source to trigger the eos signal of + * + * singals the eos signal to indicate that the end of the stream + * is reached. + */ void gst_src_signal_eos(GstSrc *src) { g_return_if_fail(src != NULL); g_return_if_fail(GST_IS_SRC(src)); @@ -86,6 +93,12 @@ void gst_src_signal_eos(GstSrc *src) { gtk_signal_emit(GTK_OBJECT(src),gst_src_signals[EOS],src); } +/** + * gst_src_push: + * @src: source to trigger the push of + * + * Push a buffer from the source. + */ void gst_src_push(GstSrc *src) { GstSrcClass *oclass; diff --git a/gst/gstsrc.h b/gst/gstsrc.h index 75405efd0d..39fdfe155e 100644 --- a/gst/gstsrc.h +++ b/gst/gstsrc.h @@ -39,14 +39,16 @@ extern "C" { #define GST_IS_SRC(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_SRC)) #define GST_IS_SRC_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC)) typedef enum { GST_SRC_ASYNC = 1 << 0, } GstSrcFlags; -#define GST_SRC_FLAGS(obj) (GST_SRC(obj)->flags) -#define GST_SRC_ASYNC(obj) ((GST_SRC_FLAGS(obj) & GST_SRC_ASYNC) +#define GST_SRC_FLAGS(obj) \ + (GST_SRC(obj)->flags) +#define GST_SRC_ASYNC(obj) \ + ((GST_SRC_FLAGS(obj) & GST_SRC_ASYNC)) typedef struct _GstSrc GstSrc; typedef struct _GstSrcClass GstSrcClass; @@ -67,8 +69,10 @@ struct _GstSrcClass { void (*eos) (GstSrc *src); }; -#define GST_SRC_SET_FLAGS(src,flag) G_STMT_START{ (GST_SRC_FLAGS (src) |= (flag)); }G_STMT_END -#define GST_SRC_UNSET_FLAGS(src,flag) G_STMT_START{ (GST_SRC_FLAGS (src) &= ~(flag)); }G_STMT_END +#define GST_SRC_SET_FLAGS(src,flag) \ + G_STMT_START{ (GST_SRC_FLAGS (src) |= (flag)); }G_STMT_END +#define GST_SRC_UNSET_FLAGS(src,flag) \ + G_STMT_START{ (GST_SRC_FLAGS (src) &= ~(flag)); }G_STMT_END GtkType gst_src_get_type(void); diff --git a/gst/gsttee.c b/gst/gsttee.c index 5c123188d1..aaec394fd2 100644 --- a/gst/gsttee.c +++ b/gst/gsttee.c @@ -23,7 +23,7 @@ GstElementDetails gst_tee_details = { "Tee pipe fitting", "Tee", - "1ot-N pipe fitting", + "1-to-N pipe fitting", VERSION, "Erik Walthinsen ", "(C) 1999", @@ -87,12 +87,28 @@ static void gst_tee_init(GstTee *tee) { tee->srcpads = NULL; } +/** + * gst_tee_new: + * @name: the name of the new tee + * + * create a new tee element + * + * Returns: the new tee element + */ GstElement *gst_tee_new(gchar *name) { GstElement *tee = GST_ELEMENT(gtk_type_new(GST_TYPE_TEE)); gst_element_set_name(GST_ELEMENT(tee),name); return tee; } +/** + * gst_tee_new_pad: + * @tee: the tee to create the new pad on + * + * create a new pad on a given tee + * + * Returns: the name of the new pad + */ gchar *gst_tee_new_pad(GstTee *tee) { gchar *name; GstPad *srcpad; @@ -108,6 +124,13 @@ gchar *gst_tee_new_pad(GstTee *tee) { return name; } +/** + * gst_tee_chain: + * @pad: the pad to follow + * @buf: the buffer to pass + * + * chain a buffer on a pad + */ void gst_tee_chain(GstPad *pad,GstBuffer *buf) { GstTee *tee; GSList *srcpads; diff --git a/gst/gstthread.c b/gst/gstthread.c index bc1a9787ff..c88f7e0b65 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -144,7 +144,14 @@ static void gst_thread_get_arg(GtkObject *object,GtkArg *arg,guint id) { } } - +/** + * gst_thread_new: + * @name: the name of the thread + * + * Create a new thrad with the given name + * + * Returns; The new thread + */ GstElement *gst_thread_new(guchar *name) { GstThread *thread; @@ -271,7 +278,13 @@ static gboolean gst_thread_change_state(GstElement *element, return stateset; } - +/** + * gst_thread_main_loop: + * @arg: the thread to start + * + * The main loop of the thread. The thread will iterate + * while the state is GST_THREAD_STATE_SPINNING + */ void *gst_thread_main_loop(void *arg) { GstThread *thread = GST_THREAD(arg); @@ -293,6 +306,12 @@ void *gst_thread_main_loop(void *arg) { return NULL; } +/** + * gst_thread_iterate: + * @thread: the thread to iterate + * + * do one iteration + */ void gst_thread_iterate(GstThread *thread) { GList *entries; GstElement *entry; diff --git a/gst/gstxml.c b/gst/gstxml.c index cfcd6dca70..f4321000f6 100644 --- a/gst/gstxml.c +++ b/gst/gstxml.c @@ -19,6 +19,14 @@ #include +/** + * gst_xml_write: + * @element: The element to write out + * + * converts the given elkement into an XML presentation + * + * Returns: a pointer to an XML document + */ xmlDocPtr gst_xml_write(GstElement *element) { xmlDocPtr doc; diff --git a/gst/meta/videoraw.h b/gst/meta/videoraw.h index 321621bdf2..f63cf52fcd 100644 --- a/gst/meta/videoraw.h +++ b/gst/meta/videoraw.h @@ -42,33 +42,33 @@ enum { }; struct _OverlayClip { - int x1, x2, y1, y2; + int x1, x2, y1, y2; }; struct _MetaDGA { - // the base address of the screen - void *base; - // the dimensions of the screen - int swidth, sheight; - // the number of bytes in a line - int bytes_per_line; + // the base address of the screen + void *base; + // the dimensions of the screen + int swidth, sheight; + // the number of bytes in a line + int bytes_per_line; }; struct _MetaOverlay { - // the position of the window - int wx, wy; - // a reference to the object sending overlay change events - GtkWidget *overlay_element; - // the number of overlay regions - int clip_count; - // the overlay regions of the display window - struct _OverlayClip overlay_clip[32]; + // the position of the window + int wx, wy; + // a reference to the object sending overlay change events + GtkWidget *overlay_element; + // the number of overlay regions + int clip_count; + // the overlay regions of the display window + struct _OverlayClip overlay_clip[32]; gint width; gint height; - gboolean did_overlay; - gboolean fully_obscured; + gboolean did_overlay; + gboolean fully_obscured; }; struct _MetaVideoRaw { @@ -80,10 +80,10 @@ struct _MetaVideoRaw { // dimensions of the video buffer gint width; gint height; - // a pointer to the overlay info if the sink supports this - MetaOverlay *overlay_info; - // a pointer to the DGA info if the sink supports this - MetaDGA *dga_info; + // a pointer to the overlay info if the sink supports this + MetaOverlay *overlay_info; + // a pointer to the DGA info if the sink supports this + MetaDGA *dga_info; }; #endif /* __GST_META_VIDEORAW_H__ */ diff --git a/plugins/elements/gstasyncdisksrc.h b/plugins/elements/gstasyncdisksrc.h index 5c50d6ef5b..6add9425b9 100644 --- a/plugins/elements/gstasyncdisksrc.h +++ b/plugins/elements/gstasyncdisksrc.h @@ -43,7 +43,7 @@ GstElementDetails gst_asyncdisksrc_details; #define GST_IS_ASYNCDISKSRC(obj) \ (GTK_CHECK_TYPE((obj),GST_TYPE_ASYNCDISKSRC)) #define GST_IS_ASYNCDISKSRC_CLASS(obj) \ - (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC))) + (GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_ASYNCDISKSRC)) // NOTE: per-element flags start with 16 for now typedef enum { diff --git a/plugins/elements/gstaudiosink.c b/plugins/elements/gstaudiosink.c index 3d1c05e875..491847f221 100644 --- a/plugins/elements/gstaudiosink.c +++ b/plugins/elements/gstaudiosink.c @@ -47,6 +47,7 @@ static gboolean gst_audiosink_stop(GstElement *element); static gboolean gst_audiosink_change_state(GstElement *element, GstElementState state); +void gst_audiosink_chain(GstPad *pad,GstBuffer *buf); /* AudioSink signals and args */ enum { @@ -64,7 +65,7 @@ static void gst_audiosink_class_init(GstAudioSinkClass *klass); static void gst_audiosink_init(GstAudioSink *audiosink); -static GstFilterClass *parent_class = NULL; +static GstSinkClass *parent_class = NULL; static guint gst_audiosink_signals[LAST_SIGNAL] = { 0 }; static guint16 gst_audiosink_type_audio = 0; @@ -84,7 +85,7 @@ gst_audiosink_get_type(void) { (GtkArgGetFunc)NULL, (GtkClassInitFunc)NULL, }; - audiosink_type = gtk_type_unique(GST_TYPE_FILTER,&audiosink_info); + audiosink_type = gtk_type_unique(GST_TYPE_SINK,&audiosink_info); } if (!gst_audiosink_type_audio) @@ -106,8 +107,8 @@ gst_audiosink_class_init(GstAudioSinkClass *klass) { gst_audiosink_signals[HANDOFF] = gtk_signal_new("handoff",GTK_RUN_LAST,gtkobject_class->type, GTK_SIGNAL_OFFSET(GstAudioSinkClass,handoff), - gtk_marshal_NONE__POINTER_POINTER,GTK_TYPE_NONE,2, - GTK_TYPE_POINTER,GTK_TYPE_POINTER); + gtk_marshal_NONE__POINTER,GTK_TYPE_NONE,1, + GST_TYPE_AUDIOSINK); gtk_object_class_add_signals(gtkobject_class,gst_audiosink_signals, LAST_SIGNAL); diff --git a/plugins/elements/gstaudiosink.h b/plugins/elements/gstaudiosink.h index 5159eb0a95..fc50a0b6cf 100644 --- a/plugins/elements/gstaudiosink.h +++ b/plugins/elements/gstaudiosink.h @@ -49,7 +49,7 @@ typedef struct _GstAudioSink GstAudioSink; typedef struct _GstAudioSinkClass GstAudioSinkClass; struct _GstAudioSink { - GstFilter filter; + GstSink sink; GstPad *sinkpad; @@ -61,21 +61,13 @@ struct _GstAudioSink { }; struct _GstAudioSinkClass { - GstFilterClass parent_class; + GstSinkClass parent_class; /* signals */ void (*handoff) (GstElement *element,GstPad *pad); }; GtkType gst_audiosink_get_type(void); -GstElement *gst_audiosink_new(gchar *name); -void gst_audiosink_chain(GstPad *pad,GstBuffer *buf); - -void gst_audiosink_sync_parms(GstAudioSink *audiosink); - -void gst_audiosink_set_format(GstAudioSink *audiosink,gint format); -void gst_audiosink_set_channels(GstAudioSink *audiosink,gint channels); -void gst_audiosink_set_frequency(GstAudioSink *audiosink,gint frequency); #ifdef __cplusplus } diff --git a/plugins/elements/gstaudiosrc.c b/plugins/elements/gstaudiosrc.c index 75bd188f62..670657ff33 100644 --- a/plugins/elements/gstaudiosrc.c +++ b/plugins/elements/gstaudiosrc.c @@ -45,7 +45,6 @@ enum { enum { ARG_0, - ARG_LOCATION, ARG_BYTESPERREAD, ARG_CUROFFSET, ARG_FORMAT, @@ -64,6 +63,7 @@ static void gst_audiosrc_close_audio(GstAudioSrc *src); static gboolean gst_audiosrc_open_audio(GstAudioSrc *src); void gst_audiosrc_sync_parms(GstAudioSrc *audiosrc); +void gst_audiosrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_audiosrc_signals[LAST_SIGNAL] = { 0 }; @@ -100,8 +100,6 @@ gst_audiosrc_class_init(GstAudioSrcClass *klass) { parent_class = gtk_type_class(GST_TYPE_SRC); - gtk_object_add_arg_type("GstAudioSrc::location", GTK_TYPE_STRING, - GTK_ARG_READWRITE, ARG_LOCATION); gtk_object_add_arg_type("GstAudioSrc::bytes_per_read", GTK_TYPE_ULONG, GTK_ARG_READWRITE, ARG_BYTESPERREAD); gtk_object_add_arg_type("GstAudioSrc::curoffset", GTK_TYPE_ULONG, @@ -125,7 +123,6 @@ static void gst_audiosrc_init(GstAudioSrc *audiosrc) { audiosrc->srcpad = gst_pad_new("src",GST_PAD_SRC); gst_element_add_pad(GST_ELEMENT(audiosrc),audiosrc->srcpad); - audiosrc->filename = g_strdup("/dev/dsp"); audiosrc->fd = -1; // audiosrc->meta = (MetaAudioRaw *)gst_meta_new(); @@ -145,12 +142,6 @@ GstElement *gst_audiosrc_new(gchar *name) { return audiosrc; } -GstElement *gst_audiosrc_new_with_fd(gchar *name,gchar *filename) { - GstElement *audiosrc = gst_audiosrc_new(name); - gtk_object_set(GTK_OBJECT(audiosrc),"location",filename,NULL); - return audiosrc; -} - void gst_audiosrc_push(GstSrc *src) { GstAudioSrc *audiosrc; GstBuffer *buf; @@ -190,16 +181,6 @@ static void gst_audiosrc_set_arg(GtkObject *object,GtkArg *arg,guint id) { src = GST_AUDIOSRC(object); switch (id) { - case ARG_LOCATION: - if (src->filename) g_free(src->filename); - if (GTK_VALUE_STRING(*arg) == NULL) { - src->filename = NULL; - gst_element_set_state(GST_ELEMENT(object),~GST_STATE_COMPLETE); - } else { - src->filename = g_strdup(GTK_VALUE_STRING(*arg)); - gst_element_set_state(GST_ELEMENT(object),GST_STATE_COMPLETE); - } - break; case ARG_BYTESPERREAD: src->bytes_per_read = GTK_VALUE_INT(*arg); break; @@ -225,9 +206,6 @@ static void gst_audiosrc_get_arg(GtkObject *object,GtkArg *arg,guint id) { src = GST_AUDIOSRC(object); switch (id) { - case ARG_LOCATION: - GTK_VALUE_STRING(*arg) = g_strdup(src->filename); - break; case ARG_BYTESPERREAD: GTK_VALUE_INT(*arg) = src->bytes_per_read; break; diff --git a/plugins/elements/gstaudiosrc.h b/plugins/elements/gstaudiosrc.h index bcaedcf4a3..bd2a9c6a60 100644 --- a/plugins/elements/gstaudiosrc.h +++ b/plugins/elements/gstaudiosrc.h @@ -56,7 +56,6 @@ struct _GstAudioSrc { GstPad *srcpad; /* sound card */ - gchar *filename; gint fd; /* audio parameters */ @@ -78,9 +77,6 @@ struct _GstAudioSrcClass { }; GtkType gst_audiosrc_get_type(void); -GstElement *gst_audiosrc_new(gchar *name); - -void gst_audiosrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/plugins/elements/gstdisksrc.c b/plugins/elements/gstdisksrc.c index 99ae974911..ac11143fe0 100644 --- a/plugins/elements/gstdisksrc.c +++ b/plugins/elements/gstdisksrc.c @@ -201,6 +201,7 @@ void gst_disksrc_push(GstSrc *src) { readbytes = read(disksrc->fd,GST_BUFFER_DATA(buf),disksrc->bytes_per_read); if (readbytes == 0) { gst_src_signal_eos(GST_SRC(disksrc)); + gst_buffer_unref(buf); return; } diff --git a/plugins/elements/gstesdsink.h b/plugins/elements/gstesdsink.h index 97dce1e9bf..0430b1355d 100644 --- a/plugins/elements/gstesdsink.h +++ b/plugins/elements/gstesdsink.h @@ -64,14 +64,6 @@ struct _GstEsdSinkClass { }; GtkType gst_esdsink_get_type(void); -GstElement *gst_esdsink_new(gchar *name); -void gst_esdsink_chain(GstPad *pad,GstBuffer *buf); - -void gst_esdsink_sync_parms(GstEsdSink *esdsink); - -void gst_esdsink_set_format(GstEsdSink *esdsink,gint format); -void gst_esdsink_set_channels(GstEsdSink *esdsink,gint channels); -void gst_esdsink_set_frequency(GstEsdSink *esdsink,gint frequency); #ifdef __cplusplus } diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index c66949dd3b..4b97c4a1f3 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -46,6 +46,8 @@ enum { static void gst_fakesink_class_init(GstFakeSinkClass *klass); static void gst_fakesink_init(GstFakeSink *fakesink); +GstElement *gst_fakesink_new(gchar *name); +void gst_fakesink_chain(GstPad *pad,GstBuffer *buf); static GstSinkClass *parent_class = NULL; //static guint gst_fakesink_signals[LAST_SIGNAL] = { 0 }; @@ -88,12 +90,28 @@ static void gst_fakesink_init(GstFakeSink *fakesink) { gst_element_set_state(GST_ELEMENT(fakesink),GST_STATE_COMPLETE); } +/** + * gst_fakesink_new: + * @name: the name of the new fakesrc + * + * create a new fakesink + * + * Returns: the new fakesink + */ GstElement *gst_fakesink_new(gchar *name) { GstElement *fakesink = GST_ELEMENT(gtk_type_new(GST_TYPE_FAKESINK)); gst_element_set_name(GST_ELEMENT(fakesink),name); return fakesink; } +/** + * gst_fakesink_chain: + * @pad: the pad this faksink is connected to + * @buf: the buffer that has to be absorbed + * + * take the buffer from the pad and unref it without doing + * anything with it. + */ void gst_fakesink_chain(GstPad *pad,GstBuffer *buf) { GstFakeSink *fakesink; diff --git a/plugins/elements/gstfakesink.h b/plugins/elements/gstfakesink.h index e6617fc21b..e185ffe9cc 100644 --- a/plugins/elements/gstfakesink.h +++ b/plugins/elements/gstfakesink.h @@ -59,8 +59,6 @@ struct _GstFakeSinkClass { }; GtkType gst_fakesink_get_type(void); -GstElement *gst_fakesink_new(gchar *name); -void gst_fakesink_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/plugins/elements/gstfakesrc.c b/plugins/elements/gstfakesrc.c index 3426385660..565caa295e 100644 --- a/plugins/elements/gstfakesrc.c +++ b/plugins/elements/gstfakesrc.c @@ -46,6 +46,7 @@ enum { static void gst_fakesrc_class_init(GstFakeSrcClass *klass); static void gst_fakesrc_init(GstFakeSrc *fakesrc); +void gst_fakesrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_fakesrc_signals[LAST_SIGNAL] = { 0 }; @@ -90,12 +91,26 @@ static void gst_fakesrc_init(GstFakeSrc *fakesrc) { gst_element_set_state(GST_ELEMENT(fakesrc),GST_STATE_COMPLETE); } +/** + * gst_fakesrc_new: + * @name: then name of the fakse source + * + * create a new fakesrc + * + * Returns: The new element. + */ GstElement *gst_fakesrc_new(gchar *name) { GstElement *fakesrc = GST_ELEMENT(gtk_type_new(GST_TYPE_FAKESRC)); gst_element_set_name(GST_ELEMENT(fakesrc),name); return fakesrc; } +/** + * gst_fakesrc_push: + * @src: the faksesrc to push + * + * generate an empty buffer and push it to the next element. + */ void gst_fakesrc_push(GstSrc *src) { GstFakeSrc *fakesrc; GstBuffer *buf; diff --git a/plugins/elements/gstfakesrc.h b/plugins/elements/gstfakesrc.h index 946e0f154c..4acbdf34ce 100644 --- a/plugins/elements/gstfakesrc.h +++ b/plugins/elements/gstfakesrc.h @@ -59,8 +59,6 @@ struct _GstFakeSrcClass { }; GtkType gst_fakesrc_get_type(void); -GstElement *gst_fakesrc_new(gchar *name); -void gst_fakesrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/plugins/elements/gstfdsink.c b/plugins/elements/gstfdsink.c index f39f40d5c6..1308ce6f71 100644 --- a/plugins/elements/gstfdsink.c +++ b/plugins/elements/gstfdsink.c @@ -48,6 +48,7 @@ static void gst_fdsink_init(GstFdSink *fdsink); static void gst_fdsink_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_fdsink_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_fdsink_chain(GstPad *pad,GstBuffer *buf); static GstSinkClass *parent_class = NULL; //static guint gst_fdsink_signals[LAST_SIGNAL] = { 0 }; diff --git a/plugins/elements/gstfdsink.h b/plugins/elements/gstfdsink.h index 8a7cba37bf..8c00bf5d73 100644 --- a/plugins/elements/gstfdsink.h +++ b/plugins/elements/gstfdsink.h @@ -61,9 +61,6 @@ struct _GstFdSinkClass { }; GtkType gst_fdsink_get_type(void); -GstElement *gst_fdsink_new(gchar *name); -GstElement *gst_fdsink_new_with_fd(gchar *name,gint fd); -void gst_fdsink_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 31c8cb2ca1..6ca61e128f 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -98,7 +98,7 @@ gst_fdsrc_class_init(GstFdSrcClass *klass) { gtk_object_add_arg_type("GstFdSrc::bytesperread", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_BYTESPERREAD); gtk_object_add_arg_type("GstFdSrc::offset", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_OFFSET); + GTK_ARG_READABLE, ARG_OFFSET); gtkobject_class->set_arg = gst_fdsrc_set_arg; gtkobject_class->get_arg = gst_fdsrc_get_arg; diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 43fae7e4f7..0693c3138b 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -48,6 +48,7 @@ static void gst_identity_init(GstIdentity *identity); static void gst_identity_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_identity_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_identity_chain(GstPad *pad,GstBuffer *buf); static GstFilterClass *parent_class = NULL; //static guint gst_identity_signals[LAST_SIGNAL] = { 0 }; @@ -81,11 +82,11 @@ static void gst_identity_class_init(GstIdentityClass *klass) { parent_class = gtk_type_class(GST_TYPE_FILTER); - gtk_object_add_arg_type("GstIdentity::control", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_CONTROL); + //gtk_object_add_arg_type("GstIdentity::control", GTK_TYPE_INT, + // GTK_ARG_READWRITE, ARG_CONTROL); - gtkobject_class->set_arg = gst_identity_set_arg; - gtkobject_class->get_arg = gst_identity_get_arg; + //gtkobject_class->set_arg = gst_identity_set_arg; + //gtkobject_class->get_arg = gst_identity_get_arg; } static void gst_identity_init(GstIdentity *identity) { diff --git a/plugins/elements/gstidentity.h b/plugins/elements/gstidentity.h index f186a49847..9c0c2eafd4 100644 --- a/plugins/elements/gstidentity.h +++ b/plugins/elements/gstidentity.h @@ -62,8 +62,6 @@ struct _GstIdentityClass { }; GtkType gst_identity_get_type(void); -GstElement *gst_identity_new(gchar *name); -void gst_identity_chain(GstPad *pad,GstBuffer *buf); #ifdef __cplusplus diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index c6aef6f4e7..7d463e657c 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -49,6 +49,8 @@ static void gst_queue_init(GstQueue *queue); static void gst_queue_set_arg(GtkObject *object,GtkArg *arg,guint id); static void gst_queue_get_arg(GtkObject *object,GtkArg *arg,guint id); +void gst_queue_push(GstConnection *connection); +void gst_queue_chain(GstPad *pad,GstBuffer *buf); static GstConnectionClass *parent_class = NULL; //static guint gst_queue_signals[LAST_SIGNAL] = { 0 }; diff --git a/plugins/elements/gstqueue.h b/plugins/elements/gstqueue.h index b0ea7680b1..4016b94005 100644 --- a/plugins/elements/gstqueue.h +++ b/plugins/elements/gstqueue.h @@ -75,9 +75,6 @@ struct _GstQueueClass { }; GtkType gst_queue_get_type(void); -GstElement *gst_queue_new(gchar *name); -void gst_queue_chain(GstPad *pad,GstBuffer *buf); -void gst_queue_push(GstConnection *connection); #ifdef __cplusplus } diff --git a/plugins/elements/gstsinesrc.c b/plugins/elements/gstsinesrc.c index 9585c15687..cf302d071f 100644 --- a/plugins/elements/gstsinesrc.c +++ b/plugins/elements/gstsinesrc.c @@ -46,7 +46,6 @@ enum { enum { ARG_0, ARG_VOLUME, - ARG_FREQ, ARG_FORMAT, ARG_CHANNELS, ARG_FREQUENCY, @@ -63,6 +62,7 @@ static void gst_sinesrc_get_arg(GtkObject *object,GtkArg *arg,guint id); //static gboolean gst_sinesrc_open_audio(GstSineSrc *src); void gst_sinesrc_sync_parms(GstSineSrc *sinesrc); +void gst_sinesrc_push(GstSrc *src); static GstSrcClass *parent_class = NULL; //static guint gst_sinesrc_signals[LAST_SIGNAL] = { 0 }; @@ -101,8 +101,6 @@ gst_sinesrc_class_init(GstSineSrcClass *klass) { gtk_object_add_arg_type("GstSineSrc::volume", GTK_TYPE_DOUBLE, GTK_ARG_READWRITE, ARG_VOLUME); - gtk_object_add_arg_type("GstSineSrc::freq", GTK_TYPE_INT, - GTK_ARG_READWRITE, ARG_FREQ); gtk_object_add_arg_type("GstSineSrc::format", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_FORMAT); gtk_object_add_arg_type("GstSineSrc::channels", GTK_TYPE_INT, @@ -123,7 +121,6 @@ static void gst_sinesrc_init(GstSineSrc *sinesrc) { gst_element_add_pad(GST_ELEMENT(sinesrc),sinesrc->srcpad); sinesrc->volume = 1.0; - sinesrc->freq = 512; sinesrc->format = AFMT_S16_LE; sinesrc->channels = 2; @@ -193,9 +190,6 @@ static void gst_sinesrc_set_arg(GtkObject *object,GtkArg *arg,guint id) { case ARG_VOLUME: src->volume = GTK_VALUE_DOUBLE(*arg); break; - case ARG_FREQ: - src->freq = GTK_VALUE_INT(*arg); - break; case ARG_FORMAT: src->format = GTK_VALUE_INT(*arg); break; @@ -221,9 +215,6 @@ static void gst_sinesrc_get_arg(GtkObject *object,GtkArg *arg,guint id) { case ARG_VOLUME: GTK_VALUE_DOUBLE(*arg) = src->volume; break; - case ARG_FREQ: - GTK_VALUE_INT(*arg) = src->freq; - break; case ARG_FORMAT: GTK_VALUE_INT(*arg) = src->format; break; diff --git a/plugins/elements/gstsinesrc.h b/plugins/elements/gstsinesrc.h index 9964ff553f..800f28b594 100644 --- a/plugins/elements/gstsinesrc.h +++ b/plugins/elements/gstsinesrc.h @@ -75,9 +75,6 @@ struct _GstSineSrcClass { }; GtkType gst_sinesrc_get_type(void); -GstElement *gst_sinesrc_new(gchar *name); - -void gst_sinesrc_push(GstSrc *src); #ifdef __cplusplus } diff --git a/test/Makefile.am b/test/Makefile.am index 80b9ca0c66..765206cbe6 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,7 +1,7 @@ #noinst_PROGRAMS = basic m types a r plugin w s args mpg123 mcut push qtest noinst_PROGRAMS = qtest spectrum record wave mp3 teardown buffer mp3parse \ mpeg2parse mp1parse mp3play ac3parse ac3play dvdcat fake cobin videotest \ - aviparse + aviparse vidcapture SUBDIRS = xml cothreads bindings diff --git a/test/vidcapture.c b/test/vidcapture.c new file mode 100644 index 0000000000..cbbd1b3ccd --- /dev/null +++ b/test/vidcapture.c @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include + +int main(int argc,char *argv[]) { + int fd; + GstPipeline *pipeline; + GstElement *audiosrc, *videosrc, *fdsink, *encoder; + GstElementFactory *audiosrcfactory, *fdsinkfactory, *encoderfactory; + GstElementFactory *videosrcfactory; + GList *padlist; + + gst_init(&argc,&argv); + + gst_plugin_load("v4lsrc"); + gst_plugin_load("aviencoder"); + + pipeline = gst_pipeline_new("pipeline"); + + audiosrcfactory = gst_elementfactory_find("audiosrc"); + audiosrc = gst_elementfactory_create(audiosrcfactory,"audiosrc"); + videosrcfactory = gst_elementfactory_find("v4lsrc"); + videosrc = gst_elementfactory_create(videosrcfactory,"videosrc"); + encoderfactory = gst_elementfactory_find("aviencoder"); + encoder = gst_elementfactory_create(encoderfactory,"aviencoder"); + gtk_object_set(GTK_OBJECT(videosrc),"width",120,"height",80,NULL); + + fd = open(argv[1],O_CREAT|O_RDWR|O_TRUNC); + + fdsinkfactory = gst_elementfactory_find("fdsink"); + fdsink = gst_elementfactory_create(fdsinkfactory,"fdsink"); + gtk_object_set(GTK_OBJECT(fdsink),"fd",fd,NULL); + + /* add objects to the main pipeline */ + gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(videosrc)); + gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(encoder)); + gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(fdsink)); + + /* connect src to sink */ + gst_pad_connect(gst_element_get_pad(videosrc,"src"), + gst_element_get_pad(encoder,"video_00")); + gst_pad_connect(gst_element_get_pad(encoder,"src"), + gst_element_get_pad(fdsink,"sink")); + + g_print("\neverything's built, setting it up to be runnable\n"); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_RUNNING); + + g_print("\nok, runnable, hitting 'play'...\n"); + gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING); + + while(1) + gst_src_push(GST_SRC(videosrc)); +} +