From 207aced76da0526d2bd60e874896623cf8714423 Mon Sep 17 00:00:00 2001 From: Julien Moutte Date: Thu, 8 Dec 2005 16:27:12 +0000 Subject: [PATCH] docs/plugins/Makefile.am: Add multipart elements. Original commit message from CVS: 2005-12-08 Julien MOUTTE * docs/plugins/Makefile.am: Add multipart elements. * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: Fix flac. * docs/plugins/gst-plugins-good-plugins.hierarchy: * gst/multipart/multipartdemux.c: * gst/multipart/multipartmux.c: Add docs. --- ChangeLog | 9 ++++ docs/plugins/Makefile.am | 4 +- .../gst-plugins-good-plugins-docs.sgml | 3 +- .../gst-plugins-good-plugins-sections.txt | 19 ++++++++- .../gst-plugins-good-plugins.hierarchy | 2 + gst/multipart/multipartdemux.c | 42 +++++++++++++++---- gst/multipart/multipartmux.c | 27 ++++++++++++ 7 files changed, 95 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index bae2f60aa1..2e7fde32f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-12-08 Julien MOUTTE + + * docs/plugins/Makefile.am: Add multipart elements. + * docs/plugins/gst-plugins-good-plugins-docs.sgml: + * docs/plugins/gst-plugins-good-plugins-sections.txt: Fix flac. + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * gst/multipart/multipartdemux.c: + * gst/multipart/multipartmux.c: Add docs. + 2005-12-07 Edward Hervey * gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_event), diff --git a/docs/plugins/Makefile.am b/docs/plugins/Makefile.am index 904b30d1ed..67a90f36e1 100644 --- a/docs/plugins/Makefile.am +++ b/docs/plugins/Makefile.am @@ -79,7 +79,9 @@ EXTRA_HFILES = \ $(top_srcdir)/gst/level/gstlevel.h \ $(top_srcdir)/gst/goom/gstgoom.h \ $(top_srcdir)/ext/cairo/gsttimeoverlay.h \ - $(top_srcdir)/ext/flac/gstflacdec.h + $(top_srcdir)/ext/flac/gstflacdec.h \ + $(top_srcdir)/gst/multipart/multipartmux.c \ + $(top_srcdir)/gst/multipart/multipartdemux.c # example code that needs to be converted to xml and placed in xml/ EXAMPLE_CFILES = \ diff --git a/docs/plugins/gst-plugins-good-plugins-docs.sgml b/docs/plugins/gst-plugins-good-plugins-docs.sgml index 2ddcad3b1f..a6df6a46e3 100644 --- a/docs/plugins/gst-plugins-good-plugins-docs.sgml +++ b/docs/plugins/gst-plugins-good-plugins-docs.sgml @@ -18,6 +18,8 @@ + + @@ -38,7 +40,6 @@ - diff --git a/docs/plugins/gst-plugins-good-plugins-sections.txt b/docs/plugins/gst-plugins-good-plugins-sections.txt index 2f5b041557..6924967d22 100644 --- a/docs/plugins/gst-plugins-good-plugins-sections.txt +++ b/docs/plugins/gst-plugins-good-plugins-sections.txt @@ -24,10 +24,10 @@ GstCairoTimeOverlayClass
element-flacdec -GstFlacDec +FlacDec flacdec -GstFlacDecClass +FlacDecClass
@@ -46,4 +46,19 @@ GstLevel GstLevelClass
+
+element-multipartmux +GstMultipartMux +multipartmux + +GstMultipartMuxClass +
+ +
+element-multipartdemux +GstMultipartDemux +multipartdemux + +GstMultipartDemuxClass +
diff --git a/docs/plugins/gst-plugins-good-plugins.hierarchy b/docs/plugins/gst-plugins-good-plugins.hierarchy index a9f0638498..fb9b8ced88 100644 --- a/docs/plugins/gst-plugins-good-plugins.hierarchy +++ b/docs/plugins/gst-plugins-good-plugins.hierarchy @@ -292,6 +292,8 @@ GObject GstAlsaMixerElement GstTee GstTypeFindElement + GstMultipartMux + GstMultipartDemux GstPadTemplate GstIndex GstMemIndex diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c index 89e7954f08..389f23932d 100644 --- a/gst/multipart/multipartdemux.c +++ b/gst/multipart/multipartdemux.c @@ -19,6 +19,29 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-multipartdemux + * @short_description: Demuxer that takes a multipart digital stream as input + * and demuxes one or many digital streams from it. + * @see_also: #GstMultipartMux + * + * + * + * MultipartDemux uses the Content-type field of incoming buffers to demux and + * push data to dynamic source pads. Most of the time multipart streams are + * sequential JPEG frames. + * + * Sample pipelines + * + * Here is a simple pipeline to demux a multipart file muxed with + * #GstMultipartMux containing JPEG frames at a rate of 5 frames per second : + * + * gst-launch filesrc location=/tmp/test.multipart ! multipartdemux ! jpegdec ! video/x-raw-yuv, framerate=(fraction)5/1 ! ffmpegcolorspace ! ximagesink + * + * + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -27,22 +50,16 @@ #include -GST_DEBUG_CATEGORY_STATIC (gst_multipart_demux_debug); -#define GST_CAT_DEFAULT gst_multipart_demux_debug - #define GST_TYPE_MULTIPART_DEMUX (gst_multipart_demux_get_type()) #define GST_MULTIPART_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTIPART_DEMUX, GstMultipartDemux)) #define GST_MULTIPART_DEMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTIPART_DEMUX, GstMultipartDemux)) #define GST_IS_MULTIPART_DEMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTIPART_DEMUX)) #define GST_IS_MULTIPART_DEMUX_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTIPART_DEMUX)) -#define MAX_LINE_LEN 500 - typedef struct _GstMultipartDemux GstMultipartDemux; typedef struct _GstMultipartDemuxClass GstMultipartDemuxClass; -static gchar *toFind = "--ThisRandomString\nContent-type: "; -static gint toFindLen; +#define MAX_LINE_LEN 500 /* all information needed for one multipart stream */ typedef struct @@ -58,6 +75,11 @@ typedef struct } GstMultipartPad; +/** + * GstMultipartDemux: + * + * The opaque #GstMultipartDemux structure. + */ struct _GstMultipartDemux { GstElement element; @@ -81,6 +103,12 @@ struct _GstMultipartDemuxClass GstElementClass parent_class; }; +GST_DEBUG_CATEGORY_STATIC (gst_multipart_demux_debug); +#define GST_CAT_DEFAULT gst_multipart_demux_debug + +static gchar *toFind = "--ThisRandomString\nContent-type: "; +static gint toFindLen; + /* elementfactory information */ static GstElementDetails gst_multipart_demux_details = GST_ELEMENT_DETAILS ("multipart demuxer", diff --git a/gst/multipart/multipartmux.c b/gst/multipart/multipartmux.c index 74ee8688e5..8bcad1139a 100644 --- a/gst/multipart/multipartmux.c +++ b/gst/multipart/multipartmux.c @@ -17,6 +17,28 @@ * Boston, MA 02111-1307, USA. */ +/** + * SECTION:element-multipartmux + * @short_description: Muxer that takes one or several digital streams + * and muxes them to a single multipart stream. + * + * + * + * MultipartMux uses the #GstCaps of the sink pad as the Content-type field for + * incoming buffers when muxing them to a multipart stream. Most of the time + * multipart streams are sequential JPEG frames. + * + * Sample pipelines + * + * Here is a simple pipeline to mux 5 JPEG frames per second into a multipart + * stream stored to a file : + * + * gst-launch videotestsrc ! video/x-raw-yuv, framerate=(fraction)5/1 ! jpegenc ! multipartmux ! filesink location=/tmp/test.multipart + * + * + * + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -47,6 +69,11 @@ typedef struct } GstMultipartPad; +/** + * GstMultipartMux: + * + * The opaque #GstMultipartMux structure. + */ struct _GstMultipartMux { GstElement element;