gsttag

package
v0.0.0-...-ccbbe8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TAG_ACOUSTID_FINGERPRINT = "chromaprint-fingerprint"

TAG_ACOUSTID_FINGERPRINT: acoustID Fingerprint (Chromaprint).

View Source
const TAG_ACOUSTID_ID = "acoustid-id"

TAG_ACOUSTID_ID: acoustID Identifier.

View Source
const TAG_CAPTURING_CONTRAST = "capturing-contrast"

TAG_CAPTURING_CONTRAST: direction of contrast processing applied when capturing an image. (string)

The allowed values are: "normal" "soft" "hard".

View Source
const TAG_CAPTURING_DIGITAL_ZOOM_RATIO = "capturing-digital-zoom-ratio"

TAG_CAPTURING_DIGITAL_ZOOM_RATIO: digital zoom ratio used when capturing an image. (double).

View Source
const TAG_CAPTURING_EXPOSURE_COMPENSATION = "capturing-exposure-compensation"

TAG_CAPTURING_EXPOSURE_COMPENSATION: exposure compensation using when capturing an image in EV. (double).

View Source
const TAG_CAPTURING_EXPOSURE_MODE = "capturing-exposure-mode"

TAG_CAPTURING_EXPOSURE_MODE: exposure mode used when capturing an image. (string)

The allowed values are: "auto-exposure" "manual-exposure" "auto-bracket".

View Source
const TAG_CAPTURING_EXPOSURE_PROGRAM = "capturing-exposure-program"

TAG_CAPTURING_EXPOSURE_PROGRAM: type of exposure control used when capturing an image. (string)

The allowed values are: "undefined" "manual" "normal" - automatically controlled "aperture-priority" - user selects aperture value "shutter-priority" - user selects shutter speed "creative" - biased towards depth of field "action" - biased towards fast shutter speed "portrait" - closeup, leaving background out of focus "landscape" - landscape photos, background in focus.

View Source
const TAG_CAPTURING_FLASH_FIRED = "capturing-flash-fired"

TAG_CAPTURING_FLASH_FIRED: if flash was fired during the capture of an image. (boolean)

Note that if this tag isn't present, it should not be assumed that the flash did not fire. It should be treated as unknown.

View Source
const TAG_CAPTURING_FLASH_MODE = "capturing-flash-mode"

TAG_CAPTURING_FLASH_MODE: flash mode selected during the capture of an image. (string)

The allowed values are: "auto" "always" "never".

View Source
const TAG_CAPTURING_FOCAL_LENGTH = "capturing-focal-length"

TAG_CAPTURING_FOCAL_LENGTH: focal length used when capturing an image, in mm. (double).

View Source
const TAG_CAPTURING_FOCAL_LENGTH_35_MM = "capturing-focal-length-35mm"

TAG_CAPTURING_FOCAL_LENGTH_35_MM: 35 mm equivalent focal length used when capturing an image, in mm. (double).

View Source
const TAG_CAPTURING_FOCAL_RATIO = "capturing-focal-ratio"

TAG_CAPTURING_FOCAL_RATIO: focal ratio (f-number) used when capturing an image. (double)

The value stored is the denominator of the focal ratio (f-number). For example, if this tag value is 2, the focal ratio is f/2.

View Source
const TAG_CAPTURING_GAIN_ADJUSTMENT = "capturing-gain-adjustment"

TAG_CAPTURING_GAIN_ADJUSTMENT: gain adjustment applied to an image. (string)

The allowed values are: "none" "low-gain-up" "high-gain-up" "low-gain-down" "high-gain-down".

View Source
const TAG_CAPTURING_ISO_SPEED = "capturing-iso-speed"

TAG_CAPTURING_ISO_SPEED: ISO speed used when capturing an image. (integer).

View Source
const TAG_CAPTURING_METERING_MODE = "capturing-metering-mode"

TAG_CAPTURING_METERING_MODE defines the way a camera determines the exposure. (string)

The allowed values are: "unknown" "average" "center-weighted-average" "spot" "multi-spot" "pattern" "partial" "other".

View Source
const TAG_CAPTURING_SATURATION = "capturing-saturation"

TAG_CAPTURING_SATURATION: direction of saturation processing applied when capturing an image. (string)

The allowed values are: "normal" "low-saturation" "high-saturation".

View Source
const TAG_CAPTURING_SCENE_CAPTURE_TYPE = "capturing-scene-capture-type"

TAG_CAPTURING_SCENE_CAPTURE_TYPE: scene mode used when capturing an image. (string)

The allowed values are: "standard" "landscape" "portrait" "night-scene".

View Source
const TAG_CAPTURING_SHARPNESS = "capturing-sharpness"

TAG_CAPTURING_SHARPNESS: direction of sharpness processing applied when capturing an image. (string)

The allowed values are: "normal" "soft" "hard".

View Source
const TAG_CAPTURING_SHUTTER_SPEED = "capturing-shutter-speed"

TAG_CAPTURING_SHUTTER_SPEED: shutter speed used when capturing an image, in seconds. (fraction).

View Source
const TAG_CAPTURING_SOURCE = "capturing-source"

TAG_CAPTURING_SOURCE indicates the source of capture. The device/medium used to do the capture. (string)

Allowed values are: "dsc" (= digital still camera) "transparent-scanner" "reflex-scanner" "other".

View Source
const TAG_CAPTURING_WHITE_BALANCE = "capturing-white-balance"

TAG_CAPTURING_WHITE_BALANCE: white balance mode used when capturing an image. (string)

The allowed values are: "auto" "manual" "daylight" "cloudy" "tungsten" "fluorescent" "fluorescent h" (newer daylight-calibrated fluorescents) "flash".

View Source
const TAG_CDDA_CDDB_DISCID = "discid"

TAG_CDDA_CDDB_DISCID: CDDB disc id in its short form (e.g. 'aa063d0f').

View Source
const TAG_CDDA_CDDB_DISCID_FULL = "discid-full"

TAG_CDDA_CDDB_DISCID_FULL: CDDB disc id including all details.

View Source
const TAG_CDDA_MUSICBRAINZ_DISCID = "musicbrainz-discid"

TAG_CDDA_MUSICBRAINZ_DISCID: musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-').

View Source
const TAG_CDDA_MUSICBRAINZ_DISCID_FULL = "musicbrainz-discid-full"

TAG_CDDA_MUSICBRAINZ_DISCID_FULL: musicbrainz disc id details.

View Source
const TAG_CMML_CLIP = "cmml-clip"

TAG_CMML_CLIP: annodex CMML clip element tag.

View Source
const TAG_CMML_HEAD = "cmml-head"

TAG_CMML_HEAD: annodex CMML head element tag.

View Source
const TAG_CMML_STREAM = "cmml-stream"

TAG_CMML_STREAM: annodex CMML stream element tag.

View Source
const TAG_ID3V2_HEADER_SIZE = 10

TAG_ID3V2_HEADER_SIZE: ID3V2 header size considered minimum input for some functions such as gst_tag_list_from_id3v2_tag() and gst_tag_get_id3v2_tag_size() for example.

View Source
const TAG_IMAGE_HORIZONTAL_PPI = "image-horizontal-ppi"

TAG_IMAGE_HORIZONTAL_PPI: media (image/video) intended horizontal pixel density in ppi. (double).

View Source
const TAG_IMAGE_VERTICAL_PPI = "image-vertical-ppi"

TAG_IMAGE_VERTICAL_PPI: media (image/video) intended vertical pixel density in ppi. (double).

View Source
const TAG_MUSICAL_KEY = "musical-key"

TAG_MUSICAL_KEY: musical key in which the sound starts. It is represented as a string with a maximum length of three characters. The ground keys are represented with "A","B","C","D","E", "F" and "G" and halfkeys represented with "b" and "#". Minor is represented as "m" (e.g. "Dbm"). Off key is represented with an "o" only. This notation might be extended in the future to support non-minor/major keys.

View Source
const TAG_MUSICBRAINZ_ALBUMARTISTID = "musicbrainz-albumartistid"

TAG_MUSICBRAINZ_ALBUMARTISTID: musicBrainz album artist ID.

View Source
const TAG_MUSICBRAINZ_ALBUMID = "musicbrainz-albumid"

TAG_MUSICBRAINZ_ALBUMID: musicBrainz album ID.

View Source
const TAG_MUSICBRAINZ_ARTISTID = "musicbrainz-artistid"

TAG_MUSICBRAINZ_ARTISTID: musicBrainz artist ID.

View Source
const TAG_MUSICBRAINZ_RELEASEGROUPID = "musicbrainz-releasegroupid"

TAG_MUSICBRAINZ_RELEASEGROUPID: musicBrainz Release Group ID.

View Source
const TAG_MUSICBRAINZ_RELEASETRACKID = "musicbrainz-releasetrackid"

TAG_MUSICBRAINZ_RELEASETRACKID: musicBrainz Release Track ID.

View Source
const TAG_MUSICBRAINZ_TRACKID = "musicbrainz-trackid"

TAG_MUSICBRAINZ_TRACKID: musicBrainz track ID.

View Source
const TAG_MUSICBRAINZ_TRMID = "musicbrainz-trmid"

TAG_MUSICBRAINZ_TRMID: musicBrainz track TRM ID.

Variables

View Source
var (
	GTypeTagDemuxResult = coreglib.Type(C.gst_tag_demux_result_get_type())
	GTypeTagDemux       = coreglib.Type(C.gst_tag_demux_get_type())
)

GType values.

View Source
var (
	GTypeTagImageType    = coreglib.Type(C.gst_tag_image_type_get_type())
	GTypeTagLicenseFlags = coreglib.Type(C.gst_tag_license_flags_get_type())
)

GType values.

View Source
var (
	GTypeTagMux = coreglib.Type(C.gst_tag_mux_get_type())
)

GType values.

View Source
var (
	GTypeTagXmpWriter = coreglib.Type(C.gst_tag_xmp_writer_get_type())
)

GType values.

Functions

func TagCheckLanguageCode

func TagCheckLanguageCode(langCode string) bool

TagCheckLanguageCode: check if a given string contains a known ISO 639 language code.

This is useful in situations where it's not clear whether a given string is a language code (which should be put into a T_TAG_LANGUAGE_CODE tag) or a free-form language name descriptor (which should be put into a T_TAG_LANGUAGE_NAME tag instead).

The function takes the following parameters:

  • langCode: ISO-639 language code (e.g. "deu" or "ger" or "de").

The function returns the following values:

  • ok: TRUE if the two- or three-letter language code in lang_code is a valid ISO-639 language code.

func TagFreeformStringToUTF8

func TagFreeformStringToUTF8(data string, envVars []string) string

TagFreeformStringToUTF8: convenience function to read a string with unknown character encoding. If the string is already in UTF-8 encoding, it will be returned right away. If not it tries to detect byte-order-mark for UTF-16/32 cases and use that. Otherwise, the environment will be searched for a number of environment variables (whose names are specified in the NULL-terminated string array env_vars) containing a list of character encodings to try/use. If none are specified, the current locale will be tried. If that also doesn't work, WINDOWS-1252/ISO-8859-1 is assumed (which will almost always succeed).

The function takes the following parameters:

  • data: string data.
  • envVars: a NULL-terminated string array of environment variable names, or NULL.

The function returns the following values:

  • utf8: newly-allocated string in UTF-8 encoding, or NULL.

func TagFromID3Tag

func TagFromID3Tag(id3Tag string) string

TagFromID3Tag looks up the GStreamer tag for a ID3v2 tag.

The function takes the following parameters:

  • id3Tag: ID3v2 tag to convert to GStreamer tag.

The function returns the following values:

  • utf8: corresponding GStreamer tag or NULL if none exists.

func TagFromID3UserTag

func TagFromID3UserTag(typ, id3UserTag string) string

TagFromID3UserTag looks up the GStreamer tag for an ID3v2 user tag (e.g. description in TXXX frame or owner in UFID frame).

The function takes the following parameters:

  • typ: type of ID3v2 user tag (e.g. "TXXX" or "UDIF").
  • id3UserTag: ID3v2 user tag to convert to GStreamer tag.

The function returns the following values:

  • utf8: corresponding GStreamer tag or NULL if none exists.

func TagFromVorbisTag

func TagFromVorbisTag(vorbisTag string) string

TagFromVorbisTag looks up the GStreamer tag for a vorbiscomment tag.

The function takes the following parameters:

  • vorbisTag: vorbiscomment tag to convert to GStreamer tag.

The function returns the following values:

  • utf8: corresponding GStreamer tag or NULL if none exists.

func TagGetID3V2TagSize

func TagGetID3V2TagSize(buffer *gst.Buffer) uint

TagGetID3V2TagSize determines size of an ID3v2 tag on buffer containing at least ID3v2 header, i.e. at least T_TAG_ID3V2_HEADER_SIZE (10) bytes;.

The function takes the following parameters:

  • buffer holding ID3v2 tag (or at least the start of one).

The function returns the following values:

  • guint: size of tag, or 0 if header is invalid or too small.

func TagGetLanguageCodeISO6391

func TagGetLanguageCodeISO6391(langCode string) string

TagGetLanguageCodeISO6391 returns two-letter ISO-639-1 language code given a three-letter ISO-639-2 language code or two-letter ISO-639-1 language code (both are accepted for convenience).

Language codes are case-sensitive and expected to be lower case.

The function takes the following parameters:

  • langCode: ISO-639 language code (e.g. "deu" or "ger" or "de").

The function returns the following values:

  • utf8: two-letter ISO-639-1 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.

func TagGetLanguageCodeISO6392B

func TagGetLanguageCodeISO6392B(langCode string) string

TagGetLanguageCodeISO6392B returns three-letter ISO-639-2 "bibliographic" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "bibliographic" code is derived from the English name of the language (e.g. "ger" for German instead of "de" or "deu"). In most scenarios, the "terminological" codes are preferred.

Language codes are case-sensitive and expected to be lower case.

The function takes the following parameters:

  • langCode: ISO-639 language code (e.g. "deu" or "ger" or "de").

The function returns the following values:

  • utf8: three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.

func TagGetLanguageCodeISO6392T

func TagGetLanguageCodeISO6392T(langCode string) string

TagGetLanguageCodeISO6392T returns three-letter ISO-639-2 "terminological" language code given a two-letter ISO-639-1 language code or a three-letter ISO-639-2 language code (both are accepted for convenience).

The "terminological" code is derived from the local name of the language (e.g. "deu" for German instead of "ger"). In most scenarios, the "terminological" codes are preferred over the "bibliographic" ones.

Language codes are case-sensitive and expected to be lower case.

The function takes the following parameters:

  • langCode: ISO-639 language code (e.g. "deu" or "ger" or "de").

The function returns the following values:

  • utf8: three-letter ISO-639-2 language code string that maps to lang_code, or NULL if no mapping is known. The returned string must not be modified or freed.

func TagGetLanguageCodes

func TagGetLanguageCodes() []string

TagGetLanguageCodes returns a list of known language codes (in form of two-letter ISO-639-1 codes). This is useful for UIs to build a list of available languages for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor).

The function returns the following values:

  • utf8s: NULL-terminated string array with two-letter language codes. Free with g_strfreev() when no longer needed.

func TagGetLanguageName

func TagGetLanguageName(languageCode string) string

TagGetLanguageName returns the name of the language given an ISO-639 language code as found in a GST_TAG_LANGUAGE_CODE tag. The name will be translated according to the current locale (if the library was built against the iso-codes package, otherwise the English name will be returned).

Language codes are case-sensitive and expected to be lower case.

The function takes the following parameters:

  • languageCode: two or three-letter ISO-639 language code.

The function returns the following values:

  • utf8: language name in UTF-8 format, or NULL if language_code could not be mapped to a language name. The returned string must not be modified and does not need to freed; it will stay valid until the application is terminated.

func TagGetLicenseDescription

func TagGetLicenseDescription(licenseRef string) string

TagGetLicenseDescription: get the description of a license, which is a translated description of the license's main features.

The function takes the following parameters:

The function returns the following values:

  • utf8: description of the license, or NULL if the license is unknown or a description is not available.

func TagGetLicenseJurisdiction

func TagGetLicenseJurisdiction(licenseRef string) string

TagGetLicenseJurisdiction: get the jurisdiction code of a license. This is usually a two-letter ISO 3166-1 alpha-2 code, but there is also the special case of Scotland, for which no code exists and which is thus represented as "scotland".

Known jurisdictions: ar, at, au, be, bg, br, ca, ch, cl, cn, co, de, dk, es, fi, fr, hr, hu, il, in, it, jp, kr, mk, mt, mx, my, nl, pe, pl, pt, scotland, se, si, tw, uk, us, za.

The function takes the following parameters:

The function returns the following values:

  • utf8: jurisdiction code of the license, or NULL if the license is unknown or is not specific to a particular jurisdiction.

func TagGetLicenseNick

func TagGetLicenseNick(licenseRef string) string

TagGetLicenseNick: get the nick name of a license, which is a short (untranslated) string such as e.g. "CC BY-NC-ND 2.0 UK".

The function takes the following parameters:

The function returns the following values:

  • utf8: nick name of the license, or NULL if the license is unknown.

func TagGetLicenseTitle

func TagGetLicenseTitle(licenseRef string) string

TagGetLicenseTitle: get the title of a license, which is a short translated description of the license's features (generally not very pretty though).

The function takes the following parameters:

The function returns the following values:

  • utf8: title of the license, or NULL if the license is unknown or no title is available.

func TagGetLicenseVersion

func TagGetLicenseVersion(licenseRef string) string

TagGetLicenseVersion: get the version of a license.

The function takes the following parameters:

The function returns the following values:

  • utf8: version of the license, or NULL if the license is not known or has no version.

func TagGetLicenses

func TagGetLicenses() []string

TagGetLicenses returns a list of known license references (in form of URIs). This is useful for UIs to build a list of available licenses for tagging purposes (e.g. to tag an audio track appropriately in a video or audio editor, or an image in a camera application).

The function returns the following values:

  • utf8s: NULL-terminated array of license strings. Free with g_strfreev() when no longer needed.

func TagID3GenreCount

func TagID3GenreCount() uint

TagID3GenreCount gets the number of ID3v1 genres that can be identified. Winamp genres are included.

The function returns the following values:

  • guint: number of ID3v1 genres that can be identified.

func TagID3GenreGet

func TagID3GenreGet(id uint) string

TagID3GenreGet gets the ID3v1 genre name for a given ID.

The function takes the following parameters:

  • id: ID of genre to query.

The function returns the following values:

  • utf8: genre or NULL if no genre is associated with that ID.

func TagImageDataToImageSample

func TagImageDataToImageSample(imageData []byte, imageType TagImageType) *gst.Sample

TagImageDataToImageSample: helper function for tag-reading plugins to create a Sample suitable to add to a TagList as an image tag (such as T_TAG_IMAGE or T_TAG_PREVIEW_IMAGE) from the encoded image data and an (optional) image type.

Background: cover art and other images in tags are usually stored as a blob of binary image data, often accompanied by a MIME type or some other content type string (e.g. 'png', 'jpeg', 'jpg'). Sometimes there is also an 'image type' to indicate what kind of image this is (e.g. front cover, back cover, artist, etc.). The image data may also be an URI to the image rather than the image itself.

In GStreamer, image tags are Sample<!-- -->s containing the raw image data, with the sample caps describing the content type of the image (e.g. image/jpeg, image/png, text/uri-list). The sample info may contain an additional 'image-type' field of TagImageType to describe the type of image (front cover, back cover etc.). T_TAG_PREVIEW_IMAGE tags should not carry an image type, their type is already indicated via the special tag name.

This function will do various checks and typefind the encoded image data (we can't trust the declared mime type).

The function takes the following parameters:

  • imageData: (encoded) image.
  • imageType: type of the image, or T_TAG_IMAGE_TYPE_UNDEFINED. Pass T_TAG_IMAGE_TYPE_NONE if no image type should be set at all (e.g. for preview images).

The function returns the following values:

  • sample: newly-allocated image sample for use in tag lists, or NULL.

func TagParseExtendedComment

func TagParseExtendedComment(extComment string, failIfNoKey bool) (key, lang, value string, ok bool)

TagParseExtendedComment: convenience function to parse a GST_TAG_EXTENDED_COMMENT string and separate it into its components.

If successful, key, lang and/or value will be set to newly allocated strings that you need to free with g_free() when done. key and lang may also be set to NULL by this function if there is no key or no language code in the extended comment string.

The function takes the following parameters:

  • extComment: extended comment string, see T_TAG_EXTENDED_COMMENT.
  • failIfNoKey: whether to fail if strings are not in key=value form.

The function returns the following values:

  • key (optional): return location for the comment description key, or NULL.
  • lang (optional): return location for the comment ISO-639 language code, or NULL.
  • value: return location for the actual comment string, or NULL.
  • ok: TRUE if the string could be parsed, otherwise FALSE.

func TagRegisterMusicbrainzTags

func TagRegisterMusicbrainzTags()

TagRegisterMusicbrainzTags registers additional musicbrainz-specific tags with the GStreamer tag system. Plugins and applications that use these tags should call this function before using them. Can be called multiple times.

func TagToID3Tag

func TagToID3Tag(gstTag string) string

TagToID3Tag looks up the ID3v2 tag for a GStreamer tag.

The function takes the following parameters:

  • gstTag: GStreamer tag to convert to vorbiscomment tag.

The function returns the following values:

  • utf8: corresponding ID3v2 tag or NULL if none exists.

func TagToVorbisTag

func TagToVorbisTag(gstTag string) string

TagToVorbisTag looks up the vorbiscomment tag for a GStreamer tag.

The function takes the following parameters:

  • gstTag: GStreamer tag to convert to vorbiscomment tag.

The function returns the following values:

  • utf8: corresponding vorbiscomment tag or NULL if none exists.

func TagXmpListSchemas

func TagXmpListSchemas() []string

TagXmpListSchemas gets the list of supported schemas in the xmp lib.

The function returns the following values:

  • utf8s: NULL terminated array of strings with the schema names.

Types

type TagDemux

type TagDemux struct {
	gst.Element
	// contains filtered or unexported fields
}

TagDemux 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, GstTagDemux 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 GstTagDemux

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.

func BaseTagDemux

func BaseTagDemux(obj TagDemuxer) *TagDemux

BaseTagDemux returns the underlying base object.

type TagDemuxClass

type TagDemuxClass struct {
	// contains filtered or unexported fields
}

TagDemuxClass structure. See documentation at beginning of section for details about what subclasses need to override and do.

An instance of this type is always passed by reference.

func (*TagDemuxClass) MinEndSize

func (t *TagDemuxClass) MinEndSize() uint

MinEndSize: minimum size required to identify a tag at the end and determine its total size. Set to 0 if not interested in end tags. Subclasses should set this in their class_init function.

func (*TagDemuxClass) MinStartSize

func (t *TagDemuxClass) MinStartSize() uint

MinStartSize: minimum size required to identify a tag at the start and determine its total size. Set to 0 if not interested in start tags. Subclasses should set this in their class_init function.

func (*TagDemuxClass) ParentClass

func (t *TagDemuxClass) ParentClass() *gst.ElementClass

ParentClass: parent class.

type TagDemuxOverrides

type TagDemuxOverrides struct {
	// The function takes the following parameters:
	//
	//    - buffer
	//    - startTag
	//    - tagSize
	//
	// The function returns the following values:
	//
	IdentifyTag func(buffer *gst.Buffer, startTag bool, tagSize *uint) bool
}

TagDemuxOverrides contains methods that are overridable.

type TagDemuxResult

type TagDemuxResult C.gint

TagDemuxResult: result values from the parse_tag virtual function.

const (
	// TagDemuxResultBrokenTag: cannot parse tag, just skip it.
	TagDemuxResultBrokenTag TagDemuxResult = iota
	// TagDemuxResultAgain: call again with less or more data.
	TagDemuxResultAgain
	// TagDemuxResultOK: parsed tag successfully.
	TagDemuxResultOK
)

func (TagDemuxResult) String

func (t TagDemuxResult) String() string

String returns the name in string for TagDemuxResult.

type TagDemuxer

type TagDemuxer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

TagDemuxer describes types inherited from class TagDemux.

To get the original type, the caller must assert this to an interface or another type.

type TagImageType

type TagImageType C.gint

TagImageType: type of image contained in an image tag (specified as "image-type" field in the info structure in the image's Sample).

const (
	// TagImageTypeNone: no image type. Can be used to tell functions such as
	// gst_tag_image_data_to_image_sample() that no image type should be set.
	TagImageTypeNone TagImageType = -1
	// TagImageTypeUndefined: undefined/other image type.
	TagImageTypeUndefined TagImageType = 0
	// TagImageTypeFrontCover: cover (front).
	TagImageTypeFrontCover TagImageType = 1
	// TagImageTypeBackCover: cover (back).
	TagImageTypeBackCover TagImageType = 2
	// TagImageTypeLeafletPage: leaflet page.
	TagImageTypeLeafletPage TagImageType = 3
	// TagImageTypeMedium: medium (e.g. label side of CD).
	TagImageTypeMedium TagImageType = 4
	// TagImageTypeLeadArtist: lead artist/lead performer/soloist.
	TagImageTypeLeadArtist TagImageType = 5
	// TagImageTypeArtist: artist/performer.
	TagImageTypeArtist TagImageType = 6
	// TagImageTypeConductor: conductor.
	TagImageTypeConductor TagImageType = 7
	// TagImageTypeBandOrchestra: band/orchestra.
	TagImageTypeBandOrchestra TagImageType = 8
	// TagImageTypeComposer: composer.
	TagImageTypeComposer TagImageType = 9
	// TagImageTypeLyricist: lyricist/text writer.
	TagImageTypeLyricist TagImageType = 10
	// TagImageTypeRecordingLocation: recording location.
	TagImageTypeRecordingLocation TagImageType = 11
	// TagImageTypeDuringRecording: during recording.
	TagImageTypeDuringRecording TagImageType = 12
	// TagImageTypeDuringPerformance: during performance.
	TagImageTypeDuringPerformance TagImageType = 13
	// TagImageTypeVideoCapture: movie/video screen capture.
	TagImageTypeVideoCapture TagImageType = 14
	// TagImageTypeFish: fish as funny as the ID3v2 spec.
	TagImageTypeFish TagImageType = 15
	// TagImageTypeIllustration: illustration.
	TagImageTypeIllustration TagImageType = 16
	TagImageTypeBandArtistLogo TagImageType = 17
	TagImageTypePublisherStudioLogo TagImageType = 18
)

func (TagImageType) String

func (t TagImageType) String() string

String returns the name in string for TagImageType.

type TagLicenseFlags

type TagLicenseFlags C.guint

TagLicenseFlags: see http://creativecommons.org/ns for more information.

const (
	// TagLicensePermitsReproduction: making multiple copies is allowed.
	TagLicensePermitsReproduction TagLicenseFlags = 0b1
	// TagLicensePermitsDistribution: distribution, public display and public
	// performance are allowed.
	TagLicensePermitsDistribution TagLicenseFlags = 0b10
	// TagLicensePermitsDerivativeWorks: distribution of derivative works is
	// allowed.
	TagLicensePermitsDerivativeWorks TagLicenseFlags = 0b100
	// TagLicensePermitsSharing: commercial derivatives are allowed, but only
	// non-commercial distribution is allowed.
	TagLicensePermitsSharing TagLicenseFlags = 0b1000
	// TagLicenseRequiresNotice: copyright and license notices must be kept
	// intact.
	TagLicenseRequiresNotice TagLicenseFlags = 0b100000000
	// TagLicenseRequiresAttribution: credit must be given to copyright holder
	// and/or author.
	TagLicenseRequiresAttribution TagLicenseFlags = 0b1000000000
	// TagLicenseRequiresShareAlike: derivative works must be licensed under the
	// same terms or compatible terms as the original work.
	TagLicenseRequiresShareAlike TagLicenseFlags = 0b10000000000
	// TagLicenseRequiresSourceCode: source code (the preferred form for making
	// modifications) must be provided when exercising some rights granted by
	// the license.
	TagLicenseRequiresSourceCode TagLicenseFlags = 0b100000000000
	// TagLicenseRequiresCopyleft: derivative and combined works must be
	// licensed under specified terms, similar to those of the original work.
	TagLicenseRequiresCopyleft TagLicenseFlags = 0b1000000000000
	// TagLicenseRequiresLesserCopyleft: derivative works must be licensed under
	// specified terms, with at least the same conditions as the original work;
	// combinations with the work may be licensed under different terms.
	TagLicenseRequiresLesserCopyleft TagLicenseFlags = 0b10000000000000
	// TagLicenseProhibitsCommercialUse: exercising rights for commercial
	// purposes is prohibited.
	TagLicenseProhibitsCommercialUse TagLicenseFlags = 0b10000000000000000
	// TagLicenseProhibitsHighIncomeNationUse: use in a non-developing country
	// is prohibited.
	TagLicenseProhibitsHighIncomeNationUse TagLicenseFlags = 0b100000000000000000
	// TagLicenseCreativeCommonsLicense: license was created by the Creative
	// Commons project.
	TagLicenseCreativeCommonsLicense TagLicenseFlags = 0b1000000000000000000000000
	// TagLicenseFreeSoftwareFoundationLicense: license was created by the Free
	// Software Foundation (FSF).
	TagLicenseFreeSoftwareFoundationLicense TagLicenseFlags = 0b10000000000000000000000000
)

func TagGetLicenseFlags

func TagGetLicenseFlags(licenseRef string) TagLicenseFlags

TagGetLicenseFlags: get the flags of a license, which describe most of the features of a license in their most general form.

The function takes the following parameters:

The function returns the following values:

  • tagLicenseFlags flags of the license, or 0 if the license is unknown.

func (TagLicenseFlags) Has

func (t TagLicenseFlags) Has(other TagLicenseFlags) bool

Has returns true if t contains other.

func (TagLicenseFlags) String

func (t TagLicenseFlags) String() string

String returns the names in string for TagLicenseFlags.

type TagMux

type TagMux struct {
	gst.Element

	gst.TagSetter
	// contains filtered or unexported fields
}

TagMux provides a base class for adding tags at the beginning or end of a stream.

Deriving from GstTagMux

Subclasses have to do the following things:

  • In their base init function, they must add pad templates for the sink pad and the source pad to the element class, describing the media type they accept and output in the caps of the pad template.
  • In their class init function, they must override the GST_TAG_MUX_CLASS(mux_klass)->render_start_tag and/or GST_TAG_MUX_CLASS(mux_klass)->render_end_tag vfuncs and set up a render function.

func BaseTagMux

func BaseTagMux(obj TagMuxer) *TagMux

BaseTagMux returns the underlying base object.

type TagMuxClass

type TagMuxClass struct {
	// contains filtered or unexported fields
}

TagMuxClass structure. Subclasses need to override at least one of the two render vfuncs.

An instance of this type is always passed by reference.

func (*TagMuxClass) ParentClass

func (t *TagMuxClass) ParentClass() *gst.ElementClass

ParentClass: parent class.

type TagMuxOverrides

type TagMuxOverrides struct {
}

TagMuxOverrides contains methods that are overridable.

type TagMuxer

type TagMuxer interface {
	coreglib.Objector
	// contains filtered or unexported methods
}

TagMuxer describes types inherited from class TagMux.

To get the original type, the caller must assert this to an interface or another type.

type TagXmpWriter

type TagXmpWriter struct {
	gst.Element
	// contains filtered or unexported fields
}

TagXmpWriter: this interface is implemented by elements that are able to do XMP serialization. Examples for such elements are #jifmux and #qtmux.

Applications can use this interface to configure which XMP schemas should be used when serializing tags into XMP. Schemas are represented by their names, a full list of the supported schemas can be obtained from gst_tag_xmp_list_schemas(). By default, all schemas are used.

TagXmpWriter wraps an interface. This means the user can get the underlying type by calling Cast().

func (*TagXmpWriter) AddAllSchemas

func (config *TagXmpWriter) AddAllSchemas()

AddAllSchemas adds all available XMP schemas to the configuration. Meaning that all will be used.

func (*TagXmpWriter) AddSchema

func (config *TagXmpWriter) AddSchema(schema string)

AddSchema adds schema to the list schemas.

The function takes the following parameters:

  • schema to be added.

func (*TagXmpWriter) HasSchema

func (config *TagXmpWriter) HasSchema(schema string) bool

HasSchema checks if schema is going to be used.

The function takes the following parameters:

  • schema to test.

The function returns the following values:

  • ok: TRUE if it is going to be used.

func (*TagXmpWriter) RemoveAllSchemas

func (config *TagXmpWriter) RemoveAllSchemas()

RemoveAllSchemas removes all schemas from the list of schemas to use. Meaning that no XMP will be generated.

func (*TagXmpWriter) RemoveSchema

func (config *TagXmpWriter) RemoveSchema(schema string)

RemoveSchema removes a schema from the list of schemas to use. Nothing is done if the schema wasn't in the list.

The function takes the following parameters:

  • schema to remove.

type TagXmpWriterInterface

type TagXmpWriterInterface struct {
	// contains filtered or unexported fields
}

TagXmpWriterInterface: instance of this type is always passed by reference.

type TagXmpWriterOverrider

type TagXmpWriterOverrider interface {
}

TagXmpWriterOverrider contains methods that are overridable.

type TagXmpWriterer

type TagXmpWriterer interface {
	coreglib.Objector

	// AddAllSchemas adds all available XMP schemas to the configuration.
	AddAllSchemas()
	// AddSchema adds schema to the list schemas.
	AddSchema(schema string)
	// HasSchema checks if schema is going to be used.
	HasSchema(schema string) bool
	// RemoveAllSchemas removes all schemas from the list of schemas to use.
	RemoveAllSchemas()
	// RemoveSchema removes a schema from the list of schemas to use.
	RemoveSchema(schema string)
}

TagXmpWriterer describes TagXmpWriter's interface methods.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL