Module: Gst

Defined in:
lib/gst/bin.rb,
lib/gst.rb,
lib/gst/bus.rb,
lib/gst/caps.rb,
lib/gst/buffer.rb,
lib/gst/loader.rb,
lib/gst/element.rb,
lib/gst/version.rb,
lib/gst/registry.rb,
lib/gst/tag-list.rb,
lib/gst/structure.rb,
lib/gst/plugin-feature.rb,
lib/gst/element-factory.rb,
lib/gst/type-find-factory.rb

Overview

Copyright (C) 2015 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: AllocatorFlags, BinFlags, BufferCopyFlags, BufferFlags, BufferPoolAcquireFlags, BufferingMode, BusFlags, BusSyncReply, CapsFlags, CapsIntersectMode, ChildProxy, ClockEntryType, ClockFlags, ClockReturn, ClockType, CoreError, DebugColorFlags, DebugColorMode, DebugGraphDetails, DebugLevel, ElementFlags, EventType, EventTypeFlags, FlowReturn, Format, GapFlags, IteratorItem, IteratorResult, LibraryError, LockFlags, MapFlags, MemoryFlags, MessageType, MetaFlags, MiniObjectFlags, ObjectFlags, PadDirection, PadFlags, PadLinkCheck, PadLinkReturn, PadMode, PadPresence, PadProbeReturn, PadProbeType, PadTemplateFlags, ParseError, ParseFlags, PipelineFlags, PluginAPIFlags, PluginDependencyFlags, PluginError, PluginFlags, Preset, ProgressType, PromiseResult, QOSType, QueryType, QueryTypeFlags, Rank, ResourceError, SchedulingFlags, SearchMode, SeekFlags, SeekType, SegmentFlags, SerializeFlags, StackTraceFlags, State, StateChange, StateChangeReturn, StreamError, StreamFlags, StreamStatusType, StreamType, StructureChangeType, TagFlag, TagMergeMode, TagScope, TagSetter, TaskState, TocEntryType, TocLoopType, TocScope, TocSetter, TracerValueFlags, TracerValueScope, TypeFindProbability, URIError, URIHandler, URIType, Version Classes: Allocator, Bin, Bitmask, Buffer, BufferPool, Bus, Caps, Clock, ControlBinding, ControlSource, Device, DeviceMonitor, DeviceProvider, DeviceProviderFactory, DoubleRange, DynamicTypeFactory, Element, ElementFactory, FlagSet, Fraction, FractionRange, GhostPad, Int64Range, IntRange, Loader, Object, Pad, PadTemplate, ParamArray, ParamFraction, Pipeline, Plugin, PluginFeature, ProxyPad, Registry, SharedTaskPool, Stream, StreamCollection, Structure, SystemClock, TagList, Task, TaskPool, Tracer, TracerFactory, TracerRecord, TypeFindFactory, ValueArray, ValueList

Constant Summary collapse

ALLOCATOR_SYSMEM =

The allocator name for the default system memory allocator

SystemMemory
BUFFER_COPY_ALL =

Combination of all possible fields that can be copied with gst_buffer_copy_into().

15
BUFFER_COPY_METADATA =

Combination of all possible metadata fields that can be copied with gst_buffer_copy_into().

7
BUFFER_OFFSET_NONE =

Constant for no-offset return results.

18446744073709551615
CAN_INLINE =
1
CAPS_FEATURE_MEMORY_SYSTEM_MEMORY =
memory:SystemMemory
CLOCK_TIME_NONE =

Constant to define an undefined clock time.

18446744073709551615
DEBUG_BG_MASK =
240
DEBUG_FG_MASK =
15
DEBUG_FORMAT_MASK =
65280
ELEMENT_FACTORY_KLASS_DECODER =
Decoder
ELEMENT_FACTORY_KLASS_DECRYPTOR =
Decryptor
ELEMENT_FACTORY_KLASS_DEMUXER =
Demuxer
ELEMENT_FACTORY_KLASS_DEPAYLOADER =
Depayloader
ELEMENT_FACTORY_KLASS_ENCODER =
Encoder
ELEMENT_FACTORY_KLASS_ENCRYPTOR =
Encryptor
ELEMENT_FACTORY_KLASS_FORMATTER =
Formatter
ELEMENT_FACTORY_KLASS_HARDWARE =

Elements interacting with hardware devices should specify this classifier in their metadata. You may need to put the element in "READY" state to test if the hardware is present in the system.

Hardware
ELEMENT_FACTORY_KLASS_MEDIA_AUDIO =
Audio
ELEMENT_FACTORY_KLASS_MEDIA_IMAGE =
Image
ELEMENT_FACTORY_KLASS_MEDIA_METADATA =
Metadata
ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE =
Subtitle
ELEMENT_FACTORY_KLASS_MEDIA_VIDEO =
Video
ELEMENT_FACTORY_KLASS_MUXER =
Muxer
ELEMENT_FACTORY_KLASS_PARSER =
Parser
ELEMENT_FACTORY_KLASS_PAYLOADER =
Payloader
ELEMENT_FACTORY_KLASS_SINK =
Sink
ELEMENT_FACTORY_KLASS_SRC =
Source
ELEMENT_FACTORY_TYPE_ANY =

Elements of any of the defined GST_ELEMENT_FACTORY_LIST types

562949953421311
ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS =

All sinks handling audio, video or image media types

3940649673949188
ELEMENT_FACTORY_TYPE_AUDIO_ENCODER =

All encoders handling audio media types

1125899906842626
ELEMENT_FACTORY_TYPE_DECODABLE =

All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders)

1377
ELEMENT_FACTORY_TYPE_DECODER =
1
ELEMENT_FACTORY_TYPE_DECRYPTOR =
1024
ELEMENT_FACTORY_TYPE_DEMUXER =
32
ELEMENT_FACTORY_TYPE_DEPAYLOADER =
256
ELEMENT_FACTORY_TYPE_ENCODER =
2
ELEMENT_FACTORY_TYPE_ENCRYPTOR =
2048
ELEMENT_FACTORY_TYPE_FORMATTER =
512
ELEMENT_FACTORY_TYPE_HARDWARE =
4096
ELEMENT_FACTORY_TYPE_MAX_ELEMENTS =
281474976710656
ELEMENT_FACTORY_TYPE_MEDIA_ANY =

Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types

Note: Do not use this if you wish to not filter against any of the defined media types. If you wish to do this, simply don't specify any GST_ELEMENT_FACTORY_TYPE_MEDIA flag.

18446462598732840960
ELEMENT_FACTORY_TYPE_MEDIA_AUDIO =
1125899906842624
ELEMENT_FACTORY_TYPE_MEDIA_IMAGE =
2251799813685248
ELEMENT_FACTORY_TYPE_MEDIA_METADATA =
9007199254740992
ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE =
4503599627370496
ELEMENT_FACTORY_TYPE_MEDIA_VIDEO =
562949953421312
ELEMENT_FACTORY_TYPE_MUXER =
16
ELEMENT_FACTORY_TYPE_PARSER =
64
ELEMENT_FACTORY_TYPE_PAYLOADER =
128
ELEMENT_FACTORY_TYPE_SINK =
4
ELEMENT_FACTORY_TYPE_SRC =
8
ELEMENT_FACTORY_TYPE_TIMESTAMPER =

Timestamp correcting elements

8192
ELEMENT_FACTORY_TYPE_VIDEO_ENCODER =

All encoders handling video or image media types

2814749767106562
ELEMENT_METADATA_AUTHOR =

Name and contact details of the author(s). Use \n to separate multiple author details. E.g: "Joe Bloggs <joe.blogs at foo.com>"

author
ELEMENT_METADATA_DESCRIPTION =

Sentence describing the purpose of the element. E.g: "Write stream to a file"

description
ELEMENT_METADATA_DOC_URI =

Set uri pointing to user documentation. Applications can use this to show help for e.g. effects to users.

doc-uri
ELEMENT_METADATA_ICON_NAME =

Elements that bridge to certain other products can include an icon of that used product. Application can show the icon in menus/selectors to help identifying specific elements.

icon-name
ELEMENT_METADATA_KLASS =

String describing the type of element, as an unordered list separated with slashes ('/'). See draft-klass.txt of the design docs for more details and common types. E.g: "Sink/File"

klass
ELEMENT_METADATA_LONGNAME =

The long English name of the element. E.g. "File Sink"

long-name
ERROR_SYSTEM =

Builds a string using errno describing the previously failed system call. To be used as the debug argument in #GST_ELEMENT_ERROR.

system error: %s
EVENT_NUM_SHIFT =
8
EVENT_TYPE_BOTH =

The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM.

3
FLAG_SET_MASK_EXACT =

A mask value with all bits set, for use as a GstFlagSet mask where all flag bits must match exactly

4294967295
FORMAT_PERCENT_MAX =

The PERCENT format is between 0 and this value

1000000
FORMAT_PERCENT_SCALE =

The value used to scale down the reported PERCENT format value to its real value.

10000
FOURCC_FORMAT =

Can be used together with #GST_FOURCC_ARGS to properly output a #guint32 fourcc value in a printf()-style text message.

|[ printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); ]|

c%c%c%c
GROUP_ID_INVALID =

A value which is guaranteed to never be returned by gst_util_group_id_next().

Can be used as a default value in variables used to store group_id.

0
LICENSE_UNKNOWN =

To be used in GST_PLUGIN_DEFINE if unsure about the licence.

unknown
LOCK_FLAG_READWRITE =

GstLockFlags value alias for GST_LOCK_FLAG_READ | GST_LOCK_FLAG_WRITE

3
MAP_READWRITE =

GstMapFlags value alias for GST_MAP_READ | GST_MAP_WRITE

3
META_TAG_MEMORY_REFERENCE_STR =

This metadata stays relevant until a deep copy is made.

memory-reference
META_TAG_MEMORY_STR =

This metadata stays relevant as long as memory layout is unchanged. In hindsight, this tag should have been called "memory-layout".

memory
MSECOND =

Constant that defines one GStreamer millisecond.

1000000
NSECOND =

Constant that defines one GStreamer nanosecond

1
PARAM_CONDITIONALLY_AVAILABLE =

Use this flag on GObject properties of GstObject to indicate that they might not be available depending on environment such as OS, device, etc, so such properties will be installed conditionally only if the GstObject is able to support it.

16384
PARAM_CONTROLLABLE =

Use this flag on GObject properties to signal they can make sense to be. controlled over time. This hint is used by the GstController.

512
PARAM_DOC_SHOW_DEFAULT =

Use this flag on GObject properties of GstObject to indicate that during gst-inspect and friends, the default value should be used as default instead of the current value.

8192
PARAM_MUTABLE_PAUSED =

Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PAUSED or lower state. This flag implies GST_PARAM_MUTABLE_READY.

2048
PARAM_MUTABLE_PLAYING =

Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the PLAYING or lower state. This flag implies GST_PARAM_MUTABLE_PAUSED.

4096
PARAM_MUTABLE_READY =

Use this flag on GObject properties of GstElements to indicate that they can be changed when the element is in the READY or lower state.

1024
PARAM_USER_SHIFT =

Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.

65536
PROTECTION_SYSTEM_ID_CAPS_FIELD =

The field name in a GstCaps that is used to signal the UUID of the protection system.

protection-system
PROTECTION_UNSPECIFIED_SYSTEM_ID =

The protection system value of the unspecified UUID. In some cases the system protection ID is not present in the contents or in their metadata, as encrypted WebM. This define is used to set the value of the "system_id" field in GstProtectionEvent, with this value, the application will use an external information to choose which protection system to use.

Example: The matroskademux uses this value in the case of encrypted WebM, the application will choose the appropriate protection system based on the information received through EME API.

unspecified-system-id
PTR_FORMAT =

printf format type used to debug GStreamer types. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print the following types: Gst::Caps, #GstStructure, Gst::CapsFeatures, #GstTagList, #GstDateTime, #GstBuffer, #GstBufferList, Gst::Message, #GstEvent, #GstQuery, #GstContext, #GstPad, #GstObject. All #GObject types will be printed as typename plus pointer, and everything else will simply be printed as pointer address.

This can only be used on types whose size is >= sizeof(gpointer).

paA
QUERY_NUM_SHIFT =
8
QUERY_TYPE_BOTH =

The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM.

3
SECOND =

Constant that defines one GStreamer second.

1000000000
SEGMENT_FORMAT =

printf format type used to debug GStreamer segments. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print Gst::Segment structures. This can only be used on pointers to GstSegment structures.

paB
SEGMENT_INSTANT_FLAGS =
912
SEQNUM_INVALID =

A value which is guaranteed to never be returned by gst_util_seqnum_next().

Can be used as a default value in variables used to store seqnum.

0
STIMEP_FORMAT =

printf format type used to debug GStreamer signed time value pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print signed time (pointers to Gst::ClockTimeDiff or #gint64).

paS
STIME_FORMAT =

A string that can be used in printf-like format strings to display a signed Gst::ClockTimeDiff or #gint64 value in h:m:s format. Use GST_TIME_ARGS() to construct the matching arguments.

Example:

printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts));
c%
TAG_ALBUM =

album containing this data (string)

The album name as it should be displayed, e.g. 'The Jazz Guitar'

album
TAG_ALBUM_ARTIST =

The artist of the entire album, as it should be displayed.

album-artist
TAG_ALBUM_ARTIST_SORTNAME =

The artist of the entire album, as it should be sorted.

album-artist-sortname
TAG_ALBUM_GAIN =

album gain in db (double)

replaygain-album-gain
TAG_ALBUM_PEAK =

peak of the album (double)

replaygain-album-peak
TAG_ALBUM_SORTNAME =

album containing this data, as used for sorting (string)

The album name as it should be sorted, e.g. 'Jazz Guitar, The'

album-sortname
TAG_ALBUM_VOLUME_COUNT =

count of discs inside collection this disc belongs to (unsigned integer)

album-disc-count
TAG_ALBUM_VOLUME_NUMBER =

disc number inside a collection (unsigned integer)

album-disc-number
TAG_APPLICATION_DATA =

Arbitrary application data (sample)

Some formats allow applications to add their own arbitrary data into files. This data is application dependent.

application-data
TAG_APPLICATION_NAME =

Name of the application used to create the media (string)

application-name
TAG_ARTIST =

person(s) responsible for the recording (string)

The artist name as it should be displayed, e.g. 'Jimi Hendrix' or 'The Guitar Heroes'

artist
TAG_ARTIST_SORTNAME =

person(s) responsible for the recording, as used for sorting (string)

The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or 'Guitar Heroes, The'

artist-sortname
TAG_ATTACHMENT =

generic file attachment (sample) (sample taglist should specify the content type and if possible set "filename" to the file name of the attachment)

attachment
TAG_AUDIO_CODEC =

codec the audio data is stored in (string)

audio-codec
TAG_BEATS_PER_MINUTE =

number of beats per minute in audio (double)

beats-per-minute
TAG_BITRATE =

exact or average bitrate in bits/s (unsigned integer)

bitrate
TAG_CODEC =

codec the data is stored in (string)

codec
TAG_COMMENT =

free text commenting the data (string)

comment
TAG_COMPOSER =

person(s) who composed the recording (string)

composer
TAG_COMPOSER_SORTNAME =

The composer's name, used for sorting (string)

composer-sortname
TAG_CONDUCTOR =

conductor/performer refinement (string)

conductor
TAG_CONTACT =

contact information (string)

contact
TAG_CONTAINER_FORMAT =

container format the data is stored in (string)

container-format
TAG_CONTAINER_SPECIFIC_TRACK_ID =

Unique identifier for the audio, video or text track this tag is associated with. The mappings for several container formats are defined in the Sourcing In-band Media Resource Tracks from Media Containers into HTML specification.

container-specific-track-id
copyright
copyright-uri
TAG_DATE =

date the data was created (#GDate structure)

date
TAG_DATE_TIME =

date and time the data was created (Gst::DateTime structure)

datetime
TAG_DESCRIPTION =

short text describing the content of the data (string)

description
TAG_DEVICE_MANUFACTURER =

Manufacturer of the device used to create the media (string)

device-manufacturer
TAG_DEVICE_MODEL =

Model of the device used to create the media (string)

device-model
TAG_DURATION =

length in GStreamer time units (nanoseconds) (unsigned 64-bit integer)

duration
TAG_ENCODED_BY =

name of the person or organisation that encoded the file. May contain a copyright message if the person or organisation also holds the copyright (string)

Note: do not use this field to describe the encoding application. Use #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that.

encoded-by
TAG_ENCODER =

encoder used to encode this stream (string)

encoder
TAG_ENCODER_VERSION =

version of the encoder used to encode this stream (unsigned integer)

encoder-version
TAG_EXTENDED_COMMENT =

key/value text commenting the data (string)

Must be in the form of 'key=comment' or 'key[lc]=comment' where 'lc' is an ISO-639 language code.

This tag is used for unknown Vorbis comment tags, unknown APE tags and certain ID3v2 comment fields.

extended-comment
TAG_GENRE =

genre this data belongs to (string)

genre
TAG_GEO_LOCATION_CAPTURE_DIRECTION =

Indicates the direction the device is pointing to when capturing a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360)

See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION

geo-location-capture-direction
TAG_GEO_LOCATION_CITY =

The city (english name) where the media has been produced (string).

geo-location-city
TAG_GEO_LOCATION_COUNTRY =

The country (english name) where the media has been produced (string).

geo-location-country
TAG_GEO_LOCATION_ELEVATION =

geo elevation of where the media has been recorded or produced in meters according to WGS84 (zero is average sea level) (double).

geo-location-elevation
TAG_GEO_LOCATION_HORIZONTAL_ERROR =

Represents the expected error on the horizontal positioning in meters (double).

geo-location-horizontal-error
TAG_GEO_LOCATION_LATITUDE =

geo latitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the equator, negative values for southern latitudes) (double).

geo-location-latitude
TAG_GEO_LOCATION_LONGITUDE =

geo longitude location of where the media has been recorded or produced in degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, negative values for western longitudes). (double).

geo-location-longitude
TAG_GEO_LOCATION_MOVEMENT_DIRECTION =

Indicates the movement direction of the device performing the capture of a media. It is represented as degrees in floating point representation, 0 means the geographic north, and increases clockwise (double from 0 to 360)

See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION

geo-location-movement-direction
TAG_GEO_LOCATION_MOVEMENT_SPEED =

Speed of the capturing device when performing the capture. Represented in m/s. (double)

See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION

geo-location-movement-speed
TAG_GEO_LOCATION_NAME =

human readable descriptive location of where the media has been recorded or produced. (string).

geo-location-name
TAG_GEO_LOCATION_SUBLOCATION =

A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better where the media has been produced. (e.g. the neighborhood) (string).

This tag has been added as this is how it is handled/named in XMP's Iptc4xmpcore schema.

geo-location-sublocation
TAG_GROUPING =

Groups together media that are related and spans multiple tracks. An example are multiple pieces of a concerto. (string)

grouping
TAG_HOMEPAGE =

Homepage for this media (i.e. artist or movie homepage) (string)

homepage
TAG_IMAGE =

image (sample) (sample taglist should specify the content type and preferably also set "image-type" field as GstTagImageType)

image
TAG_IMAGE_ORIENTATION =

Represents the 'Orientation' tag from EXIF. Defines how the image should be rotated and mirrored for display. (string)

This tag has a predefined set of allowed values: "rotate-0" "rotate-90" "rotate-180" "rotate-270" "flip-rotate-0" "flip-rotate-90" "flip-rotate-180" "flip-rotate-270"

The naming is adopted according to a possible transformation to perform on the image to fix its orientation, obviously equivalent operations will yield the same result.

Rotations indicated by the values are in clockwise direction and 'flip' means an horizontal mirroring.

image-orientation
TAG_INTERPRETED_BY =

Information about the people behind a remix and similar interpretations of another existing piece (string)

interpreted-by
TAG_ISRC =

International Standard Recording Code - see http://www.ifpi.org/isrc/ (string)

isrc
TAG_KEYWORDS =

comma separated keywords describing the content (string).

keywords
TAG_LANGUAGE_CODE =

ISO-639-2 or ISO-639-1 code for the language the content is in (string)

There is utility API in libgsttag in gst-plugins-base to obtain a translated language name from the language code: gst_tag_get_language_name()

language-code
TAG_LANGUAGE_NAME =

Name of the language the content is in (string)

Free-form name of the language the content is in, if a language code is not available. This tag should not be set in addition to a language code. It is undefined what language or locale the language name is in.

language-name
TAG_LICENSE =

license of data (string)

license
TAG_LICENSE_URI =

URI to location where license details can be found (string)

license-uri
TAG_LOCATION =

Origin of media as a URI (location, where the original of the file or stream is hosted) (string)

location
TAG_LYRICS =

The lyrics of the media (string)

lyrics
TAG_MAXIMUM_BITRATE =

maximum bitrate in bits/s (unsigned integer)

maximum-bitrate
TAG_MIDI_BASE_NOTE =

Midi note number of the audio track. This is useful for sample instruments and in particular for multi-samples.

midi-base-note
TAG_MINIMUM_BITRATE =

minimum bitrate in bits/s (unsigned integer)

minimum-bitrate
TAG_NOMINAL_BITRATE =

nominal bitrate in bits/s (unsigned integer). The actual bitrate might be different from this target bitrate.

nominal-bitrate
TAG_ORGANIZATION =

organization (string)

organization
TAG_PERFORMER =

person(s) performing (string)

performer
TAG_PREVIEW_IMAGE =

image that is meant for preview purposes, e.g. small icon-sized version (sample) (sample taglist should specify the content type)

preview-image
TAG_PRIVATE_DATA =

Any private data that may be contained in tags (sample).

It is represented by Gst::Sample in which #GstBuffer contains the binary data and the sample's info Gst::Structure may contain any extra information that identifies the origin or meaning of the data.

Private frames in ID3v2 tags ('PRIV' frames) will be represented using this tag, in which case the GstStructure will be named "ID3PrivateFrame" and contain a field named "owner" of type string which contains the owner-identification string from the tag.

private-data
TAG_PUBLISHER =

Name of the label or publisher (string)

publisher
TAG_REFERENCE_LEVEL =

reference level of track and album gain values (double)

replaygain-reference-level
TAG_SERIAL =

serial number of track (unsigned integer)

serial
TAG_SHOW_EPISODE_NUMBER =

Number of the episode within a season/show (unsigned integer)

show-episode-number
TAG_SHOW_NAME =

Name of the show, used for displaying (string)

show-name
TAG_SHOW_SEASON_NUMBER =

Number of the season of a show/series (unsigned integer)

show-season-number
TAG_SHOW_SORTNAME =

Name of the show, used for sorting (string)

show-sortname
TAG_SUBTITLE_CODEC =

codec/format the subtitle data is stored in (string)

subtitle-codec
TAG_TITLE =

commonly used title (string)

The title as it should be displayed, e.g. 'The Doll House'

title
TAG_TITLE_SORTNAME =

commonly used title, as used for sorting (string)

The title as it should be sorted, e.g. 'Doll House, The'

title-sortname
TAG_TRACK_COUNT =

count of tracks inside collection this track belongs to (unsigned integer)

track-count
TAG_TRACK_GAIN =

track gain in db (double)

replaygain-track-gain
TAG_TRACK_NUMBER =

track number inside a collection (unsigned integer)

track-number
TAG_TRACK_PEAK =

peak of the track (double)

replaygain-track-peak
TAG_USER_RATING =

Rating attributed by a person (likely the application user). The higher the value, the more the user likes this media (unsigned int from 0 to 100)

user-rating
TAG_VERSION =

version of this data (string)

version
TAG_VIDEO_CODEC =

codec the video data is stored in (string)

video-codec
TIMEP_FORMAT =

printf format type used to debug GStreamer ClockTime pointers. You can use this in combination with GStreamer's debug logging system as well as the functions gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() to pretty-print Gst::ClockTime pointers. This can only be used on pointers to GstClockTime values.

paT
TIME_FORMAT =

A string that can be used in printf-like format strings to display a Gst::ClockTime value in h:m:s format. Use GST_TIME_ARGS() to construct the matching arguments.

Example:

printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts));
u:%02u:%02u.%09u
TOC_REPEAT_COUNT_INFINITE =

Special value for the repeat_count set in gst_toc_entry_set_loop() or returned by gst_toc_entry_set_loop() to indicate infinite looping.

-1
URI_NO_PORT =

Value for Gst::Uri.port to indicate no port number.

0
USECOND =

Constant that defines one GStreamer microsecond.

1000
VALUE_EQUAL =

Indicates that the first value provided to a comparison function (gst_value_compare()) is equal to the second one.

0
VALUE_GREATER_THAN =

Indicates that the first value provided to a comparison function (gst_value_compare()) is greater than the second one.

1
VALUE_LESS_THAN =

Indicates that the first value provided to a comparison function (gst_value_compare()) is lesser than the second one.

-1
VALUE_UNORDERED =

Indicates that the comparison function (gst_value_compare()) can not determine a order for the two provided values.

2
VERSION_MAJOR =

The major version of GStreamer at compile time:

1
VERSION_MICRO =

The micro version of GStreamer at compile time:

2
VERSION_MINOR =

The minor version of GStreamer at compile time:

24
VERSION_NANO =

The nano version of GStreamer at compile time: Actual releases have 0, GIT versions have 1, prerelease versions have 2-...

0
LOG_DOMAIN =
"GStreamer"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/gst.rb', line 31

def const_missing(name)
  init
  if const_defined?(name)
    const_get(name)
  else
    super
  end
end

.init(*argv) ⇒ Object



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/gst.rb', line 49

def init(*argv)
  class << self
    remove_method(:init)
    remove_method(:const_missing)
    remove_method(:method_missing)
  end
  loader = Loader.new(self, argv)
  loader.load
  init_base
  init_controller
  init_audio
end

.method_missing(name, *args, &block) ⇒ Object



40
41
42
43
44
45
46
47
# File 'lib/gst.rb', line 40

def method_missing(name, *args, &block)
  init
  if respond_to?(name)
    __send__(name, *args, &block)
  else
    super
  end
end

Instance Method Details

#buffer_get_max_memoryInteger

Gets the maximum amount of memory blocks that a buffer can hold. This is a compile time constant that can be queried with the function.

When more memory blocks are added, existing memory blocks will be merged together to make room for the new block.

Returns:

  • (Integer)

    the maximum amount of memory blocks that a buffer can hold.

#calculate_linear_regression(xy, temp, n, m_num, m_denom, b, xbase, r_squared) ⇒ Boolean

Calculates the linear regression of the values xy and places the result in m_num, m_denom, b and xbase, representing the function y(x) = m_num/m_denom * (x - xbase) + b that has the least-square distance from all points x and y.

r_squared will contain the remaining error.

If temp is not nil, it will be used as temporary space for the function, in which case the function works without any allocation at all. If temp is nil, an allocation will take place. temp should have at least the same amount of memory allocated as xy, i.e. 2nsizeof(GstClockTime).

This function assumes (x,y) values with reasonable large differences between them. It will not calculate the exact results if the differences between neighbouring values are too small due to not being able to represent sub-integer values during the calculations.

Parameters:

  • xy (Gst::ClockTime)

    Pairs of (x,y) values

  • temp (Gst::ClockTime)

    Temporary scratch space used by the function

  • n (Integer)

    number of (x,y) pairs

  • m_num (Gst::ClockTime)

    numerator of calculated slope

  • m_denom (Gst::ClockTime)

    denominator of calculated slope

  • b (Gst::ClockTime)

    Offset at Y-axis

  • xbase (Gst::ClockTime)

    Offset at X-axis

  • r_squared (Float)

    R-squared

Returns:

  • (Boolean)

    true if the linear regression was successfully calculated

#caps_features_from_string(features) ⇒ Gst::CapsFeatures

Creates a Gst::CapsFeatures from a string representation.

Parameters:

  • features (String)

    a string representation of a Gst::CapsFeatures.

Returns:

  • (Gst::CapsFeatures)

    a new Gst::CapsFeatures or nil when the string could not be parsed.

#caps_from_string(string) ⇒ Gst::Caps

Converts caps from a string representation.

The implementation of serialization up to 1.20 would lead to unexpected results when there were nested Gst::Caps / #GstStructure deeper than one level.

Parameters:

  • string (String)

    a string to convert to Gst::Caps

Returns:

  • (Gst::Caps)

    a newly allocated Gst::Caps

#clear_mini_object(object_ptr) ⇒ nil

Clears a reference to a Gst::MiniObject.

object_ptr must not be nil.

If the reference is nil then this function does nothing. Otherwise, the reference count of the object is decreased using gst_mini_object_unref() and the pointer is set to nil.

A macro is also included that allows this function to be used without pointer casts.

Parameters:

  • object_ptr (Gst::MiniObject)

    a pointer to a Gst::MiniObject reference

Returns:

  • (nil)

#clear_object(object_ptr) ⇒ nil

Clears a reference to a Gst::Object.

object_ptr must not be nil.

If the reference is nil then this function does nothing. Otherwise, the reference count of the object is decreased using gst_object_unref() and the pointer is set to nil.

A macro is also included that allows this function to be used without pointer casts.

Parameters:

  • object_ptr (Gst::Object)

    a pointer to a Gst::Object reference

Returns:

  • (nil)

#clear_structure(structure_ptr) ⇒ nil

Clears a reference to a Gst::Structure.

structure_ptr must not be nil.

If the reference is nil then this function does nothing. Otherwise, the structure is free'd using gst_structure_free() and the pointer is set to nil.

A macro is also included that allows this function to be used without pointer casts.

Parameters:

  • structure_ptr (Gst::Structure)

    a pointer to a Gst::Structure reference

Returns:

  • (nil)

#core_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#debug_add_log_function(func, user_data, notify) ⇒ nil

Adds the logging function to the list of logging functions. Be sure to use #G_GNUC_NO_INSTRUMENT on that function, it is needed.

Parameters:

  • func (Gst::LogFunction)

    the function to use

  • user_data (GObject)

    user data

  • notify (GLib::DestroyNotify)

    called when user_data is not used anymore

Returns:

  • (nil)

#debug_add_ring_buffer_logger(max_size_per_thread, thread_timeout) ⇒ nil

Adds a memory ringbuffer based debug logger that stores up to max_size_per_thread bytes of logs per thread and times out threads after thread_timeout seconds of inactivity.

Logs can be fetched with gst_debug_ring_buffer_logger_get_logs() and the logger can be removed again with gst_debug_remove_ring_buffer_logger(). Only one logger at a time is possible.

Parameters:

  • max_size_per_thread (Integer)

    Maximum size of log per thread in bytes

  • thread_timeout (Integer)

    Timeout for threads in seconds

Returns:

  • (nil)

#debug_bin_to_dot_data(bin, details) ⇒ String

To aid debugging applications one can use this method to obtain the whole network of gstreamer elements that form the pipeline into a dot file. This data can be processed with graphviz to get an image. dot format.

Parameters:

Returns:

  • (String)

    a string containing the pipeline in graphviz

#debug_bin_to_dot_file(bin, details, file_name) ⇒ nil

To aid debugging applications one can use this method to write out the whole network of gstreamer elements that form the pipeline into a dot file. This file can be processed with graphviz to get an image.

 dot -Tpng -oimage.png graph_lowlevel.dot

Parameters:

  • bin (Gst::Bin)

    the top-level pipeline that should be analyzed

  • details (Gst::DebugGraphDetails)

    type of Gst::DebugGraphDetails to use

  • file_name (Gst::filename)

    output base filename (e.g. "myplayer")

Returns:

  • (nil)

#debug_bin_to_dot_file_with_ts(bin, details, file_name) ⇒ nil

This works like gst_debug_bin_to_dot_file(), but adds the current timestamp to the filename, so that it can be used to take multiple snapshots.

Parameters:

  • bin (Gst::Bin)

    the top-level pipeline that should be analyzed

  • details (Gst::DebugGraphDetails)

    type of Gst::DebugGraphDetails to use

  • file_name (Gst::filename)

    output base filename (e.g. "myplayer")

Returns:

  • (nil)

#debug_construct_term_color(colorinfo) ⇒ String

Constructs a string that can be used for getting the desired color in color terminals. You need to free the string after use.

Parameters:

  • colorinfo (Integer)

    the color info

Returns:

  • (String)

    a string containing the color definition

#debug_construct_win_color(colorinfo) ⇒ Integer

Constructs an integer that can be used for getting the desired color in windows' terminals (cmd.exe). As there is no mean to underline, we simply ignore this attribute.

This function returns 0 on non-windows machines.

Parameters:

  • colorinfo (Integer)

    the color info

Returns:

  • (Integer)

    an integer containing the color definition

#debug_get_all_categoriesGLib::SList<Gst::DebugCategory>

Returns a snapshot of a all categories that are currently in use . This list may change anytime. The caller has to free the list after use.

Returns:

  • (GLib::SList<Gst::DebugCategory>)

    the list of debug categories

#debug_get_color_modeGst::DebugColorMode

Changes the coloring mode for debug output.

Returns:

#debug_get_default_thresholdGst::DebugLevel

Returns the default threshold that is used for new categories.

Returns:

#debug_get_stack_trace(flags) ⇒ String

look like. Pass #GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace. present, else nil.

Parameters:

  • flags (Gst::StackTraceFlags)

    A set of Gst::StackTraceFlags to determine how the stack trace should

Returns:

  • (String)

    a stack trace, if libunwind or glibc backtrace are

#debug_is_activeBoolean

Checks if debugging output is activated.

Returns:

  • (Boolean)

    true, if debugging is activated

#debug_is_coloredBoolean

Checks if the debugging output should be colored.

Returns:

  • (Boolean)

    true, if the debug output should be colored.

#debug_level_get_name(level) ⇒ String

Get the string representation of a debugging level

Parameters:

Returns:

  • (String)

    the name

#debug_log(category, level, file, function, line, object, format, array) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • object (GObject::Object)

    the object this message relates to, or nil if none

  • format (String)

    a printf style format string

  • array (Array)

    optional arguments for the format

Returns:

  • (nil)

#debug_log_default(category, level, file, function, line, object, message, user_data) ⇒ nil

The default logging handler used by GStreamer. Logging functions get called whenever a macro like GST_DEBUG or similar is used. By default this function is setup to output the message and additional info to stderr (or the log file specified via the GST_DEBUG_FILE environment variable) as received via user_data.

You can add other handlers by using gst_debug_add_log_function(). And you can remove this handler by calling gst_debug_remove_log_function(gst_debug_log_default);

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • object (GObject::Object)

    the object this message relates to, or nil if none

  • message (Gst::DebugMessage)

    the actual message

  • user_data (GObject)

    the FILE* to log to

Returns:

  • (nil)

#debug_log_get_line(category, level, file, function, line, object, message) ⇒ String

Returns the string representation for the specified debug log message formatted in the same way as gst_debug_log_default() (the default handler), without color. The purpose is to make it easy for custom log output handlers to get a log output that is identical to what the default handler would write out.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • object (GObject::Object)

    the object this message relates to, or nil if none

  • message (Gst::DebugMessage)

    the actual message

Returns:

  • (String)

#debug_log_id(category, level, file, function, line, id, format, array) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • id (String)

    the identifier of the object this message relates to, or nil if none.

  • format (String)

    a printf style format string

  • array (Array)

    optional arguments for the format

Returns:

  • (nil)

#debug_log_id_literal(category, level, file, function, line, id, message_string) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • id (String)

    the identifier of the object this message relates to or nil if none

  • message_string (String)

    a message string

Returns:

  • (nil)

#debug_log_id_valist(category, level, file, function, line, id, format, args) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • id (String)

    the identifier of the object this message relates to or nil if none.

  • format (String)

    a printf style format string

  • args (Gst::va_list)

    optional arguments for the format

Returns:

  • (nil)

#debug_log_literal(category, level, file, function, line, object, message_string) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • object (GObject::Object)

    the object this message relates to, or nil if none

  • message_string (String)

    a message string

Returns:

  • (nil)

#debug_log_valist(category, level, file, function, line, object, format, args) ⇒ nil

Logs the given message using the currently registered debugging handlers.

Parameters:

  • category (Gst::DebugCategory)

    category to log

  • level (Gst::DebugLevel)

    level of the message is in

  • file (String)

    the file that emitted the message, usually the FILE identifier

  • function (String)

    the function that emitted the message

  • line (Integer)

    the line from that the message was emitted, usually LINE

  • object (GObject::Object)

    the object this message relates to, or nil if none

  • format (String)

    a printf style format string

  • args (Gst::va_list)

    optional arguments for the format

Returns:

  • (nil)

#debug_print_stack_tracenil

If libunwind, glibc backtrace or DbgHelp are present a stack trace is printed.

Returns:

  • (nil)

#debug_remove_log_function(func) ⇒ Integer

Removes all registered instances of the given logging functions.

Parameters:

  • func (Gst::LogFunction)

    the log function to remove, or nil to remove the default log function

Returns:

  • (Integer)

    How many instances of the function were removed

#debug_remove_log_function_by_data(data) ⇒ Integer

Removes all registered instances of log functions with the given user data.

Parameters:

  • data (GObject)

    user data of the log function to remove

Returns:

  • (Integer)

    How many instances of the function were removed

#debug_remove_ring_buffer_loggernil

Removes any previously added ring buffer logger with gst_debug_add_ring_buffer_logger().

Returns:

  • (nil)

#debug_ring_buffer_logger_get_logsArray<String>

Fetches the current logs per thread from the ring buffer logger. See gst_debug_add_ring_buffer_logger() for details. strings with the debug output per thread

Returns:

  • (Array<String>)

    NULL-terminated array of

#debug_set_active(active) ⇒ nil

If activated, debugging messages are sent to the debugging handlers. It makes sense to deactivate it for speed issues.

This function is not threadsafe. It makes sense to only call it during initialization.

Parameters:

  • active (Boolean)

    Whether to use debugging output or not

Returns:

  • (nil)

#debug_set_color_mode(mode) ⇒ nil

Changes the coloring mode for debug output.

This function may be called before gst_init().

Parameters:

Returns:

  • (nil)

#debug_set_color_mode_from_string(mode) ⇒ nil

Changes the coloring mode for debug output.

This function may be called before gst_init(). "on", "auto", "off", "disable", "unix".

Parameters:

  • mode (String)

    The coloring mode for debug output. One of the following:

Returns:

  • (nil)

#debug_set_colored(colored) ⇒ nil

Sets or unsets the use of coloured debugging output. Same as gst_debug_set_color_mode () with the argument being being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF.

This function may be called before gst_init().

Parameters:

  • colored (Boolean)

    Whether to use colored output or not

Returns:

  • (nil)

#debug_set_default_threshold(level) ⇒ nil

Sets the default threshold to the given level and updates all categories to use this threshold.

This function may be called before gst_init().

Parameters:

Returns:

  • (nil)

#debug_set_threshold_for_name(name, level) ⇒ nil

Sets all categories which match the given glob style pattern to the given level.

Parameters:

  • name (String)

    name of the categories to set

  • level (Gst::DebugLevel)

    level to set them to

Returns:

  • (nil)

#debug_set_threshold_from_string(list, reset) ⇒ nil

Sets the debug logging wanted in the same form as with the GST_DEBUG environment variable. You can use wildcards such as *, but note that the order matters when you use wild cards, e.g. foosrc:6,*src:3,*:2 sets everything to log level 2. false if adding the threshold described by list to the one already set.

Parameters:

  • list (String)

    comma-separated list of "category:level" pairs to be used as debug logging levels

  • reset (Boolean)

    true to clear all previously-set debug levels before setting new thresholds

Returns:

  • (nil)

#debug_unset_threshold_for_name(name) ⇒ nil

Resets all categories with the given name back to the default level.

Parameters:

  • name (String)

    name of the categories to set

Returns:

  • (nil)

#deinitnil

Clean up any resources created by GStreamer in gst_init().

It is normally not needed to call this function in a normal application as the resources will automatically be freed when the program terminates. This function is therefore mostly used by testsuites and other memory profiling tools.

After this call GStreamer (including this method) should not be used anymore.

Returns:

  • (nil)

#dynamic_type_register(plugin, type) ⇒ Boolean

Registers a new Gst::DynamicTypeFactory in the registry

Parameters:

  • plugin (Gst::Plugin)

    The Gst::Plugin to register dyn_type for

  • type (GLib::Type)

    The #GType to register dynamically

Returns:

  • (Boolean)

#error_get_message(domain, code) ⇒ String

Get a string describing the error message in the current locale.

Parameters:

  • domain (GLib::Quark)

    the GStreamer error domain this error belongs to.

  • code (Integer)

    the error code belonging to the domain.

Returns:

  • (String)

    a newly allocated string describing the error message (in UTF-8 encoding)

#event_type_get_flags(type) ⇒ Gst::EventTypeFlags

Gets the Gst::EventTypeFlags associated with type.

Parameters:

Returns:

#event_type_get_name(type) ⇒ String

Get a printable name for the given event type. Do not modify or free.

Parameters:

Returns:

  • (String)

    a reference to the static name of the event.

#event_type_to_quark(type) ⇒ GLib::Quark

Get the unique quark for the given event type.

Parameters:

Returns:

  • (GLib::Quark)

    the quark associated with the event type

#event_type_to_sticky_ordering(type) ⇒ Integer

Converts the Gst::EventType to an unsigned integer that represents the ordering of sticky events when re-sending them. A lower value represents a higher-priority event.

Parameters:

Returns:

  • (Integer)

    an unsigned integer

#filename_to_uri(filename) ⇒ String

Similar to g_filename_to_uri(), but attempts to handle relative file paths as well. Before converting filename into an URI, it will be prefixed by the current working directory if it is a relative path, and then the path will be canonicalised so that it doesn't contain any './' or '../' segments.

On Windows filename should be in UTF-8 encoding.

Parameters:

  • filename (Gst::filename)

    absolute or relative file name path

Returns:

  • (String)

    newly-allocated URI string, or NULL on error. The caller must free the URI string with g_free() when no longer needed.

#flow_get_name(ret) ⇒ String

Gets a string representing the given flow return.

Parameters:

Returns:

  • (String)

    a static string with the name of the flow return.

#flow_to_quark(ret) ⇒ GLib::Quark

Get the unique quark for the given GstFlowReturn. invalid return was specified.

Parameters:

Returns:

  • (GLib::Quark)

    the quark associated with the flow return or 0 if an

#format_get_by_nick(nick) ⇒ Gst::Format

Return the format registered with the given nick. if the format was not registered.

Parameters:

  • nick (String)

    The nick of the format

Returns:

  • (Gst::Format)

    The format with nick or GST_FORMAT_UNDEFINED

#format_get_details(format) ⇒ Gst::FormatDefinition

Get details about the given format. on failure.

MT safe.

Parameters:

  • format (Gst::Format)

    The format to get details of

Returns:

  • (Gst::FormatDefinition)

    The Gst::FormatDefinition for format or nil

#format_get_name(format) ⇒ String

Get a printable name for the given format. Do not modify or free. or nil if the format is unknown.

Parameters:

Returns:

  • (String)

    a reference to the static name of the format

#format_iterate_definitionsGst::Iterator

Iterate all the registered formats. The format definition is read only.

Returns:

  • (Gst::Iterator)

    a GstIterator of Gst::FormatDefinition.

#format_register(nick, description) ⇒ Gst::Format

Create a new GstFormat based on the nick or return an already registered format with that nick. with the same nick.

MT safe.

Parameters:

  • nick (String)

    The nick of the new format

  • description (String)

    The description of the new format

Returns:

  • (Gst::Format)

    A new GstFormat or an already registered format

#format_to_quark(format) ⇒ GLib::Quark

Get the unique quark for the given format. is unknown.

Parameters:

Returns:

  • (GLib::Quark)

    the quark associated with the format or 0 if the format

#formats_contains(formats, format) ⇒ Boolean

See if the given format is inside the format array.

Parameters:

Returns:

  • (Boolean)

    true if the format is found inside the array

#info_strdup_printf(format, array) ⇒ String

Allocates, fills and returns a 0-terminated string from the printf style format string and corresponding arguments.

See gst_info_vasprintf() for when this function is required.

Free with g_free().

Parameters:

  • format (String)

    a printf style format string

  • array (Array)

    the printf arguments for format

Returns:

  • (String)

    a newly allocated null terminated string or nil on any error

#info_strdup_vprintf(format, args) ⇒ String

Allocates, fills and returns a null terminated string from the printf style format string and args.

See gst_info_vasprintf() for when this function is required.

Free with g_free().

Parameters:

  • format (String)

    a printf style format string

  • args (Gst::va_list)

    the va_list of printf arguments for format

Returns:

  • (String)

    a newly allocated null terminated string or nil on any error

#info_vasprintf(result, format, args) ⇒ Integer

Allocates and fills a string large enough (including the terminating null byte) to hold the specified printf style format and args.

This function deals with the GStreamer specific printf specifiers #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT. If you do not have these specifiers in your format string, you do not need to use this function and can use alternatives such as g_vasprintf().

Free result with g_free().

Parameters:

  • result (String)

    the resulting string

  • format (String)

    a printf style format string

  • args (Gst::va_list)

    the va_list of printf arguments for format

Returns:

  • (Integer)

    the length of the string allocated into result or -1 on any error

#init(argc, argv) ⇒ nil

Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.

Unless the plugin registry is disabled at compile time, the registry will be loaded. By default this will also check if the registry cache needs to be updated and rescan all plugins if needed. See gst_update_registry() for details and section

WARNING: This function will terminate your program if it was unable to initialize GStreamer for some reason. If you want your program to fall back, use gst_init_check() instead.

Parameters:

  • argc (Integer)

    pointer to application's argc

  • argv (Array<String>)

    pointer to application's argv

Returns:

  • (nil)

#init_check(argc, argv) ⇒ Boolean

Initializes the GStreamer library, setting up internal path lists, registering built-in elements, and loading standard plugins.

This function will return false if GStreamer could not be initialized for some reason. If you want your program to fail fatally, use gst_init() instead.

Parameters:

  • argc (Integer)

    pointer to application's argc

  • argv (Array<String>)

    pointer to application's argv

Returns:

  • (Boolean)

    true if GStreamer could be initialized.

#init_get_option_groupGLib::OptionGroup

Returns a GOption::Group with GStreamer's argument specifications. The group is set up to use standard GOption callbacks, so when using this group in combination with GOption parsing methods, all argument parsing and initialization is automated.

This function is useful if you want to integrate GStreamer with other libraries that use GOption (see g_option_context_add_group() ).

If you use this function, you should make sure you initialise the GLib threading system as one of the very first things in your program (see the example at the beginning of this section).

Returns:

  • (GLib::OptionGroup)

    a pointer to GStreamer's option group.

#is_caps_features(obj) ⇒ Boolean

Checks if obj is a Gst::CapsFeatures

Parameters:

  • obj (GObject)

Returns:

  • (Boolean)

    true if obj is a Gst::CapsFeatures false otherwise

#is_initializedBoolean

Use this function to check if GStreamer has been initialized with gst_init() or gst_init_check().

Returns:

  • (Boolean)

    true if initialization has been done, false otherwise.

#library_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#main_executable_pathString

This helper is mostly helpful for plugins that need to inspect the folder of the main executable to determine their set of features.

When a plugin is initialized from the gst-plugin-scanner external process, the returned path will be the same as from the parent process.

Returns:

  • (String)

    The path of the executable that initialized GStreamer, or nil if it could not be determined.

#make_element_message_details(name, array) ⇒ Gst::Structure

Create a Gst::Structure to be used with #gst_element_message_full_with_details. nil terminator required.

Parameters:

  • name (String)

    Name of the first field to set

  • array (Array)

    variable arguments in the same form as Gst::Structure

Returns:

#message_type_get_name(type) ⇒ String

Get a printable name for the given message type. Do not modify or free.

Parameters:

Returns:

  • (String)

    a reference to the static name of the message.

#message_type_to_quark(type) ⇒ GLib::Quark

Get the unique quark for the given message type.

Parameters:

Returns:

  • (GLib::Quark)

    the quark associated with the message type

#meta_api_type_get_tags(api) ⇒ Array<String>

Returns an array of tags as strings.

Parameters:

  • api (GLib::Type)

    an API

Returns:

  • (Array<String>)

    an array of tags as strings.

#meta_api_type_has_tag(api, tag) ⇒ Boolean

Check if api was registered with tag.

Parameters:

  • api (GLib::Type)

    an API

  • tag (GLib::Quark)

    the tag to check

Returns:

  • (Boolean)

    true if api was registered with tag.

#meta_api_type_register(api, tags) ⇒ GLib::Type

Register and return a GType for the api and associate it with tags.

Parameters:

  • api (String)

    an API to register

  • tags (Array<String>)

    tags for api

Returns:

  • (GLib::Type)

    a unique GType for api.

#meta_deserialize(buffer, data, size, consumed) ⇒ Gst::Meta

Recreate a Gst::Meta from serialized data returned by gst_meta_serialize() and add it to buffer.

Note that the meta must have been previously registered by calling one of gst_*_meta_get_info () functions.

consumed is set to the number of bytes that can be skipped from data to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, consumed is set to 0.

Parameters:

  • buffer (Gst::Buffer)

    a Gst::Buffer

  • data (Integer)

    serialization data obtained from gst_meta_serialize()

  • size (Integer)

    size of data

  • consumed (Integer)

    total size used by this meta, could be less than size

Returns:

  • (Gst::Meta)

    the metadata owned by buffer, or nil.

#meta_get_info(impl) ⇒ Gst::MetaInfo

Lookup a previously registered meta info structure by its implementation name impl. nil when no such metainfo exists.

Parameters:

  • impl (String)

    the name

Returns:

  • (Gst::MetaInfo)

    a Gst::MetaInfo with impl, or

#meta_info_new(api, impl, size) ⇒ Gst::MetaInfo

Creates a new structure that needs to be filled before being registered. This structure should filled and then registered with gst_meta_info_register().

Example:

const GstMetaInfo *
gst_my_meta_get_info (void)
{
  static const GstMetaInfo *meta_info = NULL;

  if (g_once_init_enter ((GstMetaInfo **) & meta_info)) {
    GstMetaInfo *info = gst_meta_info_new (
      gst_my_meta_api_get_type (),
        "GstMyMeta",
       sizeof (GstMyMeta));
    const GstMetaInfo *meta = NULL;

    info->init_func = my_meta_init;
    info->free_func = my_meta_free;
    info->transform_func = my_meta_transform;
    info->serialize_func = my_meta_serialize;
    info->deserialize_func = my_meta_deserialize;
    meta = gst_meta_info_register (info);
    g_once_init_leave ((GstMetaInfo **) & meta_info, (GstMetaInfo *) meta);
  }

  return meta_info;
}

Parameters:

  • api (GLib::Type)

    the type of the Gst::Meta API

  • impl (String)

    the name of the Gst::Meta implementation

  • size (Integer)

    the size of the Gst::Meta structure

Returns:

  • (Gst::MetaInfo)

    a new Gst::MetaInfo that needs to be filled

#meta_register(api, impl, size, init_func, free_func, transform_func) ⇒ Gst::MetaInfo

Register a new Gst::Meta implementation.

The same info can be retrieved later with gst_meta_get_info() by using impl as the key. access metadata.

Parameters:

  • api (GLib::Type)

    the type of the Gst::Meta API

  • impl (String)

    the name of the Gst::Meta implementation

  • size (Integer)

    the size of the Gst::Meta structure

  • init_func (Gst::MetaInitFunction)

    a Gst::MetaInitFunction

  • free_func (Gst::MetaFreeFunction)

    a Gst::MetaFreeFunction

  • transform_func (Gst::MetaTransformFunction)

    a Gst::MetaTransformFunction

Returns:

  • (Gst::MetaInfo)

    a Gst::MetaInfo that can be used to

#meta_register_custom(name, tags, transform_func, user_data, destroy_data) ⇒ Gst::MetaInfo

Register a new custom Gst::Meta implementation, backed by an opaque structure holding a Gst::Structure.

The registered info can be retrieved later with gst_meta_get_info() by using name as the key.

The backing Gst::Structure can be retrieved with gst_custom_meta_get_structure(), its mutability is conditioned by the writability of the buffer the meta is attached to.

When transform_func is nil, the meta and its backing Gst::Structure will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored. access metadata.

Parameters:

  • name (String)

    the name of the Gst::Meta implementation

  • tags (Array<String>)

    tags for api

  • transform_func (Gst::CustomMetaTransformFunction)

    a Gst::MetaTransformFunction

  • user_data (GObject)

    user data passed to transform_func

  • destroy_data (GLib::DestroyNotify)

    GDestroy::Notify for user_data

Returns:

  • (Gst::MetaInfo)

    a Gst::MetaInfo that can be used to

#meta_register_custom_simple(name) ⇒ Gst::MetaInfo

Simplified version of gst_meta_register_custom(), with no tags and no transform function.

Parameters:

  • name (String)

    the name of the Gst::Meta implementation

Returns:

  • (Gst::MetaInfo)

    a Gst::MetaInfo that can be used to access metadata.

#mini_object_replace(olddata, newdata) ⇒ Boolean

Atomically modifies a pointer to point to a new mini-object. The reference count of olddata is decreased and the reference count of newdata is increased.

Either newdata and the value pointed to by olddata may be nil.

Parameters:

  • olddata (Gst::MiniObject)

    pointer to a pointer to a mini-object to be replaced

  • newdata (Gst::MiniObject)

    pointer to new mini-object

Returns:

  • (Boolean)

    true if newdata was different from olddata

#mini_object_steal(olddata) ⇒ Gst::MiniObject

Replace the current Gst::MiniObject pointer to by olddata with nil and return the old value.

Parameters:

  • olddata (Gst::MiniObject)

    pointer to a pointer to a mini-object to be stolen

Returns:

  • (Gst::MiniObject)

    the Gst::MiniObject at oldata

#mini_object_take(olddata, newdata) ⇒ Boolean

Modifies a pointer to point to a new mini-object. The modification is done atomically. This version is similar to gst_mini_object_replace() except that it does not increase the refcount of newdata and thus takes ownership of newdata.

Either newdata and the value pointed to by olddata may be nil.

Parameters:

  • olddata (Gst::MiniObject)

    pointer to a pointer to a mini-object to be replaced

  • newdata (Gst::MiniObject)

    pointer to new mini-object

Returns:

  • (Boolean)

    true if newdata was different from olddata

#pad_mode_get_name(mode) ⇒ String

Return the name of a pad mode, for use in debug messages mostly.

Parameters:

Returns:

  • (String)

    short mnemonic for pad mode mode

#param_spec_array(name, nick, blurb, element_spec, flags) ⇒ GObject::ParamSpec

This function creates a GstArray GParamSpec for use by objects/elements that want to expose properties of GstArray type. This function is typically * used in connection with g_object_class_install_property() in a GObjects's instance_init function.

Parameters:

  • name (String)

    canonical name of the property specified

  • nick (String)

    nick name for the property specified

  • blurb (String)

    description of the property specified

  • element_spec (GObject::ParamSpec)

    GParamSpec of the array

  • flags (GObject::ParamFlags)

    flags for the property specified

Returns:

  • (GObject::ParamSpec)

    a newly created parameter specification

#param_spec_fraction(name, nick, blurb, min_num, min_denom, max_num, max_denom, default_num, default_denom, flags) ⇒ GObject::ParamSpec

This function creates a fraction GParamSpec for use by objects/elements that want to expose properties of fraction type. This function is typically used in connection with g_object_class_install_property() in a GObjects's instance_init function.

Parameters:

  • name (String)

    canonical name of the property specified

  • nick (String)

    nick name for the property specified

  • blurb (String)

    description of the property specified

  • min_num (Integer)

    minimum value (fraction numerator)

  • min_denom (Integer)

    minimum value (fraction denominator)

  • max_num (Integer)

    maximum value (fraction numerator)

  • max_denom (Integer)

    maximum value (fraction denominator)

  • default_num (Integer)

    default value (fraction numerator)

  • default_denom (Integer)

    default value (fraction denominator)

  • flags (GObject::ParamFlags)

    flags for the property specified

Returns:

  • (GObject::ParamSpec)

    a newly created parameter specification

#parent_buffer_meta_api_get_typeGLib::Type

Returns:

  • (GLib::Type)

#parent_buffer_meta_get_infoGst::MetaInfo

Gets the global Gst::MetaInfo describing the #GstParentBufferMeta meta.

Returns:

  • (Gst::MetaInfo)

    The Gst::MetaInfo

#parse_bin_from_description(bin_description, ghost_unlinked_pads) ⇒ Gst::Bin

This is a convenience wrapper around gst_parse_launch() to create a Gst::Bin from a gst-launch-style pipeline description. See gst_parse_launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unlinked source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unlinked source pads or multiple unlinked sink pads and want them all ghosted, you will have to create the ghost pads yourself).

Parameters:

  • bin_description (String)

    command line describing the bin

  • ghost_unlinked_pads (Boolean)

    whether to automatically create ghost pads for unlinked source or sink pads within the bin

Returns:

  • (Gst::Bin)

    a newly-created bin, or nil if an error occurred.

#parse_bin_from_description_full(bin_description, ghost_unlinked_pads, context, flags) ⇒ Gst::Element

This is a convenience wrapper around gst_parse_launch() to create a Gst::Bin from a gst-launch-style pipeline description. See gst_parse_launch() and the gst-launch man page for details about the syntax. Ghost pads on the bin for unlinked source or sink pads within the bin can automatically be created (but only a maximum of one ghost pad for each direction will be created; if you expect multiple unlinked source pads or multiple unlinked sink pads and want them all ghosted, you will have to create the ghost pads yourself).

Parameters:

  • bin_description (String)

    command line describing the bin

  • ghost_unlinked_pads (Boolean)

    whether to automatically create ghost pads for unlinked source or sink pads within the bin

  • context (Gst::ParseContext)

    a parse context allocated with gst_parse_context_new(), or nil

  • flags (Gst::ParseFlags)

    parsing options, or #GST_PARSE_FLAG_NONE

Returns:

  • (Gst::Element)

    a newly-created element, which is guaranteed to be a bin unless #GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or nil if an error occurred.

#parse_error_quarkGLib::Quark

Get the error quark used by the parsing subsystem.

Returns:

  • (GLib::Quark)

    the quark of the parse errors.

#parse_launch(pipeline_description) ⇒ Gst::Element

Create a new pipeline based on command line syntax. Please note that you might get a return value that is not nil even though the error is set. In this case there was a recoverable parsing error and you can try to play the pipeline.

To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description().

Parameters:

  • pipeline_description (String)

    the command line describing the pipeline

Returns:

  • (Gst::Element)

    a new element on success, nil on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a Gst::Pipeline, which than is returned.

#parse_launch_full(pipeline_description, context, flags) ⇒ Gst::Element

Create a new pipeline based on command line syntax. Please note that you might get a return value that is not nil even though the error is set. In this case there was a recoverable parsing error and you can try to play the pipeline.

To create a sub-pipeline (bin) for embedding into an existing pipeline use gst_parse_bin_from_description_full().

Parameters:

  • pipeline_description (String)

    the command line describing the pipeline

  • context (Gst::ParseContext)

    a parse context allocated with gst_parse_context_new(), or nil

  • flags (Gst::ParseFlags)

    parsing options, or #GST_PARSE_FLAG_NONE

Returns:

  • (Gst::Element)

    a new element on success, nil on failure. If more than one toplevel element is specified by the pipeline_description, all elements are put into a Gst::Pipeline, which then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put in a Gst::Bin instead).

#parse_launchv(argv) ⇒ Gst::Element

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed. on failure.

Parameters:

  • argv (Array<String>)

    null-terminated array of arguments

Returns:

#parse_launchv_full(argv, context, flags) ⇒ Gst::Element

Create a new element based on command line syntax. error will contain an error message if an erroneous pipeline is specified. An error does not mean that the pipeline could not be constructed.

Parameters:

  • argv (Array<String>)

    null-terminated array of arguments

  • context (Gst::ParseContext)

    a parse context allocated with gst_parse_context_new(), or nil

  • flags (Gst::ParseFlags)

    parsing options, or #GST_PARSE_FLAG_NONE

Returns:

  • (Gst::Element)

    a new element on success; on failure, either nil or a partially-constructed bin or element will be returned and error will be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in flags, then nil will always be returned on failure)

#plugin_error_quarkGLib::Quark

Get the error quark.

Returns:

  • (GLib::Quark)

    The error quark used in GError messages

#poll_new(controllable) ⇒ Gst::Poll

Create a new file descriptor set. If controllable, it is possible to restart or flush a call to gst_poll_wait() with gst_poll_restart() and gst_poll_set_flushing() respectively.

Free-function: gst_poll_free

Parameters:

  • controllable (Boolean)

    whether it should be possible to control a wait.

Returns:

  • (Gst::Poll)

    a new Gst::Poll, or nil in case of an error. Free with gst_poll_free().

#poll_new_timerGst::Poll

Create a new poll object that can be used for scheduling cancellable timeouts.

A timeout is performed with gst_poll_wait(). Multiple timeouts can be performed from different threads.

Free-function: gst_poll_free

Returns:

  • (Gst::Poll)

    a new Gst::Poll, or nil in case of an error. Free with gst_poll_free().

#preset_get_app_dirGst::filename

Gets the directory for application specific presets if set by the application. the string

Returns:

  • (Gst::filename)

    the directory or nil, don't free or modify

#preset_set_app_dir(app_dir) ⇒ Boolean

Sets an extra directory as an absolute path that should be considered when looking for presets. Any presets in the application dir will shadow the system presets.

Parameters:

  • app_dir (Gst::filename)

    the application specific preset dir

Returns:

  • (Boolean)

    true for success, false if the dir already has been set

Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.

This function will not append a new-line character at the end, unlike gst_println() which will.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_print() in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

  • format (String)

    a printf style format string

  • array (Array)

    the printf arguments for format

Returns:

  • (nil)

#printerr(format, array) ⇒ nil

Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.

This function will not append a new-line character at the end, unlike gst_printerrln() which will.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_printerr() in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

  • format (String)

    a printf style format string

  • array (Array)

    the printf arguments for format

Returns:

  • (nil)

#printerrln(format, array) ⇒ nil

Outputs a formatted message via the GLib error message handler. The default handler simply outputs the message to stderr.

This function will append a new-line character at the end, unlike gst_printerr() which will not.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_printerr() in that it supports the additional printf specifiers that are supported by GStreamer's debug logging system, such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

  • format (String)

    a printf style format string

  • array (Array)

    the printf arguments for format

Returns:

  • (nil)

#println(format, array) ⇒ nil

Outputs a formatted message via the GLib print handler. The default print handler simply outputs the message to stdout.

This function will append a new-line character at the end, unlike gst_print() which will not.

All strings must be in ASCII or UTF-8 encoding.

This function differs from g_print() in that it supports all the additional printf specifiers that are supported by GStreamer's debug logging system, such as #GST_PTR_FORMAT and #GST_SEGMENT_FORMAT.

This function is primarily for printing debug output.

Parameters:

  • format (String)

    a printf style format string

  • array (Array)

    the printf arguments for format

Returns:

  • (nil)

#protection_filter_systems_by_available_decryptors(system_identifiers) ⇒ Array<String>

Iterates the supplied list of UUIDs and checks the GstRegistry for all the decryptors supporting one of the supplied UUIDs. A null terminated array of strings that contains the UUID values of each protection system that is to be checked. A null terminated array containing all the system_identifiers supported by the set of available decryptors, or nil if no matches were found.

Parameters:

  • system_identifiers (Array<String>)

Returns:

  • (Array<String>)

#protection_meta_api_get_typeGLib::Type

Returns:

  • (GLib::Type)

#protection_meta_get_infoGst::MetaInfo

Returns:

  • (Gst::MetaInfo)

#protection_select_system(system_identifiers) ⇒ String

Iterates the supplied list of UUIDs and checks the GstRegistry for an element that supports one of the supplied UUIDs. If more than one element matches, the system ID of the highest ranked element is selected. that contains the UUID values of each protection system that is to be checked. system_identifiers that indicates the highest ranked element that implements the protection system indicated by that system ID, or nil if no element has been found.

Parameters:

  • system_identifiers (Array<String>)

    A null terminated array of strings

Returns:

  • (String)

    One of the strings from

#query_type_get_flags(type) ⇒ Gst::QueryTypeFlags

Gets the Gst::QueryTypeFlags associated with type.

Parameters:

Returns:

#query_type_get_name(type) ⇒ String

Get a printable name for the given query type. Do not modify or free.

Parameters:

Returns:

  • (String)

    a reference to the static name of the query.

#query_type_to_quark(type) ⇒ GLib::Quark

Get the unique quark for the given query type.

Parameters:

Returns:

  • (GLib::Quark)

    the quark associated with the query type

#reference_timestamp_meta_api_get_typeGLib::Type

Returns:

  • (GLib::Type)

#reference_timestamp_meta_get_infoGst::MetaInfo

Gets the global Gst::MetaInfo describing the #GstReferenceTimestampMeta meta.

Returns:

  • (Gst::MetaInfo)

    The Gst::MetaInfo

#resource_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#segtrap_is_enabledBoolean

Some functions in the GStreamer core might install a custom SIGSEGV handler to better catch and report errors to the application. Currently this feature is enabled by default when loading plugins.

Applications might want to disable this behaviour with the gst_segtrap_set_enabled() function. This is typically done if the application wants to install its own handler without GStreamer interfering.

Returns:

  • (Boolean)

    true if GStreamer is allowed to install a custom SIGSEGV handler.

#segtrap_set_enabled(enabled) ⇒ nil

Applications might want to disable/enable the SIGSEGV handling of the GStreamer core. See gst_segtrap_is_enabled() for more information.

Parameters:

  • enabled (Boolean)

    whether a custom SIGSEGV handler should be installed.

Returns:

  • (nil)

#state_change_get_name(transition) ⇒ String

Gets a string representing the given state transition.

Parameters:

Returns:

  • (String)

    a string with the name of the state result.

#static_caps_get_typeGLib::Type

Returns:

  • (GLib::Type)

#static_pad_template_get_typeGLib::Type

Returns:

  • (GLib::Type)

#stream_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#stream_type_get_name(stype) ⇒ String

Get a descriptive string for a given Gst::StreamType

Parameters:

Returns:

  • (String)

    A string describing the stream type

#structure_take(oldstr_ptr, newstr) ⇒ Boolean

Atomically modifies a pointer to point to a new structure. The Gst::Structure oldstr_ptr is pointing to is freed and newstr is taken ownership over.

Either newstr and the value pointed to by oldstr_ptr may be nil.

It is a programming error if both newstr and the value pointed to by oldstr_ptr refer to the same, non-nil structure.

Parameters:

Returns:

  • (Boolean)

    true if newstr was different from oldstr_ptr

#tag_exists(tag) ⇒ Boolean

Checks if the given type is already registered.

Parameters:

  • tag (String)

    name of the tag

Returns:

  • (Boolean)

    true if the type is already registered

#tag_get_description(tag) ⇒ String

Returns the human-readable description of this tag, You must not change or free this string.

Parameters:

  • tag (String)

    the tag

Returns:

  • (String)

    the human-readable description of this tag

#tag_get_flag(tag) ⇒ Gst::TagFlag

Gets the flag of tag.

Parameters:

  • tag (String)

    the tag

Returns:

#tag_get_nick(tag) ⇒ String

Returns the human-readable name of this tag, You must not change or free this string.

Parameters:

  • tag (String)

    the tag

Returns:

  • (String)

    the human-readable name of this tag

#tag_get_type(tag) ⇒ GLib::Type

Gets the #GType used for this tag.

Parameters:

  • tag (String)

    the tag

Returns:

  • (GLib::Type)

    the #GType of this tag

#tag_is_fixed(tag) ⇒ Boolean

Checks if the given tag is fixed. A fixed tag can only contain one value. Unfixed tags can contain lists of values.

Parameters:

  • tag (String)

    tag to check

Returns:

  • (Boolean)

    true, if the given tag is fixed.

#tag_list_copy_value(dest, list, tag) ⇒ Boolean

Copies the contents for the given tag into the value, merging multiple values into one if multiple values are associated with the tag. You must g_value_unset() the value after use.

Parameters:

  • dest (GObject::Value)

    uninitialized #GValue to copy into

  • list (Gst::TagList)

    list to get the tag from

  • tag (String)

    tag to read out

Returns:

  • (Boolean)

    true, if a value was copied, false if the tag didn't exist in the given list.

#tag_merge_strings_with_comma(dest, src) ⇒ nil

This is a convenience function for the func argument of gst_tag_register(). It concatenates all given strings using a comma. The tag must be registered as a G_TYPE_STRING or this function will fail.

Parameters:

  • dest (GObject::Value)

    uninitialized GValue to store result in

  • src (GObject::Value)

    GValue to copy from

Returns:

  • (nil)

#tag_merge_use_first(dest, src) ⇒ nil

This is a convenience function for the func argument of gst_tag_register(). It creates a copy of the first value from the list.

Parameters:

  • dest (GObject::Value)

    uninitialized GValue to store result in

  • src (GObject::Value)

    GValue to copy from

Returns:

  • (nil)

#tag_register(name, flag, type, nick, blurb, func) ⇒ nil

Registers a new tag type for the use with GStreamer's type system. If a type with that name is already registered, that one is used. The old registration may have used a different type however. So don't rely on your supplied values.

Important: if you do not supply a merge function the implication will be that there can only be one single value for this tag in a tag list and any additional values will silently be discarded when being added (unless #GST_TAG_MERGE_REPLACE, #GST_TAG_MERGE_REPLACE_ALL, or #GST_TAG_MERGE_PREPEND is used as merge mode, in which case the new value will replace the old one in the list).

The merge function will be called from gst_tag_list_copy_value() when it is required that one or more values for a tag be condensed into one single value. This may happen from gst_tag_list_get_string(), gst_tag_list_get_int(), gst_tag_list_get_double() etc. What will happen exactly in that case depends on how the tag was registered and if a merge function was supplied and if so which one.

Two default merge functions are provided: gst_tag_merge_use_first() and gst_tag_merge_strings_with_comma().

Parameters:

  • name (String)

    the name or identifier string

  • flag (Gst::TagFlag)

    a flag describing the type of tag info

  • type (GLib::Type)

    the type this data is in

  • nick (String)

    human-readable name

  • blurb (String)

    a human-readable description about this tag

  • func (Gst::TagMergeFunc)

    function for merging multiple values of this tag, or nil

Returns:

  • (nil)

#tag_register_static(name, flag, type, nick, blurb, func) ⇒ nil

Registers a new tag type for the use with GStreamer's type system.

Same as gst_tag_register(), but name, nick, and blurb must be static strings or inlined strings, as they will not be copied. (GStreamer plugins will be made resident once loaded, so this function can be used even from dynamically loaded plugins.)

Parameters:

  • name (String)

    the name or identifier string (string constant)

  • flag (Gst::TagFlag)

    a flag describing the type of tag info

  • type (GLib::Type)

    the type this data is in

  • nick (String)

    human-readable name or short description (string constant)

  • blurb (String)

    a human-readable description for this tag (string constant)

  • func (Gst::TagMergeFunc)

    function for merging multiple values of this tag, or nil

Returns:

  • (nil)

#toc_entry_type_get_nick(type) ⇒ String

Converts type to a string representation.

Parameters:

Returns:

  • (String)

    Returns a human-readable string for type. This string is only for debugging purpose and should not be displayed in a user interface.

#tracing_get_active_tracersGLib::List<Gst::Tracer>

Get a list of all active tracer objects owned by the tracing framework for the entirety of the run-time of the process or till gst_deinit() is called. Gst::Tracer objects

Returns:

#tracing_register_hook(tracer, detail, func) ⇒ nil

Register func to be called when the trace hook detail is getting invoked. Use nil for detail to register to all hooks.

Parameters:

  • tracer (Gst::Tracer)

    the tracer

  • detail (String)

    the detailed hook

  • func (GObject::Callback)

    the callback

Returns:

  • (nil)

#type_find_get_typeGLib::Type

Returns:

  • (GLib::Type)

#type_find_register(plugin, name, rank, func, extensions, possible_caps, data, data_notify) ⇒ Boolean

Registers a new typefind function to be used for typefinding. After registering this function will be available for typefinding. This function is typically called during an element's plugin initialization.

Parameters:

  • plugin (Gst::Plugin)

    A Gst::Plugin, or nil for a static typefind function

  • name (String)

    The name for registering

  • rank (Integer)

    The rank (or importance) of this typefind function

  • func (Gst::TypeFindFunction)

    The Gst::TypeFindFunction to use

  • extensions (String)

    Optional comma-separated list of extensions that could belong to this type

  • possible_caps (Gst::Caps)

    Optionally the caps that could be returned when typefinding succeeds

  • data (GObject)

    Optional user data. This user data must be available until the plugin is unloaded.

  • data_notify (GLib::DestroyNotify)

    a GDestroy::Notify that will be called on data when the plugin is unloaded.

Returns:

  • (Boolean)

    true on success, false otherwise

#type_is_plugin_api(type, flags) ⇒ Boolean

Checks if type is plugin API. See gst_type_mark_as_plugin_api() for details.

Parameters:

  • type (GLib::Type)

    a GType

  • flags (Gst::PluginAPIFlags)

    What Gst::PluginAPIFlags the plugin was marked with

Returns:

  • (Boolean)

    true if type is plugin API or false otherwise.

#type_mark_as_plugin_api(type, flags) ⇒ nil

Marks type as plugin API. This should be called in class_init of elements that expose new types (i.e. enums, flags or internal GObjects) via properties, signals or pad templates.

Types exposed by plugins are not automatically added to the documentation as they might originate from another library and should in that case be documented via that library instead.

By marking a type as plugin API it will be included in the documentation of the plugin that defines it.

Parameters:

  • type (GLib::Type)

    a GType

  • flags (Gst::PluginAPIFlags)

    a set of Gst::PluginAPIFlags to further inform cache generation.

Returns:

  • (nil)

#update_registryBoolean

Forces GStreamer to re-scan its plugin paths and update the default plugin registry.

Applications will almost never need to call this function, it is only useful if the application knows new plugins have been installed (or old ones removed) since the start of the application (or, to be precise, the first call to gst_init()) and the application wants to make use of any newly-installed plugins without restarting the application.

Applications should assume that the registry update is neither atomic nor thread-safe and should therefore not have any dynamic pipelines running (including the playbin and decodebin elements) and should also not create any elements or access the GStreamer registry while the update is in progress.

Note that this function may block for a significant amount of time.

Returns:

  • (Boolean)

    true if the registry has been updated successfully (does not imply that there were changes), otherwise false.

#uri_construct(protocol, location) ⇒ String

Constructs a URI for a given valid protocol and location.

Free-function: g_free

Parameters:

  • protocol (String)

    Protocol for URI

  • location (String)

    Location for URI

Returns:

  • (String)

    a new string for this URI.

#uri_error_quarkGLib::Quark

Returns:

  • (GLib::Quark)

#uri_from_string(uri) ⇒ Gst::Uri

Parses a URI string into a new Gst::Uri object. Will return NULL if the URI cannot be parsed.

Parameters:

  • uri (String)

    The URI string to parse.

Returns:

  • (Gst::Uri)

    A new Gst::Uri object, or NULL.

#uri_from_string_escaped(uri) ⇒ Gst::Uri

Parses a URI string into a new Gst::Uri object. Will return NULL if the URI cannot be parsed. This is identical to gst_uri_from_string() except that the userinfo and fragment components of the URI will not be unescaped while parsing.

Use this when you need to extract a username and password from the userinfo such as https://user:passwordexample.com since either may contain a URI-escaped ':' character. gst_uri_from_string() will unescape the entire userinfo component, which will make it impossible to know which ':' delineates the username and password.

The same applies to the fragment component of the URI, such as https://example.com/path#fragment which may contain a URI-escaped '#'.

Parameters:

  • uri (String)

    The URI string to parse.

Returns:

  • (Gst::Uri)

    A new Gst::Uri object, or NULL.

#uri_get_location(uri) ⇒ String

Extracts the location out of a given valid URI, ie. the protocol and "://" are stripped from the URI, which means that the location returned includes the hostname if one is specified. The returned string must be freed using g_free().

Free-function: g_free

Parameters:

  • uri (String)

    A URI string

Returns:

  • (String)

    the location for this URI. Returns nil if the URI isn't valid. If the URI does not contain a location, an empty string is returned.

#uri_get_protocol(uri) ⇒ String

Extracts the protocol out of a given valid URI. The returned string must be freed using g_free().

Parameters:

  • uri (String)

    A URI string

Returns:

  • (String)

    The protocol for this URI.

#uri_has_protocol(uri, protocol) ⇒ Boolean

Checks if the protocol of a given valid URI matches protocol.

Parameters:

  • uri (String)

    a URI string

  • protocol (String)

    a protocol string (e.g. "http")

Returns:

  • (Boolean)

    true if the protocol matches.

#uri_is_valid(uri) ⇒ Boolean

Tests if the given string is a valid URI identifier. URIs start with a valid scheme followed by ":" and maybe a string identifying the location.

Parameters:

  • uri (String)

    A URI string

Returns:

  • (Boolean)

    true if the string is a valid URI

#uri_join_strings(base_uri, ref_uri) ⇒ String

This is a convenience function to join two URI strings and return the result. The returned string should be g_free()'d after use.

Parameters:

  • base_uri (String)

    The percent-encoded base URI.

  • ref_uri (String)

    The percent-encoded reference URI to join to the base_uri.

Returns:

  • (String)

    A string representing the percent-encoded join of the two URIs.

#uri_protocol_is_supported(type, protocol) ⇒ Boolean

Checks if an element exists that supports the given URI protocol. Note that a positive return value does not imply that a subsequent call to gst_element_make_from_uri() is guaranteed to work.

Parameters:

  • type (Gst::URIType)

    Whether to check for a source or a sink

  • protocol (String)

    Protocol that should be checked for (e.g. "http" or "smb")

Returns:

  • (Boolean)

    true

#uri_protocol_is_valid(protocol) ⇒ Boolean

Tests if the given string is a valid protocol identifier. Protocols must consist of alphanumeric characters, '+', '-' and '.' and must start with a alphabetic character. See RFC 3986 Section 3.1.

Parameters:

  • protocol (String)

    A string

Returns:

  • (Boolean)

    true if the string is a valid protocol identifier, false otherwise.

#util_array_binary_search(array, num_elements, element_size, search_func, mode, search_data, user_data) ⇒ GObject

Searches inside array for search_data by using the comparison function search_func. array must be sorted ascending.

As search_data is always passed as second argument to search_func it's not required that search_data has the same type as the array elements.

The complexity of this search function is O(log (num_elements)). element or nil if nothing was found

Parameters:

  • array (GObject)

    the sorted input array

  • num_elements (Integer)

    number of elements in the array

  • element_size (Integer)

    size of every element in bytes

  • search_func (GLib::CompareDataFunc)

    function to compare two elements, search_data will always be passed as second argument

  • mode (Gst::SearchMode)

    search mode that should be used

  • search_data (GObject)

    element that should be found

  • user_data (GObject)

    data to pass to search_func

Returns:

  • (GObject)

    The address of the found

#util_ceil_log2(v) ⇒ Integer

Return a max num of log2.

Parameters:

  • v (Integer)

    a #guint32 value.

Returns:

  • (Integer)

    a computed #guint val.

#util_double_to_fraction(src, dest_n, dest_d) ⇒ nil

Transforms a #gdouble to a fraction and simplifies the result.

Parameters:

  • src (Float)

    #gdouble to transform

  • dest_n (Integer)

    pointer to a #gint to hold the result numerator

  • dest_d (Integer)

    pointer to a #gint to hold the result denominator

Returns:

  • (nil)

#util_dump_buffer(buf) ⇒ nil

Dumps the buffer memory into a hex representation. Useful for debugging.

Parameters:

  • buf (Gst::Buffer)

    a Gst::Buffer whose memory to dump

Returns:

  • (nil)

#util_dump_mem(mem, size) ⇒ nil

Dumps the memory block into a hex representation. Useful for debugging.

Parameters:

  • mem (Array<Integer>)

    a pointer to the memory to dump

  • size (Integer)

    the size of the memory block to dump

Returns:

  • (nil)

#util_filename_compare(a, b) ⇒ Integer

Compares the given filenames using natural ordering.

Parameters:

  • a (Gst::filename)

    a filename to compare with b

  • b (Gst::filename)

    a filename to compare with a

Returns:

  • (Integer)

#util_fraction_add(a_n, a_d, b_n, b_d, res_n, res_d) ⇒ Boolean

Adds the fractions a_n/a_d and b_n/b_d and stores the result in res_n and res_d.

Parameters:

  • a_n (Integer)

    Numerator of first value

  • a_d (Integer)

    Denominator of first value

  • b_n (Integer)

    Numerator of second value

  • b_d (Integer)

    Denominator of second value

  • res_n (Integer)

    Pointer to #gint to hold the result numerator

  • res_d (Integer)

    Pointer to #gint to hold the result denominator

Returns:

  • (Boolean)

    false on overflow, true otherwise.

#util_fraction_compare(a_n, a_d, b_n, b_d) ⇒ Integer

Compares the fractions a_n/a_d and b_n/b_d and returns -1 if a < b, 0 if a = b and 1 if a > b.

Parameters:

  • a_n (Integer)

    Numerator of first value

  • a_d (Integer)

    Denominator of first value

  • b_n (Integer)

    Numerator of second value

  • b_d (Integer)

    Denominator of second value

Returns:

  • (Integer)

    -1 if a < b; 0 if a = b; 1 if a > b.

#util_fraction_multiply(a_n, a_d, b_n, b_d, res_n, res_d) ⇒ Boolean

Multiplies the fractions a_n/a_d and b_n/b_d and stores the result in res_n and res_d.

Parameters:

  • a_n (Integer)

    Numerator of first value

  • a_d (Integer)

    Denominator of first value

  • b_n (Integer)

    Numerator of second value

  • b_d (Integer)

    Denominator of second value

  • res_n (Integer)

    Pointer to #gint to hold the result numerator

  • res_d (Integer)

    Pointer to #gint to hold the result denominator

Returns:

  • (Boolean)

    false on overflow, true otherwise.

#util_fraction_to_double(src_n, src_d, dest) ⇒ nil

Transforms a fraction to a #gdouble.

Parameters:

  • src_n (Integer)

    Fraction numerator as #gint

  • src_d (Integer)

    Fraction denominator #gint

  • dest (Float)

    pointer to a #gdouble for the result

Returns:

  • (nil)

#util_gdouble_to_guint64(value) ⇒ Integer

Returns value casted to #guint64.

Parameters:

  • value (Float)

    The #gdouble value to convert guint64 double

Returns:

  • (Integer)

    value casted to #guint64

#util_get_object_array(object, name, array) ⇒ Boolean

Get a property of type %GST_TYPE_ARRAY and transform it into a GValue::Array. This allow language bindings to get GST_TYPE_ARRAY properties which are otherwise not an accessible type.

Parameters:

  • object (GObject::Object)

    the object to set the array to

  • name (String)

    the name of the property to set

  • array (GObject::ValueArray)

    a return GValue::Array

Returns:

  • (Boolean)

#util_get_timestampGst::ClockTime

Get a timestamp as GstClockTime to be used for interval measurements. The timestamp should not be interpreted in any other way.

Returns:

  • (Gst::ClockTime)

    the timestamp

#util_greatest_common_divisor(a, b) ⇒ Integer

Calculates the greatest common divisor of a and b.

Parameters:

  • a (Integer)

    First value as #gint

  • b (Integer)

    Second value as #gint

Returns:

  • (Integer)

    Greatest common divisor of a and b

#util_greatest_common_divisor_int64(a, b) ⇒ Integer

Calculates the greatest common divisor of a and b.

Parameters:

  • a (Integer)

    First value as #gint64

  • b (Integer)

    Second value as #gint64

Returns:

  • (Integer)

    Greatest common divisor of a and b

#util_group_id_nextInteger

Return a constantly incrementing group id.

This function is used to generate a new group-id for the stream-start event.

This function never returns %GST_GROUP_ID_INVALID (which is 0) overflow back to 0 at some point.

Returns:

  • (Integer)

    A constantly incrementing unsigned integer, which might

#util_guint64_to_gdouble(value) ⇒ Float

Returns value casted to #gdouble.

Parameters:

  • value (Integer)

    The #guint64 value to convert to double

Returns:

  • (Float)

    value casted to #gdouble

#util_seqnum_compare(s1, s2) ⇒ Integer

Compare two sequence numbers, handling wraparound.

The current implementation just returns (gint32)(s1 - s2). positive number if s1 is after s2.

Parameters:

  • s1 (Integer)

    A sequence number.

  • s2 (Integer)

    Another sequence number.

Returns:

  • (Integer)

    A negative number if s1 is before s2, 0 if they are equal, or a

#util_seqnum_nextInteger

Return a constantly incrementing sequence number.

This function is used internally to GStreamer to be able to determine which events and messages are "the same". For example, elements may set the seqnum on a segment-done message to be the same as that of the last seek event, to indicate that event and the message correspond to the same segment.

This function never returns %GST_SEQNUM_INVALID (which is 0). overflow at some point. Use gst_util_seqnum_compare() to make sure you handle wraparound correctly.

Returns:

  • (Integer)

    A constantly incrementing 32-bit unsigned integer, which might

#util_set_object_arg(object, name, value) ⇒ nil

Converts the string value to the type of the objects argument and sets the argument with it.

Note that this function silently returns if object has no property named name or when value cannot be converted to the type of the property.

Parameters:

  • object (GObject::Object)

    the object to set the argument of

  • name (String)

    the name of the argument to set

  • value (String)

    the string value to set

Returns:

  • (nil)

#util_set_object_array(object, name, array) ⇒ Boolean

Transfer a GValue::Array to %GST_TYPE_ARRAY and set this value on the specified property name. This allow language bindings to set GST_TYPE_ARRAY properties which are otherwise not an accessible type.

Parameters:

  • object (GObject::Object)

    the object to set the array to

  • name (String)

    the name of the property to set

  • array (GObject::ValueArray)

    a GValue::Array containing the values

Returns:

  • (Boolean)

#util_set_value_from_string(value, value_str) ⇒ nil

Converts the string to the type of the value and sets the value with it.

Note that this function is dangerous as it does not return any indication if the conversion worked or not.

Parameters:

  • value (GObject::Value)

    the value to set

  • value_str (String)

    the string to get the value from

Returns:

  • (nil)

#util_simplify_fraction(numerator, denominator, n_terms, threshold) ⇒ nil

Calculates the simpler representation of numerator and denominator and update both values with the resulting simplified fraction.

Simplify a fraction using a simple continued fraction decomposition. The idea here is to convert fractions such as 333333/10000000 to 1/30 using 32 bit arithmetic only. The algorithm is not perfect and relies upon two arbitrary parameters to remove non-significative terms from the simple continued fraction decomposition. Using 8 and 333 for n_terms and threshold respectively seems to give nice results.

Parameters:

  • numerator (Integer)

    First value as #gint

  • denominator (Integer)

    Second value as #gint

  • n_terms (Integer)

    non-significative terms (typical value: 8)

  • threshold (Integer)

    threshold (typical value: 333)

Returns:

  • (nil)

#util_uint64_scale(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision.

This function can potentially be very slow if val and num are both greater than G_MAXUINT32. function returns G_MAXUINT64. If the result is not exactly representable as an integer it is truncated. See also gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().

Parameters:

  • val (Integer)

    the number to scale

  • num (Integer)

    the numerator of the scale ratio

  • denom (Integer)

    the denominator of the scale ratio

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#util_uint64_scale_ceil(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision.

This function can potentially be very slow if val and num are both greater than G_MAXUINT32. function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded up. See also gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().

Parameters:

  • val (Integer)

    the number to scale

  • num (Integer)

    the numerator of the scale ratio

  • denom (Integer)

    the denominator of the scale ratio

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#util_uint64_scale_int(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision. num must be non-negative and denom must be positive. function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is truncated. See also gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().

Parameters:

  • val (Integer)

    guint64 (such as a Gst::ClockTime) to scale.

  • num (Integer)

    numerator of the scale factor.

  • denom (Integer)

    denominator of the scale factor.

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#util_uint64_scale_int_ceil(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision. num must be non-negative and denom must be positive. function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded up. See also gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().

Parameters:

  • val (Integer)

    guint64 (such as a Gst::ClockTime) to scale.

  • num (Integer)

    numerator of the scale factor.

  • denom (Integer)

    denominator of the scale factor.

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#util_uint64_scale_int_round(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision. num must be non-negative and denom must be positive. function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded to the nearest integer (half-way cases are rounded up). See also gst_util_uint64_scale_int(), gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil().

Parameters:

  • val (Integer)

    guint64 (such as a Gst::ClockTime) to scale.

  • num (Integer)

    numerator of the scale factor.

  • denom (Integer)

    denominator of the scale factor.

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#util_uint64_scale_round(val, num, denom) ⇒ Integer

Scale val by the rational number num / denom, avoiding overflows and underflows and without loss of precision.

This function can potentially be very slow if val and num are both greater than G_MAXUINT32. function returns G_MAXUINT64. If the result is not exactly representable as an integer, it is rounded to the nearest integer (half-way cases are rounded up). See also gst_util_uint64_scale(), gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil().

Parameters:

  • val (Integer)

    the number to scale

  • num (Integer)

    the numerator of the scale ratio

  • denom (Integer)

    the denominator of the scale ratio

Returns:

  • (Integer)

    val * num / denom. In the case of an overflow, this

#value_can_compare(value1, value2) ⇒ Boolean

Determines if value1 and value2 can be compared.

Parameters:

  • value1 (GObject::Value)

    a value to compare

  • value2 (GObject::Value)

    another value to compare

Returns:

  • (Boolean)

    true if the values can be compared

#value_can_intersect(value1, value2) ⇒ Boolean

Determines if intersecting two values will produce a valid result. Two values will produce a valid intersection if they have the same type.

Parameters:

  • value1 (GObject::Value)

    a value to intersect

  • value2 (GObject::Value)

    another value to intersect

Returns:

  • (Boolean)

    true if the values can intersect

#value_can_subtract(minuend, subtrahend) ⇒ Boolean

Checks if it's possible to subtract subtrahend from minuend.

Parameters:

  • minuend (GObject::Value)

    the value to subtract from

  • subtrahend (GObject::Value)

    the value to subtract

Returns:

  • (Boolean)

    true if a subtraction is possible

#value_can_union(value1, value2) ⇒ Boolean

Determines if value1 and value2 can be non-trivially unioned. Any two values can be trivially unioned by adding both of them to a GstValueList. However, certain types have the possibility to be unioned in a simpler way. For example, an integer range and an integer can be unioned if the integer is a subset of the integer range. If there is the possibility that two values can be unioned, this function returns true. be unioned.

Parameters:

  • value1 (GObject::Value)

    a value to union

  • value2 (GObject::Value)

    another value to union

Returns:

  • (Boolean)

    true if there is a function allowing the two values to

#value_compare(value1, value2) ⇒ Integer

Compares value1 and value2. If value1 and value2 cannot be compared, the function returns GST_VALUE_UNORDERED. Otherwise, if value1 is greater than value2, GST_VALUE_GREATER_THAN is returned. If value1 is less than value2, GST_VALUE_LESS_THAN is returned. If the values are equal, GST_VALUE_EQUAL is returned.

Parameters:

  • value1 (GObject::Value)

    a value to compare

  • value2 (GObject::Value)

    another value to compare

Returns:

  • (Integer)

    comparison result

#value_deserialize(dest, src) ⇒ Boolean

Tries to deserialize a string into the type specified by the given GValue. If the operation succeeds, true is returned, false otherwise.

Parameters:

  • dest (GObject::Value)

    #GValue to fill with contents of deserialization

  • src (String)

    string to deserialize

Returns:

  • (Boolean)

    true on success

#value_deserialize_with_pspec(dest, src, pspec) ⇒ Boolean

Tries to deserialize a string into the type specified by the given GValue. pspec may be used to guide the deserializing of nested members. If the operation succeeds, true is returned, false otherwise.

Parameters:

  • dest (GObject::Value)

    #GValue to fill with contents of deserialization

  • src (String)

    string to deserialize

  • pspec (GObject::ParamSpec)

    the GParam::Spec describing the expected value

Returns:

  • (Boolean)

    true on success

#value_fixate(dest, src) ⇒ Boolean

Fixate src into a new value dest. For ranges, the first element is taken. For lists and arrays, the first item is fixated and returned. If src is already fixed, this function returns false.

Parameters:

  • dest (GObject::Value)

    the #GValue destination

  • src (GObject::Value)

    the #GValue to fixate

Returns:

  • (Boolean)

    true if dest contains a fixated version of src.

#value_fraction_multiply(product, factor1, factor2) ⇒ Boolean

Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets product to the product of the two fractions.

Parameters:

  • product (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

  • factor1 (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

  • factor2 (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

Returns:

  • (Boolean)

    false in case of an error (like integer overflow), true otherwise.

#value_fraction_subtract(dest, minuend, subtrahend) ⇒ Boolean

Subtracts the subtrahend from the minuend and sets dest to the result.

Parameters:

  • dest (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

  • minuend (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

  • subtrahend (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

Returns:

  • (Boolean)

    false in case of an error (like integer overflow), true otherwise.

#value_get_bitmask(value) ⇒ Integer

Gets the bitmask specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_BITMASK

Returns:

  • (Integer)

    the bitmask.

#value_get_caps(value) ⇒ Gst::Caps

Gets the contents of value. The reference count of the returned Gst::Caps will not be modified, therefore the caller must take one before getting rid of the value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_CAPS

Returns:

#value_get_caps_features(value) ⇒ Gst::CapsFeatures

Gets the contents of value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_CAPS_FEATURES

Returns:

  • (Gst::CapsFeatures)

    the contents of value

#value_get_double_range_max(value) ⇒ Float

Gets the maximum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_DOUBLE_RANGE

Returns:

  • (Float)

    the maximum of the range

#value_get_double_range_min(value) ⇒ Float

Gets the minimum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_DOUBLE_RANGE

Returns:

  • (Float)

    the minimum of the range

#value_get_flagset_flags(value) ⇒ Integer

Retrieve the flags field of a GstFlagSet value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_FLAG_SET

Returns:

  • (Integer)

    the flags field of the flagset instance.

#value_get_flagset_mask(value) ⇒ Integer

Retrieve the mask field of a GstFlagSet value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_FLAG_SET

Returns:

  • (Integer)

    the mask field of the flagset instance.

#value_get_fraction_denominator(value) ⇒ Integer

Gets the denominator of the fraction specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

Returns:

  • (Integer)

    the denominator of the fraction.

#value_get_fraction_numerator(value) ⇒ Integer

Gets the numerator of the fraction specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

Returns:

  • (Integer)

    the numerator of the fraction.

#value_get_fraction_range_max(value) ⇒ GObject::Value

Gets the maximum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_FRACTION_RANGE

Returns:

  • (GObject::Value)

    the maximum of the range

#value_get_fraction_range_min(value) ⇒ GObject::Value

Gets the minimum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_FRACTION_RANGE

Returns:

  • (GObject::Value)

    the minimum of the range

#value_get_int64_range_max(value) ⇒ Integer

Gets the maximum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT64_RANGE

Returns:

  • (Integer)

    the maximum of the range

#value_get_int64_range_min(value) ⇒ Integer

Gets the minimum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT64_RANGE

Returns:

  • (Integer)

    the minimum of the range

#value_get_int64_range_step(value) ⇒ Integer

Gets the step of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT64_RANGE

Returns:

  • (Integer)

    the step of the range

#value_get_int_range_max(value) ⇒ Integer

Gets the maximum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT_RANGE

Returns:

  • (Integer)

    the maximum of the range

#value_get_int_range_min(value) ⇒ Integer

Gets the minimum of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT_RANGE

Returns:

  • (Integer)

    the minimum of the range

#value_get_int_range_step(value) ⇒ Integer

Gets the step of the range specified by value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT_RANGE

Returns:

  • (Integer)

    the step of the range

#value_get_structure(value) ⇒ Gst::Structure

Gets the contents of value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_STRUCTURE

Returns:

#value_init_and_copy(dest, src) ⇒ nil

Initialises the target value to be of the same type as source and then copies the contents from source to target.

Parameters:

  • dest (GObject::Value)

    the target value

  • src (GObject::Value)

    the source value

Returns:

  • (nil)

#value_intersect(dest, value1, value2) ⇒ Boolean

Calculates the intersection of two values. If the values have a non-empty intersection, the value representing the intersection is placed in dest, unless nil. If the intersection is non-empty, dest is not modified.

Parameters:

  • dest (GObject::Value)

    a uninitialized #GValue that will hold the calculated intersection value. May be nil if the resulting set if not needed.

  • value1 (GObject::Value)

    a value to intersect

  • value2 (GObject::Value)

    another value to intersect

Returns:

  • (Boolean)

    true if the intersection is non-empty

#value_is_fixed(value) ⇒ Boolean

Tests if the given GValue, if available in a GstStructure (or any other container) contains a "fixed" (which means: one value) or an "unfixed" (which means: multiple possible values, such as data lists or data ranges) value.

Parameters:

  • value (GObject::Value)

    the #GValue to check

Returns:

  • (Boolean)

    true if the value is "fixed".

#value_is_subset(value1, value2) ⇒ Boolean

Check that value1 is a subset of value2.

Parameters:

  • value1 (GObject::Value)

    a #GValue

  • value2 (GObject::Value)

    a #GValue

Returns:

  • (Boolean)

    true is value1 is a subset of value2

#value_register(table) ⇒ nil

Registers functions to perform calculations on #GValue items of a given type. Each type can only be added once.

Parameters:

  • table (Gst::ValueTable)

    structure containing functions to register

Returns:

  • (nil)

#value_serialize(value) ⇒ String

tries to transform the given value into a string representation that allows getting back this string later on using gst_value_deserialize().

Free-function: g_free or nil if none exists

Parameters:

  • value (GObject::Value)

    a #GValue to serialize

Returns:

  • (String)

    the serialization for value

#value_set_bitmask(value, bitmask) ⇒ nil

Sets value to the bitmask specified by bitmask.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_BITMASK

  • bitmask (Integer)

    the bitmask

Returns:

  • (nil)

#value_set_caps(value, caps) ⇒ nil

Sets the contents of value to caps. A reference to the provided caps will be taken by the value.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_CAPS

  • caps (Gst::Caps)

    the caps to set the value to

Returns:

  • (nil)

#value_set_caps_features(value, features) ⇒ nil

Sets the contents of value to features.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_CAPS_FEATURES

  • features (Gst::CapsFeatures)

    the features to set the value to

Returns:

  • (nil)

#value_set_double_range(value, start, end) ⇒ nil

Sets value to the range specified by start and end.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_DOUBLE_RANGE

  • start (Float)

    the start of the range

  • end (Float)

    the end of the range

Returns:

  • (nil)

#value_set_flagset(value, flags, mask) ⇒ nil

Sets value to the flags and mask values provided in flags and mask. The flags value indicates the values of flags, the mask represents which bits in the flag value have been set, and which are "don't care"

Parameters:

  • value (GObject::Value)

    a GValue initialized to %GST_TYPE_FLAG_SET

  • flags (Integer)

    The value of the flags set or unset

  • mask (Integer)

    The mask indicate which flags bits must match for comparisons

Returns:

  • (nil)

#value_set_fraction(value, numerator, denominator) ⇒ nil

Sets value to the fraction specified by numerator over denominator. The fraction gets reduced to the smallest numerator and denominator, and if necessary the sign is moved to the numerator.

Parameters:

  • value (GObject::Value)

    a GValue initialized to #GST_TYPE_FRACTION

  • numerator (Integer)

    the numerator of the fraction

  • denominator (Integer)

    the denominator of the fraction

Returns:

  • (nil)

#value_set_fraction_range(value, start, end) ⇒ nil

Sets value to the range specified by start and end.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_FRACTION_RANGE

  • start (GObject::Value)

    the start of the range (a GST_TYPE_FRACTION GValue)

  • end (GObject::Value)

    the end of the range (a GST_TYPE_FRACTION GValue)

Returns:

  • (nil)

#value_set_fraction_range_full(value, numerator_start, denominator_start, numerator_end, denominator_end) ⇒ nil

Sets value to the range specified by numerator_start/denominator_start and numerator_end/denominator_end.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_FRACTION_RANGE

  • numerator_start (Integer)

    the numerator start of the range

  • denominator_start (Integer)

    the denominator start of the range

  • numerator_end (Integer)

    the numerator end of the range

  • denominator_end (Integer)

    the denominator end of the range

Returns:

  • (nil)

#value_set_int64_range(value, start, end) ⇒ nil

Sets value to the range specified by start and end.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT64_RANGE

  • start (Integer)

    the start of the range

  • end (Integer)

    the end of the range

Returns:

  • (nil)

#value_set_int64_range_step(value, start, end, step) ⇒ nil

Sets value to the range specified by start, end and step.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT64_RANGE

  • start (Integer)

    the start of the range

  • end (Integer)

    the end of the range

  • step (Integer)

    the step of the range

Returns:

  • (nil)

#value_set_int_range(value, start, end) ⇒ nil

Sets value to the range specified by start and end.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT_RANGE

  • start (Integer)

    the start of the range

  • end (Integer)

    the end of the range

Returns:

  • (nil)

#value_set_int_range_step(value, start, end, step) ⇒ nil

Sets value to the range specified by start, end and step.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_INT_RANGE

  • start (Integer)

    the start of the range

  • end (Integer)

    the end of the range

  • step (Integer)

    the step of the range

Returns:

  • (nil)

#value_set_structure(value, structure) ⇒ nil

Sets the contents of value to structure.

Parameters:

  • value (GObject::Value)

    a GValue initialized to GST_TYPE_STRUCTURE

  • structure (Gst::Structure)

    the structure to set the value to

Returns:

  • (nil)

#value_subtract(dest, minuend, subtrahend) ⇒ Boolean

Subtracts subtrahend from minuend and stores the result in dest. Note that this means subtraction as in sets, not as in mathematics.

Parameters:

  • dest (GObject::Value)

    the destination value for the result if the subtraction is not empty. May be nil, in which case the resulting set will not be computed, which can give a fair speedup.

  • minuend (GObject::Value)

    the value to subtract from

  • subtrahend (GObject::Value)

    the value to subtract

Returns:

  • (Boolean)

    true if the subtraction is not empty

#value_union(dest, value1, value2) ⇒ Boolean

Creates a GValue corresponding to the union of value1 and value2.

Parameters:

  • dest (GObject::Value)

    the destination value

  • value1 (GObject::Value)

    a value to union

  • value2 (GObject::Value)

    another value to union

Returns:

  • (Boolean)

    true if the union succeeded.

#version(major, minor, micro, nano) ⇒ nil

Gets the version number of the GStreamer library.

Parameters:

  • major (Integer)

    pointer to a guint to store the major version number

  • minor (Integer)

    pointer to a guint to store the minor version number

  • micro (Integer)

    pointer to a guint to store the micro version number

  • nano (Integer)

    pointer to a guint to store the nano version number

Returns:

  • (nil)

#version_stringString

This function returns a string that is useful for describing this version of GStreamer to the outside world: user agent strings, logging, ...

Returns:

  • (String)

    a newly allocated string describing this version of GStreamer.