mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
Add documentation for id3demux.
Original commit message from CVS: 2005-12-21 Jan Schmidt <thaytan@mad.scientist.com> * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-good-plugins-docs.sgml: * docs/plugins/gst-plugins-good-plugins-sections.txt: * docs/plugins/gst-plugins-good-plugins.args: * gst/id3demux/gstid3demux.c: (gst_id3demux_get_type), (gst_id3demux_base_init), (gst_id3demux_class_init), (gst_id3demux_chain): * gst/id3demux/gstid3demux.h: Add documentation for id3demux. Don't fail if the first buffer is not at offset 0, just attempt to typefind and do pass through Rename the gst_type function from gst_gst_id3demux..
This commit is contained in:
parent
bdafee5925
commit
79e762425b
7 changed files with 170 additions and 14 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2005-12-21 Jan Schmidt <thaytan@mad.scientist.com>
|
||||
|
||||
* docs/plugins/Makefile.am:
|
||||
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
|
||||
* docs/plugins/gst-plugins-good-plugins-sections.txt:
|
||||
* docs/plugins/gst-plugins-good-plugins.args:
|
||||
* gst/id3demux/gstid3demux.c: (gst_id3demux_get_type),
|
||||
(gst_id3demux_base_init), (gst_id3demux_class_init),
|
||||
(gst_id3demux_chain):
|
||||
* gst/id3demux/gstid3demux.h:
|
||||
Add documentation for id3demux.
|
||||
Don't fail if the first buffer is not at offset 0, just
|
||||
attempt to typefind and do pass through
|
||||
Rename the gst_type function from gst_gst_id3demux..
|
||||
|
||||
2005-12-20 Michael Smith <msmith@fluendo.com>
|
||||
|
||||
* gst/udp/gstmultiudpsink.c: (gst_multiudpsink_render),
|
||||
|
|
|
@ -78,6 +78,7 @@ EXTRA_HFILES = \
|
|||
$(top_srcdir)/gst/autodetect/gstautovideosink.h \
|
||||
$(top_srcdir)/gst/level/gstlevel.h \
|
||||
$(top_srcdir)/gst/goom/gstgoom.h \
|
||||
$(top_srcdir)/gst/id3demux/gstid3demux.h \
|
||||
$(top_srcdir)/ext/cairo/gsttimeoverlay.h \
|
||||
$(top_srcdir)/ext/flac/gstflacdec.h \
|
||||
$(top_srcdir)/gst/multipart/multipartmux.c \
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<xi:include href="xml/element-cairotimeoverlay.xml" />
|
||||
<xi:include href="xml/element-flacdec.xml" />
|
||||
<xi:include href="xml/element-goom.xml" />
|
||||
<xi:include href="xml/element-id3demux.xml" />
|
||||
<xi:include href="xml/element-level.xml" />
|
||||
<xi:include href="xml/element-multipartmux.xml" />
|
||||
<xi:include href="xml/element-multipartdemux.xml" />
|
||||
|
@ -45,6 +46,7 @@
|
|||
<xi:include href="xml/plugin-flxdec.xml" />
|
||||
<xi:include href="xml/plugin-gconfelements.xml" />
|
||||
<xi:include href="xml/plugin-goom.xml" />
|
||||
<xi:include href="xml/plugin-id3demux.xml" />
|
||||
<xi:include href="xml/plugin-jpeg.xml" />
|
||||
<xi:include href="xml/plugin-level.xml" />
|
||||
<xi:include href="xml/plugin-matroska.xml" />
|
||||
|
|
|
@ -38,6 +38,14 @@ GstGoom
|
|||
GstGoomClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>element-id3demux</FILE>
|
||||
GstID3Demux
|
||||
<TITLE>id3demux</TITLE>
|
||||
<SUBSECTION Standard>
|
||||
GstID3DemuxClass
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>element-level</FILE>
|
||||
GstLevel
|
||||
|
|
|
@ -1548,3 +1548,113 @@
|
|||
<DEFAULT>"ThisRandomString"</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::deltax</NAME>
|
||||
<TYPE>gint</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>X position modifier</NICK>
|
||||
<BLURB>Shift X position to the left or to the right. Unit is pixels.</BLURB>
|
||||
<DEFAULT>0</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::deltay</NAME>
|
||||
<TYPE>gint</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>Y position modifier</NICK>
|
||||
<BLURB>Shift Y position up or down. Unit is pixels.</BLURB>
|
||||
<DEFAULT>0</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::font-desc</NAME>
|
||||
<TYPE>gchararray</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>font description</NICK>
|
||||
<BLURB>Pango font description of font to be used for rendering. See documentation of pango_font_description_from_string for syntax.</BLURB>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::halign</NAME>
|
||||
<TYPE>gchararray</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>horizontal alignment</NICK>
|
||||
<BLURB>Horizontal alignment of the text. Can be either 'left', 'right', or 'center'.</BLURB>
|
||||
<DEFAULT>"center"</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::shaded-background</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>shaded background</NICK>
|
||||
<BLURB>Whether to shade the background under the text area.</BLURB>
|
||||
<DEFAULT>FALSE</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::text</NAME>
|
||||
<TYPE>gchararray</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>text</NICK>
|
||||
<BLURB>Text to be display.</BLURB>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::valign</NAME>
|
||||
<TYPE>gchararray</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>vertical alignment</NICK>
|
||||
<BLURB>Vertical alignment of the text. Can be either 'baseline', 'bottom', or 'top'.</BLURB>
|
||||
<DEFAULT>"baseline"</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::xpad</NAME>
|
||||
<TYPE>gint</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>horizontal paddding</NICK>
|
||||
<BLURB>Horizontal paddding when using left/right alignment.</BLURB>
|
||||
<DEFAULT>25</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstCairoTextOverlay::ypad</NAME>
|
||||
<TYPE>gint</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>w</FLAGS>
|
||||
<NICK>vertical padding</NICK>
|
||||
<BLURB>Vertical padding when using top/bottom alignment.</BLURB>
|
||||
<DEFAULT>25</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstOssMixerElement::device-name</NAME>
|
||||
<TYPE>gchararray</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>r</FLAGS>
|
||||
<NICK>Device name</NICK>
|
||||
<BLURB>Human-readable name of the sound device.</BLURB>
|
||||
<DEFAULT>""</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
<ARG>
|
||||
<NAME>GstID3Demux::prefer-v1</NAME>
|
||||
<TYPE>gboolean</TYPE>
|
||||
<RANGE></RANGE>
|
||||
<FLAGS>rwx</FLAGS>
|
||||
<NICK>Prefer version 1 tag</NICK>
|
||||
<BLURB>Prefer tags from ID3v1 tag at end of file.</BLURB>
|
||||
<DEFAULT>FALSE</DEFAULT>
|
||||
</ARG>
|
||||
|
||||
|
|
|
@ -18,6 +18,27 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:element-id3demux
|
||||
* @short_description: reads tag information from ID3v1 and ID3v2 (<= 2.4.0) data blocks and outputs them as GStreamer tag messages and events.
|
||||
*
|
||||
* <refsect2>
|
||||
* <para>
|
||||
* id3demux accepts data streams with either (or both) ID3v2 regions at the start, or ID3v1 at the end. The mime type of the data between the tag blocks is detected using typefind functions, and the appropriate output mime type set on outgoing buffers.
|
||||
* </para><para>
|
||||
* The element is only able to read ID3v1 tags from a seekable stream, because they are at the end of the stream. That is, when get_range mode is supported by the upstream elements. If get_range operation is available, id3demux makes it available downstream. This means that elements which require get_range mode, such as wavparse, can operate on files containing ID3 tag information.
|
||||
* </para>
|
||||
* <title>Example launch line</title>
|
||||
* <para>
|
||||
* <programlisting>
|
||||
* gst-launch filesrc location=file.mp3 ! id3demux ! fakesink -t
|
||||
* </programlisting>
|
||||
* This pipeline should read any available ID3 tag information and output it. The contents of the file inside the ID3 tag regions should be detected, and the appropriate mime type set on buffers produced from id3demux.
|
||||
* </para><para>
|
||||
* This id3demux element replaced an older element with the same name which relied on libid3tag from the MAD project.
|
||||
* </para>
|
||||
* </refsect2>
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -27,6 +48,12 @@
|
|||
#include "gstid3demux.h"
|
||||
#include "id3tags.h"
|
||||
|
||||
static GstElementDetails gst_id3demux_details =
|
||||
GST_ELEMENT_DETAILS ("ID3 tag demuxer",
|
||||
"Codec/Demuxer/Metadata",
|
||||
"Read and output ID3v1 and ID3v2 tags while demuxing the contents",
|
||||
"Jan Schmidt <thaytan@mad.scientist.com>");
|
||||
|
||||
enum
|
||||
{
|
||||
ARG_0,
|
||||
|
@ -93,7 +120,7 @@ static void gst_id3demux_send_tag_event (GstID3Demux * id3demux);
|
|||
static GstElementClass *parent_class = NULL;
|
||||
|
||||
GType
|
||||
gst_gst_id3demux_get_type (void)
|
||||
gst_id3demux_get_type (void)
|
||||
{
|
||||
static GType plugin_type = 0;
|
||||
|
||||
|
@ -118,19 +145,13 @@ gst_gst_id3demux_get_type (void)
|
|||
static void
|
||||
gst_id3demux_base_init (GstID3DemuxClass * klass)
|
||||
{
|
||||
static GstElementDetails plugin_details = {
|
||||
"GStreamer ID3 Demuxer",
|
||||
"Codec/Demuxer/Metadata",
|
||||
"ID3 tag reader and demuxer",
|
||||
"Jan Schmidt <thaytan@mad.scientist.com>"
|
||||
};
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&src_factory));
|
||||
gst_element_class_add_pad_template (element_class,
|
||||
gst_static_pad_template_get (&sink_factory));
|
||||
gst_element_class_set_details (element_class, &plugin_details);
|
||||
gst_element_class_set_details (element_class, &gst_id3demux_details);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -153,7 +174,8 @@ gst_id3demux_class_init (GstID3DemuxClass * klass)
|
|||
|
||||
g_object_class_install_property (gobject_class, ARG_PREFER_V1,
|
||||
g_param_spec_boolean ("prefer-v1", "Prefer version 1 tag",
|
||||
"Prefer tags from ID3v1 tag at end of file", FALSE,
|
||||
"Prefer tags from ID3v1 tag at end of file when both ID3v1 "
|
||||
"and ID3v2 tags are present", FALSE,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
}
|
||||
|
||||
|
@ -382,8 +404,6 @@ gst_id3demux_chain (GstPad * pad, GstBuffer * buf)
|
|||
if (GST_BUFFER_OFFSET (id3demux->collect) != 0) {
|
||||
GST_DEBUG_OBJECT (id3demux,
|
||||
"Received buffer from non-zero offset. Can't read tags");
|
||||
id3demux->state = GST_ID3DEMUX_TYPEFINDING;
|
||||
break;
|
||||
} else {
|
||||
ID3TagsResult tag_result;
|
||||
|
||||
|
@ -398,9 +418,9 @@ gst_id3demux_chain (GstPad * pad, GstBuffer * buf)
|
|||
GST_DEBUG_OBJECT (id3demux, "Found an ID3v2 tag of size %d\n",
|
||||
id3demux->strip_start);
|
||||
|
||||
id3demux->state = GST_ID3DEMUX_TYPEFINDING;
|
||||
id3demux->send_tag_event = TRUE;
|
||||
}
|
||||
id3demux->state = GST_ID3DEMUX_TYPEFINDING;
|
||||
|
||||
/* Fall-through */
|
||||
case GST_ID3DEMUX_TYPEFINDING:{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_ID3DEMUX \
|
||||
(gst_gst_id3demux_get_type())
|
||||
(gst_id3demux_get_type())
|
||||
#define GST_ID3DEMUX(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ID3DEMUX,GstID3Demux))
|
||||
#define GST_ID3DEMUX_CLASS(klass) \
|
||||
|
@ -72,7 +72,7 @@ struct _GstID3DemuxClass
|
|||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_gst_id3demux_get_type (void);
|
||||
GType gst_id3demux_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Reference in a new issue