Documentation ¶
Index ¶
- Constants
- Variables
- func TagCheckLanguageCode(langCode string) bool
- func TagFreeformStringToUTF8(data string, envVars []string) string
- func TagFromID3Tag(id3Tag string) string
- func TagFromID3UserTag(typ, id3UserTag string) string
- func TagFromVorbisTag(vorbisTag string) string
- func TagGetID3V2TagSize(buffer *gst.Buffer) uint
- func TagGetLanguageCodeISO6391(langCode string) string
- func TagGetLanguageCodeISO6392B(langCode string) string
- func TagGetLanguageCodeISO6392T(langCode string) string
- func TagGetLanguageCodes() []string
- func TagGetLanguageName(languageCode string) string
- func TagGetLicenseDescription(licenseRef string) string
- func TagGetLicenseJurisdiction(licenseRef string) string
- func TagGetLicenseNick(licenseRef string) string
- func TagGetLicenseTitle(licenseRef string) string
- func TagGetLicenseVersion(licenseRef string) string
- func TagGetLicenses() []string
- func TagID3GenreCount() uint
- func TagID3GenreGet(id uint) string
- func TagImageDataToImageSample(imageData []byte, imageType TagImageType) *gst.Sample
- func TagParseExtendedComment(extComment string, failIfNoKey bool) (key, lang, value string, ok bool)
- func TagRegisterMusicbrainzTags()
- func TagToID3Tag(gstTag string) string
- func TagToVorbisTag(gstTag string) string
- func TagXmpListSchemas() []string
- type TagDemux
- type TagDemuxClass
- type TagDemuxOverrides
- type TagDemuxResult
- type TagDemuxer
- type TagImageType
- type TagLicenseFlags
- type TagMux
- type TagMuxClass
- type TagMuxOverrides
- type TagMuxer
- type TagXmpWriter
- type TagXmpWriterInterface
- type TagXmpWriterOverrider
- type TagXmpWriterer
Constants ¶
const TAG_ACOUSTID_FINGERPRINT = "chromaprint-fingerprint"
TAG_ACOUSTID_FINGERPRINT: acoustID Fingerprint (Chromaprint).
const TAG_ACOUSTID_ID = "acoustid-id"
TAG_ACOUSTID_ID: acoustID Identifier.
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".
const TAG_CAPTURING_DIGITAL_ZOOM_RATIO = "capturing-digital-zoom-ratio"
TAG_CAPTURING_DIGITAL_ZOOM_RATIO: digital zoom ratio used when capturing an image. (double).
const TAG_CAPTURING_EXPOSURE_COMPENSATION = "capturing-exposure-compensation"
TAG_CAPTURING_EXPOSURE_COMPENSATION: exposure compensation using when capturing an image in EV. (double).
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".
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.
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.
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".
const TAG_CAPTURING_FOCAL_LENGTH = "capturing-focal-length"
TAG_CAPTURING_FOCAL_LENGTH: focal length used when capturing an image, in mm. (double).
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).
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.
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".
const TAG_CAPTURING_ISO_SPEED = "capturing-iso-speed"
TAG_CAPTURING_ISO_SPEED: ISO speed used when capturing an image. (integer).
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".
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".
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".
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".
const TAG_CAPTURING_SHUTTER_SPEED = "capturing-shutter-speed"
TAG_CAPTURING_SHUTTER_SPEED: shutter speed used when capturing an image, in seconds. (fraction).
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".
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".
const TAG_CDDA_CDDB_DISCID = "discid"
TAG_CDDA_CDDB_DISCID: CDDB disc id in its short form (e.g. 'aa063d0f').
const TAG_CDDA_CDDB_DISCID_FULL = "discid-full"
TAG_CDDA_CDDB_DISCID_FULL: CDDB disc id including all details.
const TAG_CDDA_MUSICBRAINZ_DISCID = "musicbrainz-discid"
TAG_CDDA_MUSICBRAINZ_DISCID: musicbrainz disc id (e.g. 'ahg7JUcfR3vCYBphSDIogOOWrr0-').
const TAG_CDDA_MUSICBRAINZ_DISCID_FULL = "musicbrainz-discid-full"
TAG_CDDA_MUSICBRAINZ_DISCID_FULL: musicbrainz disc id details.
const TAG_CMML_CLIP = "cmml-clip"
TAG_CMML_CLIP: annodex CMML clip element tag.
const TAG_CMML_HEAD = "cmml-head"
TAG_CMML_HEAD: annodex CMML head element tag.
const TAG_CMML_STREAM = "cmml-stream"
TAG_CMML_STREAM: annodex CMML stream element tag.
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.
const TAG_IMAGE_HORIZONTAL_PPI = "image-horizontal-ppi"
TAG_IMAGE_HORIZONTAL_PPI: media (image/video) intended horizontal pixel density in ppi. (double).
const TAG_IMAGE_VERTICAL_PPI = "image-vertical-ppi"
TAG_IMAGE_VERTICAL_PPI: media (image/video) intended vertical pixel density in ppi. (double).
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.
const TAG_MUSICBRAINZ_ALBUMARTISTID = "musicbrainz-albumartistid"
TAG_MUSICBRAINZ_ALBUMARTISTID: musicBrainz album artist ID.
const TAG_MUSICBRAINZ_ALBUMID = "musicbrainz-albumid"
TAG_MUSICBRAINZ_ALBUMID: musicBrainz album ID.
const TAG_MUSICBRAINZ_ARTISTID = "musicbrainz-artistid"
TAG_MUSICBRAINZ_ARTISTID: musicBrainz artist ID.
const TAG_MUSICBRAINZ_RELEASEGROUPID = "musicbrainz-releasegroupid"
TAG_MUSICBRAINZ_RELEASEGROUPID: musicBrainz Release Group ID.
const TAG_MUSICBRAINZ_RELEASETRACKID = "musicbrainz-releasetrackid"
TAG_MUSICBRAINZ_RELEASETRACKID: musicBrainz Release Track ID.
const TAG_MUSICBRAINZ_TRACKID = "musicbrainz-trackid"
TAG_MUSICBRAINZ_TRACKID: musicBrainz track ID.
const TAG_MUSICBRAINZ_TRMID = "musicbrainz-trmid"
TAG_MUSICBRAINZ_TRMID: musicBrainz track TRM ID.
Variables ¶
var ( GTypeTagDemuxResult = coreglib.Type(C.gst_tag_demux_result_get_type()) GTypeTagDemux = coreglib.Type(C.gst_tag_demux_get_type()) )
GType values.
var ( GTypeTagImageType = coreglib.Type(C.gst_tag_image_type_get_type()) GTypeTagLicenseFlags = coreglib.Type(C.gst_tag_license_flags_get_type()) )
GType values.
var (
GTypeTagMux = coreglib.Type(C.gst_tag_mux_get_type())
)
GType values.
var (
GTypeTagXmpWriter = coreglib.Type(C.gst_tag_xmp_writer_get_type())
)
GType values.
Functions ¶
func TagCheckLanguageCode ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
TagGetLicenseDescription: get the description of a license, which is a translated description of the license's main features.
The function takes the following parameters:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
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 ¶
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:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
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 ¶
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:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
The function returns the following values:
- utf8: nick name of the license, or NULL if the license is unknown.
func TagGetLicenseTitle ¶
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:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
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 ¶
TagGetLicenseVersion: get the version of a license.
The function takes the following parameters:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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: band/artist logotype. TagImageTypeBandArtistLogo TagImageType = 17 // TagImageTypePublisherStudioLogo: publisher/studio logotype. TagImageTypePublisherStudioLogo TagImageType = 18 )
func (TagImageType) String ¶
func (t TagImageType) String() string
String returns the name in string for TagImageType.
type TagLicenseFlags ¶
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 // 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:
- licenseRef: license reference string in form of a URI, e.g. "http://creativecommons.org/licenses/by-nc-nd/2.0/".
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 ¶
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 ¶
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 ¶
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 ¶
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.