Blame docs/libs/html/gst-plugins-base-libs-GstTagDemux.html

Packit 971217
Packit 971217
<html>
Packit 971217
<head>
Packit 971217
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit 971217
<title>GstTagDemux: GStreamer Base Plugins 1.0 Library Reference Manual</title>
Packit 971217
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
Packit 971217
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
Packit 971217
<link rel="up" href="gstreamer-tag.html" title="Tag Support Library">
Packit 971217
<link rel="prev" href="gst-plugins-base-libs-GstTagXmpWriter.html" title="GstTagXmpWriter">
Packit 971217
<link rel="next" href="gst-plugins-base-libs-GstTagMux.html" title="GstTagMux">
Packit 971217
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
Packit 971217
<link rel="stylesheet" href="style.css" type="text/css">
Packit 971217
</head>
Packit 971217
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit 971217
Packit 971217
Packit 971217
Top  | 
Packit 971217
                  Description
Packit 971217
Packit 971217
Home
Packit 971217
Up
Packit 971217
Prev
Packit 971217
Next
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

GstTagDemux

Packit 971217

GstTagDemux — Base class for demuxing tags that are in chunks

Packit 971217
                    directly at the beginning or at the end of a file

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Types and Values

Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
struct
Packit 971217
GstTagDemux
Packit 971217
Packit 971217
Packit 971217
struct
Packit 971217
GstTagDemuxClass
Packit 971217
Packit 971217
Packit 971217
enum
Packit 971217
GstTagDemuxResult
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Includes

Packit 971217
#include <gst/tag/gsttagdemux.h>
Packit 971217
Packit 971217
Packit 971217
Packit 971217

Description

Packit 971217

Provides a base class for demuxing tags at the beginning or end of a

Packit 971217
stream and handles things like typefinding, querying, seeking, and
Packit 971217
different modes of operation (chain-based, pull_range-based, and providing
Packit 971217
downstream elements with random access if upstream supports that). The tag
Packit 971217
is stripped from the output, and all offsets are adjusted for the tag
Packit 971217
sizes, so that to the downstream element the stream will appear as if
Packit 971217
there was no tag at all. Also, once the tag has been parsed, GstTagDemux
Packit 971217
will try to determine the media type of the resulting stream and add a
Packit 971217
source pad with the appropriate caps in order to facilitate auto-plugging.

Packit 971217
Packit 971217

Deriving from GstTagDemux

Packit 971217

Subclasses have to do four things:

Packit 971217
    Packit 971217
  • In their base init function, they must add a pad template for the sink

  • Packit 971217
    pad to the element class, describing the media type they can parse in
    Packit 971217
    the caps of the pad template.

    Packit 971217
  • In their class init function, they must override

  • Packit 971217
    GST_TAG_DEMUX_CLASS(demux_klass)->identify_tag with their own identify
    Packit 971217
    function.

    Packit 971217
  • In their class init function, they must override

  • Packit 971217
    GST_TAG_DEMUX_CLASS(demux_klass)->parse_tag with their own parse
    Packit 971217
    function.

    Packit 971217
  • In their class init function, they must also set

  • Packit 971217
    GST_TAG_DEMUX_CLASS(demux_klass)->min_start_size and/or
    Packit 971217
    GST_TAG_DEMUX_CLASS(demux_klass)->min_end_size to the minimum size required
    Packit 971217
    for the identify function to decide whether the stream has a supported tag
    Packit 971217
    or not. A class parsing ID3v1 tags, for example, would set min_end_size to
    Packit 971217
    128 bytes.

    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    Functions

    Packit 971217

    Packit 971217
    Packit 971217
    Packit 971217

    Types and Values

    Packit 971217
    Packit 971217

    struct GstTagDemux

    Packit 971217
    struct GstTagDemux {
    Packit 971217
      GstElement element;
    Packit 971217
    };
    Packit 971217
    Packit 971217

    Opaque GstTagDemux structure.

    Packit 971217
    Packit 971217

    Members

    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    GstElement element;

    Packit 971217

    parent element

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    Packit 971217
    Packit 971217

    struct GstTagDemuxClass

    Packit 971217
    struct GstTagDemuxClass {
    Packit 971217
      GstElementClass parent_class;
    Packit 971217
    Packit 971217
      /* minimum size required to identify a tag at the start and determine
    Packit 971217
       * its total size */
    Packit 971217
      guint                  min_start_size;
    Packit 971217
    Packit 971217
      /* minimum size required to identify a tag at the end and determine
    Packit 971217
       * its total size */
    Packit 971217
      guint                  min_end_size;
    Packit 971217
    Packit 971217
      /* vtable */
    Packit 971217
    Packit 971217
      /* identify tag and determine the size required to parse the tag */
    Packit 971217
      gboolean               (*identify_tag)  (GstTagDemux * demux,
    Packit 971217
                                               GstBuffer   * buffer,
    Packit 971217
                                               gboolean      start_tag,
    Packit 971217
                                               guint       * tag_size);
    Packit 971217
    Packit 971217
      /* parse the tag once it is identified and its size is known */
    Packit 971217
      GstTagDemuxResult      (*parse_tag)     (GstTagDemux * demux,
    Packit 971217
                                               GstBuffer   * buffer,
    Packit 971217
                                               gboolean      start_tag,
    Packit 971217
                                               guint       * tag_size,
    Packit 971217
                                               GstTagList ** tags);
    Packit 971217
    Packit 971217
      /* merge start and end tags (optional) */
    Packit 971217
      GstTagList *           (*merge_tags)    (GstTagDemux      * demux,
    Packit 971217
                                               const GstTagList * start_tags,
    Packit 971217
                                               const GstTagList * end_tags);
    Packit 971217
    };
    Packit 971217
    Packit 971217

    The GstTagDemuxClass structure. See documentation at beginning of section

    Packit 971217
    for details about what subclasses need to override and do.

    Packit 971217
    Packit 971217

    Members

    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    guint min_start_size;

    Packit 971217

    minimum size required to identify a tag at the start and

    Packit 971217
    determine its total size. Set to 0 if not interested in start tags.
    Packit 971217
    Subclasses should set this in their class_init function.

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    guint min_end_size;

    Packit 971217

    minimum size required to identify a tag at the end and

    Packit 971217
    determine its total size. Set to 0 if not interested in end tags.
    Packit 971217
    Subclasses should set this in their class_init function.

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    identify_tag ()

    Packit 971217

    identify tag and determine the size required to parse the

    Packit 971217
    tag. Buffer may be larger than the specified minimum size.
    Packit 971217
    Subclassed MUST override this vfunc in their class_init function.

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    parse_tag ()

    Packit 971217

    parse the tag. Buffer will be exactly of the size determined by

    Packit 971217
    the identify_tag vfunc before. The parse_tag vfunc may change the size
    Packit 971217
    stored in *tag_size and return GST_TAG_DEMUX_RESULT_AGAIN to request a
    Packit 971217
    larger or smaller buffer. It is also permitted to adjust the tag_size to a
    Packit 971217
    smaller value and then return GST_TAG_DEMUX_RESULT_OK in one go.
    Packit 971217
    Subclassed MUST override the parse_tag vfunc in their class_init function.

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    merge_tags ()

    Packit 971217

    merge start and end tags. Subclasses may want to override this

    Packit 971217
    vfunc to allow prioritising of start or end tag according to user
    Packit 971217
    preference.  Note that both start_tags and end_tags may be NULL. By default
    Packit 971217
    start tags are prefered over end tags.

    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    Packit 971217
    Packit 971217

    enum GstTagDemuxResult

    Packit 971217

    Result values from the parse_tag virtual function.

    Packit 971217
    Packit 971217

    Members

    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    GST_TAG_DEMUX_RESULT_BROKEN_TAG

    Packit 971217
    Packit 971217

    cannot parse tag, just skip it

    Packit 971217
    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    GST_TAG_DEMUX_RESULT_AGAIN

    Packit 971217
    Packit 971217

    call again with less or more data

    Packit 971217
    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217

    GST_TAG_DEMUX_RESULT_OK

    Packit 971217
    Packit 971217

    parsed tag successfully

    Packit 971217
    Packit 971217
     
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    See Also

    Packit 971217

    GstApeDemux, GstID3Demux

    Packit 971217
    Packit 971217
    Packit 971217
    Packit 971217

    Generated by GTK-Doc V1.27
    Packit 971217
    </body>
    Packit 971217
    </html>