GstTag.TagDemux

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstTag.TagDemux GstTag.TagDemux Gst.Element->GstTag.TagDemux Gst.Object->Gst.Element

Subclasses:

None

Methods

Inherited:

Gst.Element (81), Gst.Object (27), GObject.Object (37)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

Virtual Methods

Inherited:

Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_identify_tag (buffer, start_tag, tag_size)

do_merge_tags (start_tags, end_tags)

do_parse_tag (buffer, start_tag, tag_size, tags)

Properties

Inherited:

Gst.Object (2)

Signals

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

element

Gst.Element

r

parent element

reserved

[object]

r

Class Details

class GstTag.TagDemux(**kwargs)
Bases:

Gst.Element

Abstract:

Yes

Structure:

GstTag.TagDemuxClass

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

Deriving from GstTag.TagDemux

Subclasses have to do four things:

  • In their base init function, they must add a pad template for the sink pad to the element class, describing the media type they can parse in the caps of the pad template.

  • In their class init function, they must override GST_TAG_DEMUX_CLASS(demux_klass)->identify_tag with their own identify function.

  • In their class init function, they must override GST_TAG_DEMUX_CLASS(demux_klass)->parse_tag with their own parse function.

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

do_identify_tag(buffer, start_tag, tag_size) virtual
Parameters:
Return type:

bool

do_merge_tags(start_tags, end_tags) virtual
Parameters:
Return type:

Gst.TagList

do_parse_tag(buffer, start_tag, tag_size, tags) virtual
Parameters:
Return type:

GstTag.TagDemuxResult