gst.c.types

C types for gst1 library

alias GstBufferForeachMetaFunc GstBufferListFunc GstBufferMapInfo GstBusFunc GstBusSyncHandler GstCapsFilterMapFunc GstCapsForeachFunc GstCapsMapFunc GstClockCallback GstClockID GstClockTime GstClockTimeDiff GstControlBindingConvert GstControlSourceGetValue GstControlSourceGetValueArray GstCustomMetaTransformFunction GstDebugFuncPtr GstElementCallAsyncFunc GstElementFactoryListType GstElementForeachPadFunc GstIteratorCopyFunction GstIteratorFoldFunction GstIteratorForeachFunction GstIteratorFreeFunction GstIteratorItemFunction GstIteratorNextFunction GstIteratorResyncFunction GstLogFunction GstMemoryCopyFunction GstMemoryIsSpanFunction GstMemoryMapFullFunction GstMemoryMapFunction GstMemoryMapInfo GstMemoryShareFunction GstMemoryUnmapFullFunction GstMemoryUnmapFunction GstMetaClearFunction GstMetaDeserializeFunction GstMetaFreeFunction GstMetaInitFunction GstMetaSerializeFunction GstMetaTransformFunction GstMiniObjectCopyFunction GstMiniObjectDisposeFunction GstMiniObjectFreeFunction GstMiniObjectNotify GstPadActivateFunction GstPadActivateModeFunction GstPadChainFunction GstPadChainListFunction GstPadEventFullFunction GstPadEventFunction GstPadForwardFunction GstPadGetRangeFunction GstPadIterIntLinkFunction GstPadLinkFunction GstPadProbeCallback GstPadQueryFunction GstPadStickyEventsForeachFunction GstPadUnlinkFunction GstPluginFeatureFilter GstPluginFilter GstPluginInitFullFunc GstPluginInitFunc GstPromiseChangeFunc GstStructureFilterMapFunc GstStructureForeachFunc GstStructureMapFunc GstTagForeachFunc GstTagMergeFunc GstTaskFunction GstTaskPoolFunction GstTaskThreadFunc GstTypeFindFunction GstValueCompareFunc GstValueDeserializeFunc GstValueDeserializeWithPSpecFunc GstValueSerializeFunc
struct GstAllocationParams GstAllocator GstAllocatorClass GstAllocatorPrivate GstAtomicQueue GstBin GstBinClass GstBinPrivate GstBitmask GstBuffer GstBufferList GstBufferPool GstBufferPoolAcquireParams GstBufferPoolClass GstBufferPoolPrivate GstBus GstBusClass GstBusPrivate GstByteArrayInterface GstCaps GstCapsFeatures GstChildProxy GstChildProxyInterface GstClock GstClockClass GstClockEntry GstClockPrivate GstContext GstControlBinding GstControlBindingClass GstControlBindingPrivate GstControlSource GstControlSourceClass GstCustomMeta GstDateTime GstDebugCategory GstDebugMessage GstDevice GstDeviceClass GstDeviceMonitor GstDeviceMonitorClass GstDeviceMonitorPrivate GstDevicePrivate GstDeviceProvider GstDeviceProviderClass GstDeviceProviderFactory GstDeviceProviderFactoryClass GstDeviceProviderPrivate GstDoubleRange GstDynamicTypeFactory GstDynamicTypeFactoryClass GstElement GstElementClass GstElementFactory GstElementFactoryClass GstEvent GstFlagSet GstFormatDefinition GstFraction GstFractionRange GstGhostPad GstGhostPadClass GstGhostPadPrivate GstInt64Range GstIntRange GstIterator GstMapInfo GstMemory GstMessage GstMeta GstMetaInfo GstMetaTransformCopy GstMiniObject GstObject GstObjectClass GstPad GstPadClass GstPadPrivate GstPadProbeInfo GstPadTemplate GstPadTemplateClass GstParamArray GstParamFraction GstParamSpecArray GstParamSpecFraction GstParentBufferMeta GstParseContext GstPipeline GstPipelineClass GstPipelinePrivate GstPlugin GstPluginClass GstPluginDesc GstPluginFeature GstPluginFeatureClass GstPoll GstPollFD GstPreset GstPresetInterface GstPromise GstProtectionMeta GstProxyPad GstProxyPadClass GstProxyPadPrivate GstQuery GstReferenceTimestampMeta GstRegistry GstRegistryClass GstRegistryPrivate GstSample GstSegment GstSharedTaskPool GstSharedTaskPoolClass GstSharedTaskPoolPrivate GstStaticCaps GstStaticPadTemplate GstStream GstStreamClass GstStreamCollection GstStreamCollectionClass GstStreamCollectionPrivate GstStreamPrivate GstStructure GstSystemClock GstSystemClockClass GstSystemClockPrivate GstTagList GstTagSetter GstTagSetterInterface GstTask GstTaskClass GstTaskPool GstTaskPoolClass GstTaskPrivate GstTimedValue GstToc GstTocEntry GstTocSetter GstTocSetterInterface GstTracer GstTracerClass GstTracerFactory GstTracerFactoryClass GstTracerPrivate GstTracerRecord GstTracerRecordClass GstTypeFind GstTypeFindFactory GstTypeFindFactoryClass GstUri GstURIHandler GstURIHandlerInterface GstValueArray GstValueList GstValueTable

Types 318

Alias for #GstMapInfo to be used with g_auto():

void my_func(GstBuffer *buf)
{
 g_auto(GstBufferMapInfo) map = GST_MAP_INFO_INIT;
 if (!gst_buffer_map(buf, &map, GST_MAP_READWRITE))
   return;
 ...
 // No need to call gst_buffer_unmap()
}

#GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using [gst.buffer.Buffer.unmap] or [gst.memory.Memory.unmap].

See also #GstMemoryMapInfo.

aliasGstClockID = void *

A datatype to hold the handle to an outstanding sync or async clock callback.

aliasGstClockTime = ulong

A datatype to hold a time, measured in nanoseconds.

aliasGstClockTimeDiff = long

A datatype to hold a time difference, measured in nanoseconds.

A type defining the type of an element factory.

Alias for #GstMapInfo to be used with g_auto():

void my_func(GstMemory *mem)
{
 g_auto(GstMemoryMapInfo) map = GST_MAP_INFO_INIT;
 if (!gst_memory_map(mem, &map, GST_MAP_READWRITE))
   return;
 ...
 // No need to call gst_memory_unmap()
}

#GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using [gst.buffer.Buffer.unmap] or [gst.memory.Memory.unmap].

See also #GstBufferMapInfo.

Flags for allocators.

CustomAlloc = 16The allocator has a custom alloc function. Only elements designed to work with this allocator should be using it, other elements should ignore it from allocation propositions. This implies [gst.typ...
NoCopy = 32When copying a #GstMemory allocated with this allocator, the copy will instead be allocated using the default allocator. Use this when allocating a new memory is an heavy opperation that should onl...
Last = 1048576first flag that can be used for custom purposes
enumGstBinFlags : uint

GstBinFlags are a set of flags specific to bins. Most are set/used internally. They can be checked using the GST_OBJECT_FLAG_IS_SET() macro, and (un)set using GST_OBJECT_FLAG_SET() and GST_OBJECT_FLAG_UNSET().

NoResync = 16384Don't resync a state change when elements are added or linked in the bin
StreamsAware = 32768Indicates whether the bin can handle elements that add/remove source pads at any point in time without first posting a no-more-pads signal.
Last = 524288The last enum in the series of flags for bins. Derived classes can use this as first value in a list of flags.

A set of flags that can be provided to the [gst.buffer.Buffer.copyInto] function to specify which items should be copied.

None = 0copy nothing
Flags = 1flag indicating that buffer flags should be copied
Timestamps = 2flag indicating that buffer pts, dts, duration, offset and offset_end should be copied
Meta = 4flag indicating that buffer meta should be copied
Memory = 8flag indicating that buffer memory should be reffed and appended to already existing memory. Unless the memory is marked as NOSHARE, no actual copy of the memory is made but it is simply reffed. Ad...
Merge = 16flag indicating that buffer memory should be merged
Deep = 32flag indicating that memory should always be copied instead of reffed
enumGstBufferFlags : uint

A set of buffer flags used to describe properties of a #GstBuffer.

Live = 16the buffer is live data and should be discarded in the PAUSED state.
DecodeOnly = 32the buffer contains data that should be dropped because it will be clipped against the segment boundaries or because it does not contain data that should be shown to the user.
Discont = 64the buffer marks a data discontinuity in the stream. This typically occurs after a seek or a dropped buffer from a live or network source.
Resync = 128the buffer timestamps might have a discontinuity and this buffer is a good point to resynchronize.
Corrupted = 256the buffer data is corrupted.
Marker = 512the buffer contains a media specific marker. for video this is the end of a frame boundary, for audio this is the start of a talkspurt. for RTP packets this matches the marker flag in the RTP packe...
Header = 1024the buffer contains header information that is needed to decode the following data.
Gap = 2048the buffer has been created to fill a gap in the stream and contains media neutral data (elements can switch to optimized code path that ignores the buffer content).
Droppable = 4096the buffer can be dropped without breaking the stream, for example to reduce bandwidth.
DeltaUnit = 8192this unit cannot be decoded independently.
TagMemory = 16384this flag is set when memory of the buffer is added/removed
SyncAfter = 32768Elements which write to disk or permanent storage should ensure the data is synced after writing the contents of this buffer.
NonDroppable = 65536This buffer is important and should not be dropped.
Last = 1048576additional media specific flags can be added starting from this flag.

Additional flags to control the allocation of a buffer

None = 0no flags
KeyUnit = 1buffer is keyframe
Dontwait = 2when the bufferpool is empty, acquirebuffer will by default block until a buffer is released into the pool again. Setting this flag makes acquirebuffer return #GSTFLOWEOS instead of blocking.
Discont = 4buffer is discont
Last = 65536last flag, subclasses can use private flags starting from this value.

The different types of buffering methods.

Stream = 0a small amount of data is buffered
Download = 1the stream is being downloaded
Timeshift = 2the stream is being downloaded in a ringbuffer
Live = 3the stream is a live stream
enumGstBusFlags : uint

The standard flags that a bus may have.

Flushing = 16The bus is currently dropping all messages
FlagLast = 32offset to define more flags

The result values for a GstBusSyncHandler.

Drop = 0drop the message
Pass = 1pass the message to the async queue
Async = 2pass message to async queue, continue if message is handled
enumGstCapsFlags : uint

Extra flags for a caps.

Any = 16Caps has no specific content, but can contain anything.

Modes of caps intersection

[gst.types.CapsIntersectMode.ZigZag] tries to preserve overall order of both caps by iterating on the caps' structures as the following matrix shows:

caps1
     +-------------
     | 1  2  4  7
caps2 | 3  5  8 10
     | 6  9 11 12

Used when there is no explicit precedence of one caps over the other. e.g. tee's sink pad getcaps function, it will probe its src pad peers' for their caps and intersect them with this mode.

[gst.types.CapsIntersectMode.First] is useful when an element wants to preserve another element's caps priority order when intersecting with its own caps. Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result would be [A, B], maintaining the first caps priority on the intersection.

ZigZag = 0Zig-zags over both caps.
First = 1Keeps the first caps order.

The type of the clock entry

Single = 0a single shot timeout
Periodic = 1a periodic timeout request
enumGstClockFlags : uint

The capabilities of this clock

CanDoSingleSync = 16clock can do a single sync timeout request
CanDoSingleAsync = 32clock can do a single async timeout request
CanDoPeriodicSync = 64clock can do sync periodic timeout requests
CanDoPeriodicAsync = 128clock can do async periodic timeout callbacks
CanSetResolution = 256clock's resolution can be changed
CanSetMaster = 512clock can be slaved to a master clock
NeedsStartupSync = 1024clock needs to be synced before it can be used
Last = 4096subclasses can add additional flags starting from this flag

The return value of a clock operation.

Ok = 0The operation succeeded.
Early = 1The operation was scheduled too late.
Unscheduled = 2The clockID was unscheduled
Busy = 3The ClockID is busy
Badtime = 4A bad time was provided to a function.
Error = 5An error occurred
Unsupported = 6Operation is not supported
Done = 7The ClockID is done waiting

The different kind of clocks.

Realtime = 0time since Epoch
Monotonic = 1monotonic time since some unspecified starting point
Other = 2some other time source is used (Since: 1.0.5)
Tai = 3time since Epoch, but using International Atomic Time as reference (Since: 1.18)

Core errors are errors inside the core GStreamer library.

Failed = 1a general error which doesn't fit in any other category. Make sure you add a custom message to the error call.
TooLazy = 2do not use this except as a placeholder for deciding where to go while developing code.
NotImplemented = 3use this when you do not want to implement this functionality yet.
StateChange = 4used for state change errors.
Pad = 5used for pad-related errors.
Thread = 6used for thread-related errors.
Negotiation = 7used for negotiation-related errors.
Event = 8used for event-related errors.
Seek = 9used for seek-related errors.
Caps = 10used for caps-related errors.
Tag = 11used for negotiation-related errors.
MissingPlugin = 12used if a plugin is missing.
Clock = 13used for clock related errors.
Disabled = 14used if functionality has been disabled at compile time.
NumErrors = 15the number of core error types.

These are some terminal style flags you can use when creating your debugging categories to make them stand out in debugging output.

FgBlack = 0Use black as foreground color.
FgRed = 1Use red as foreground color.
FgGreen = 2Use green as foreground color.
FgYellow = 3Use yellow as foreground color.
FgBlue = 4Use blue as foreground color.
FgMagenta = 5Use magenta as foreground color.
FgCyan = 6Use cyan as foreground color.
FgWhite = 7Use white as foreground color.
BgBlack = 0Use black as background color.
BgRed = 16Use red as background color.
BgGreen = 32Use green as background color.
BgYellow = 48Use yellow as background color.
BgBlue = 64Use blue as background color.
BgMagenta = 80Use magenta as background color.
BgCyan = 96Use cyan as background color.
BgWhite = 112Use white as background color.
Bold = 256Make the output bold.
Underline = 512Underline the output.
Off = 0Do not use colors in logs.
On = 1Paint logs in a platform-specific way.
Unix = 2Paint logs with UNIX terminal color codes no matter what platform GStreamer is running on.

Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS().

MediaType = 1show caps-name on edges
CapsDetails = 2show caps-details on edges
NonDefaultParams = 4show modified parameters on elements
States = 8show element states
FullParams = 16show full element parameter values even if they are very long
All = 15show all the typical details that one might want
Verbose = 4294967295show all details regardless of how large or verbose they make the resulting output

The level defines the importance of a debugging message. The more important a message is, the greater the probability that the debugging system outputs it.

None = 0No debugging level specified or desired. Used to deactivate debugging output.
Error = 1Error messages are to be used only when an error occurred that stops the application from keeping working correctly. An examples is gstelementerror, which outputs a message with this priority. It d...
Warning = 2Warning messages are to inform about abnormal behaviour that could lead to problems or weird behaviour later on. An example of this would be clocking issues ("your computer is pretty slow") or brok...
Fixme = 3Fixme messages are messages that indicate that something in the executed code path is not fully implemented or handled yet. Note that this does not replace proper error handling in any way, the pur...
Info = 4Informational messages should be used to keep the developer updated about what is happening. Examples where this should be used are when a typefind function has successfully determined the type of ...
Debug = 5Debugging messages should be used when something common happens that is not the expected default behavior, or something that's useful to know but doesn't happen all the time (ie. per loop iteration...
Log = 6Log messages are messages that are very common but might be useful to know. As a rule of thumb a pipeline that is running as expected should never output anything else but LOG messages whilst proce...
Trace = 7Tracing-related messages. Examples for this are referencing/dereferencing of objects.
Memdump = 9memory dump messages are used to log (small) chunks of data as memory dumps in the log. They will be displayed as hexdump with ASCII characters.
Count = 10The number of defined debugging levels.
enumGstElementFlags : uint

The standard flags that an element may have.

LockedState = 16ignore state changes from parent
Sink = 32the element is a sink
Source = 64the element is a source.
ProvideClock = 128the element can provide a clock
RequireClock = 256the element requires a clock
Indexable = 512the element can use an index
Last = 16384offset to define more flags

#GstEventType lists the standard event types that can be sent in a pipeline.

The custom event types can be used for private messages between elements that can't be expressed using normal GStreamer buffer passing semantics. Custom events carry an arbitrary #GstStructure. Specific custom events are distinguished by the name of the structure.

Unknown = 0unknown event.
FlushStart = 2563Start a flush operation. This event clears all data from the pipeline and unblock all streaming threads.
FlushStop = 5127Stop a flush operation. This event resets the running-time of the pipeline.
StreamStart = 10254Event to mark the start of a new stream. Sent before any other serialized event and only sent at the start of a new stream, not after flushing seeks.
Caps = 12814#GstCaps event. Notify the pad of a new media type.
Segment = 17934A new media segment follows in the dataflow. The segment events contains information for clipping buffers and converting buffer timestamps to running-time and stream-time.
StreamCollection = 19230A new #GstStreamCollection is available (Since: 1.10)
Tag = 20510A new set of metadata tags has been found in the stream.
Buffersize = 23054Notification of buffering requirements. Currently not used yet.
SinkMessage = 25630An event that sinks turn into a message. Used to send messages that should be emitted in sync with rendering.
StreamGroupDone = 26894Indicates that there is no more data for the stream group ID in the message. Sent before EOS in some instances and should be handled mostly the same. (Since: 1.10)
Eos = 28174End-Of-Stream. No more data is to be expected to follow without either a STREAMSTART event, or a FLUSHSTOP and a SEGMENT event.
Toc = 30750An event which indicates that a new table of contents (TOC) was found or updated.
Protection = 33310An event which indicates that new or updated encryption information has been found in the stream.
SegmentDone = 38406Marks the end of a segment playback.
Gap = 40966Marks a gap in the datastream.
InstantRateChange = 46090Notify downstream that a playback rate override should be applied as soon as possible. (Since: 1.18)
Qos = 48641A quality message. Used to indicate to upstream elements that the downstream elements should adjust their processing rate.
Seek = 51201A request for a new playback position and rate.
Navigation = 53761Navigation events are usually used for communicating user requests, such as mouse or keyboard movements, to upstream elements.
Latency = 56321Notification of new latency adjustment. Sinks will use the latency information to adjust their synchronisation.
Step = 58881A request for stepping through the media. Sinks will usually execute the step operation.
Reconfigure = 61441A request for upstream renegotiating caps and reconfiguring.
TocSelect = 64001A request for a new playback position based on TOC entry's UID.
SelectStreams = 66561A request to select one or more streams (Since: 1.10)
InstantRateSyncTime = 66817Sent by the pipeline to notify elements that handle the instant-rate-change event about the running-time when the rate multiplier should be applied (or was applied). (Since: 1.18)
CustomUpstream = 69121Upstream custom event
CustomDownstream = 71686Downstream custom event that travels in the data flow.
CustomDownstreamOob = 74242Custom out-of-band downstream event.
CustomDownstreamSticky = 76830Custom sticky downstream event.
CustomBoth = 79367Custom upstream or downstream event. In-band when travelling downstream.
CustomBothOob = 81923Custom upstream or downstream out-of-band event.

#GstEventTypeFlags indicate the aspects of the different #GstEventType values. You can get the type flags of a #GstEventType with the [gst.global.eventTypeGetFlags] function.

Upstream = 1Set if the event can travel upstream.
Downstream = 2Set if the event can travel downstream.
Serialized = 4Set if the event should be serialized with data flow.
Sticky = 8Set if the event is sticky on the pads.
StickyMulti = 16Multiple sticky events can be on a pad, each identified by the event name.

The result of passing data to a pad.

Note that the custom return values should not be exposed outside of the element scope.

CustomSuccess2 = 102Pre-defined custom success code.
CustomSuccess1 = 101Pre-defined custom success code (define your custom success code to this to avoid compiler warnings).
CustomSuccess = 100Elements can use values starting from this (and higher) to define custom success codes.
Ok = 0Data passing was ok.
NotLinked = - 1Pad is not linked.
Flushing = - 2Pad is flushing.
Eos = - 3Pad is EOS.
NotNegotiated = - 4Pad is not negotiated.
Error = - 5Some (fatal) error occurred. Element generating this error should post an error message using GSTELEMENTERROR() with more details.
NotSupported = - 6This operation is not supported.
CustomError = - 100Elements can use values starting from this (and lower) to define custom error codes.
CustomError1 = - 101Pre-defined custom error code (define your custom error code to this to avoid compiler warnings).
CustomError2 = - 102Pre-defined custom error code.

Standard predefined formats

Undefined = 0undefined format
Default = 1the default format of the pad/element. This can be samples for raw audio, frames/fields for raw video (some, but not all, elements support this; use @GSTFORMATTIME if you don't have a good reason t...
Bytes = 2bytes
Time = 3time in nanoseconds
Buffers = 4buffers (few, if any, elements implement this as of May 2009)
Percent = 5percentage of stream (few, if any, elements implement this as of May 2009)
enumGstGapFlags : uint

The different flags that can be set on #GST_EVENT_GAP events. See [gst.event.Event.setGapFlags] for details.

Data = 1The #GSTEVENTGAP signals missing data, for example because of packet loss.

The result of a #GstIteratorItemFunction.

Skip = 0Skip this item
Pass = 1Return item
End = 2Stop after this item.

The result of [gst.iterator.Iterator.next].

Done = 0No more items in the iterator
Ok = 1An item was retrieved
Resync = 2Datastructure changed while iterating
Error = 3An error happened

Library errors are for errors from the library being used by elements (initializing, finalizing, settings, ...)

Failed = 1a general error which doesn't fit in any other category. Make sure you add a custom message to the error call.
TooLazy = 2do not use this except as a placeholder for deciding where to go while developing code.
Init = 3used when the library could not be opened.
Shutdown = 4used when the library could not be closed.
Settings = 5used when the library doesn't accept settings.
Encode = 6used when the library generated an encoding error.
NumErrors = 7the number of library error types.
enumGstLockFlags : uint

Flags used when locking miniobjects

Read = 1lock for read access
Write = 2lock for write access
Exclusive = 4lock for exclusive access
Last = 256first flag that can be used for custom purposes
enumGstMapFlags : uint

Flags used when mapping memory

Read = 1map for read access
Write = 2map for write access
FlagLast = 65536first flag that can be used for custom purposes
enumGstMemoryFlags : uint

Flags for wrapped memory.

Readonly = 2memory is readonly. It is not allowed to map the memory with #GSTMAPWRITE.
NoShare = 16memory must not be shared. Copies will have to be made when this memory needs to be shared between buffers. (DEPRECATED: do not use in new code, instead you should create a custom GstAllocator for ...
ZeroPrefixed = 32the memory prefix is filled with 0 bytes
ZeroPadded = 64the memory padding is filled with 0 bytes
PhysicallyContiguous = 128the memory is physically contiguous. (Since: 1.2)
NotMappable = 256the memory can't be mapped via [gst.memory.Memory.map] without any preconditions. (Since: 1.2)
Last = 1048576first flag that can be used for custom purposes
enumGstMessageType : uint

The different message types that are available.

Unknown = 0an undefined message
Eos = 1end-of-stream reached in a pipeline. The application will only receive this message in the PLAYING state and every time it sets a pipeline to PLAYING that is in the EOS state. The application can p...
Error = 2an error occurred. When the application receives an error message it should stop playback of the pipeline and not assume that more data will be played. It is possible to specify a redirection url t...
Warning = 4a warning occurred.
Info = 8an info message occurred
Tag = 16a tag was found.
Buffering = 32the pipeline is buffering. When the application receives a buffering message in the PLAYING state for a non-live pipeline it must PAUSE the pipeline until the buffering completes, when the percenta...
StateChanged = 64a state change happened
StateDirty = 128an element changed state in a streaming thread. This message is deprecated.
StepDone = 256a stepping operation finished.
ClockProvide = 512an element notifies its capability of providing a clock. This message is used internally and never forwarded to the application.
ClockLost = 1024The current clock as selected by the pipeline became unusable. The pipeline will select a new clock on the next PLAYING state change. The application should set the pipeline to PAUSED and back to P...
NewClock = 2048a new clock was selected in the pipeline.
StructureChange = 4096the structure of the pipeline changed. This message is used internally and never forwarded to the application.
StreamStatus = 8192status about a stream, emitted when it starts, stops, errors, etc..
Application = 16384message posted by the application, possibly via an application-specific element.
Element = 32768element-specific message, see the specific element's documentation
SegmentStart = 65536pipeline started playback of a segment. This message is used internally and never forwarded to the application.
SegmentDone = 131072pipeline completed playback of a segment. This message is forwarded to the application after all elements that posted @GSTMESSAGESEGMENTSTART posted a GSTMESSAGESEGMENTDONE message.
DurationChanged = 262144The duration of a pipeline changed. The application can get the new duration with a duration query.
Latency = 524288Posted by elements when their latency changes. The application should recalculate and distribute a new latency.
AsyncStart = 1048576Posted by elements when they start an ASYNC #GstStateChange. This message is not forwarded to the application but is used internally.
AsyncDone = 2097152Posted by elements when they complete an ASYNC #GstStateChange. The application will only receive this message from the toplevel pipeline.
RequestState = 4194304Posted by elements when they want the pipeline to change state. This message is a suggestion to the application which can decide to perform the state change on (part of) the pipeline.
StepStart = 8388608A stepping operation was started.
Qos = 16777216A buffer was dropped or an element changed its processing strategy for Quality of Service reasons.
Progress = 33554432A progress message.
Toc = 67108864A new table of contents (TOC) was found or previously found TOC was updated.
ResetTime = 134217728Message to request resetting the pipeline's running time from the pipeline. This is an internal message which applications will likely never receive.
StreamStart = 268435456Message indicating start of a new stream. Useful e.g. when using playbin in gapless playback mode, to get notified when the next title actually starts playing (which will be some time after the URI...
NeedContext = 536870912Message indicating that an element wants a specific context (Since: 1.2)
HaveContext = 1073741824Message indicating that an element created a context (Since: 1.2)
Extended = 2147483648Message is an extended message type (see below). These extended message IDs can't be used directly with mask-based API like [gst.bus.Bus.poll] or [gst.bus.Bus.timedPopFiltered], but you can still f...
DeviceAdded = 2147483649Message indicating a #GstDevice was added to a #GstDeviceProvider (Since: 1.4)
DeviceRemoved = 2147483650Message indicating a #GstDevice was removed from a #GstDeviceProvider (Since: 1.4)
PropertyNotify = 2147483651Message indicating a #GObject property has changed (Since: 1.10)
StreamCollection = 2147483652Message indicating a new #GstStreamCollection is available (Since: 1.10)
StreamsSelected = 2147483653Message indicating the active selection of #GstStreams has changed (Since: 1.10)
Redirect = 2147483654Message indicating to request the application to try to play the given URL(s). Useful if for example a HTTP 302/303 response is received with a non-HTTP URL inside. (Since: 1.10)
DeviceChanged = 2147483655Message indicating a #GstDevice was changed a #GstDeviceProvider (Since: 1.16)
InstantRateRequest = 2147483656Message sent by elements to request the running time from the pipeline when an instant rate change should be applied (which may be in the past when the answer arrives). (Since: 1.18)
Any = 4294967295mask for all of the above messages.
enumGstMetaFlags : uint

Extra metadata flags.

None = 0no flags
Readonly = 1metadata should not be modified
Pooled = 2metadata is managed by a bufferpool
Locked = 4metadata should not be removed
Last = 65536additional flags can be added starting from this flag.

Flags for the mini object

Lockable = 1the object can be locked and unlocked with [gst.miniobject.MiniObject.lock] and [gst.miniobject.MiniObject.unlock].
LockReadonly = 2the object is permanently locked in READONLY mode. Only read locks can be performed on the object.
MayBeLeaked = 4the object is expected to stay alive even after [gst.global.deinit] has been called and so should be ignored by leak detection tools. (Since: 1.10)
Last = 16first flag that can be used by subclasses.
enumGstObjectFlags : uint

The standard flags that an gstobject may have.

MayBeLeaked = 1the object is expected to stay alive even after [gst.global.deinit] has been called and so should be ignored by leak detection tools. (Since: 1.10)
Constructed = 2Flag that's set when the object has been constructed. This can be used by API such as base class setters to differentiate between the case where they're called from a subclass's instance init funct...
Last = 16subclasses can add additional flags starting from this flag

The direction of a pad.

Unknown = 0direction is unknown.
Src = 1the pad is a source pad.
Sink = 2the pad is a sink pad.
enumGstPadFlags : uint

Pad state flags

Blocked = 16is dataflow on a pad blocked
Flushing = 32is pad flushing
Eos = 64is pad in EOS state
Blocking = 128is pad currently blocking on a buffer or event
NeedParent = 256ensure that there is a parent object before calling into the pad callbacks.
NeedReconfigure = 512the pad should be reconfigured/renegotiated. The flag has to be unset manually after reconfiguration happened.
PendingEvents = 1024the pad has pending events
FixedCaps = 2048the pad is using fixed caps. This means that once the caps are set on the pad, the default caps query function will only return those caps.
ProxyCaps = 4096the default event and query handler will forward all events and queries to the internally linked pads instead of discarding them.
ProxyAllocation = 8192the default query handler will forward allocation queries to the internally linked pads instead of discarding them.
ProxyScheduling = 16384the default query handler will forward scheduling queries to the internally linked pads instead of discarding them.
AcceptIntersect = 32768the default accept-caps handler will check it the caps intersect the query-caps result instead of checking for a subset. This is interesting for parsers that can accept incompletely specified caps.
AcceptTemplate = 65536the default accept-caps handler will use the template pad caps instead of query caps to compare with the accept caps. Use this in combination with [gst.types.PadFlags.AcceptIntersect]. (Since: 1.6)
Last = 1048576offset to define more flags
enumGstPadLinkCheck : uint

The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed.

Only disable some of the checks if you are 100% certain you know the link

will not fail because of hierarchy/caps compatibility failures. If uncertain, use the default checks ([gst.types.PadLinkCheck.Default]) or the regular methods for linking the pads.

Nothing = 0Don't check hierarchy or caps compatibility.
Hierarchy = 1Check the pads have same parents/grandparents. Could be omitted if it is already known that the two elements that own the pads are in the same bin.
TemplateCaps = 2Check if the pads are compatible by using their template caps. This is much faster than @GSTPADLINKCHECKCAPS, but would be unsafe e.g. if one pad has `GSTCAPSANY`.
Caps = 4Check if the pads are compatible by comparing the caps returned by [gst.pad.Pad.queryCaps].
NoReconfigure = 8Disables pushing a reconfigure event when pads are linked.
Default = 5The default checks done when linking pads (i.e. the ones used by [gst.pad.Pad.link]).

Result values from gst_pad_link and friends.

Ok = 0link succeeded
WrongHierarchy = - 1pads have no common grandparent
WasLinked = - 2pad was already linked
WrongDirection = - 3pads have wrong direction
Noformat = - 4pads do not have common format
Nosched = - 5pads cannot cooperate in scheduling
Refused = - 6refused for some reason

The status of a GstPad. After activating a pad, which usually happens when the parent element goes from READY to PAUSED, the GstPadMode defines if the pad operates in push or pull mode.

None = 0Pad will not handle dataflow
Push = 1Pad handles dataflow in downstream push mode
Pull = 2Pad handles dataflow in upstream pull mode

Indicates when this pad will become available.

Always = 0the pad is always available
Sometimes = 1the pad will become available depending on the media stream
Request = 2the pad is only available on request with [gst.element.Element.requestPad].

Different return values for the #GstPadProbeCallback.

Drop = 0drop data in data probes. For push mode this means that the data item is not sent downstream. For pull mode, it means that the data item is not passed upstream. In both cases, no other probes are c...
Ok = 1normal probe return value. This leaves the probe in place, and defers decisions about dropping or passing data to other probes, if any. If there are no other probes, the default behaviour for the p...
Remove = 2remove this probe, passing the data. For blocking probes this will cause data flow to unblock, unless there are also other blocking probes installed.
Pass = 3pass the data item in the block probe and block on the next item. Note, that if there are multiple pad probes installed and any probe returns PASS, the data will be passed.
Handled = 4Data has been handled in the probe and will not be forwarded further. For events and buffers this is the same behaviour as [gst.types.PadProbeReturn.Drop] (except that in this case you need to unre...
enumGstPadProbeType : uint

The different probing types that can occur. When either one of @GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a blocking probe.

Invalid = 0invalid probe type
Idle = 1probe idle pads and block while the callback is called
Block = 2probe and block pads
Buffer = 16probe buffers
BufferList = 32probe buffer lists
EventDownstream = 64probe downstream events
EventUpstream = 128probe upstream events
EventFlush = 256probe flush events. This probe has to be explicitly enabled and is not included in the @@GSTPADPROBETYPEEVENTDOWNSTREAM or @@GSTPADPROBETYPEEVENTUPSTREAM probe types.
QueryDownstream = 512probe downstream queries
QueryUpstream = 1024probe upstream queries
Push = 4096probe push
Pull = 8192probe pull
Blocking = 3probe and block at the next opportunity, at data flow or when idle
DataDownstream = 112probe downstream data (buffers, buffer lists, and events)
DataUpstream = 128probe upstream data (events)
DataBoth = 240probe upstream and downstream data (buffers, buffer lists, and events)
BlockDownstream = 114probe and block downstream data (buffers, buffer lists, and events)
BlockUpstream = 130probe and block upstream data (events)
EventBoth = 192probe upstream and downstream events
QueryBoth = 1536probe upstream and downstream queries
AllBoth = 1776probe upstream events and queries and downstream buffers, buffer lists, events and queries
Scheduling = 12288probe push and pull

Flags for the padtemplate

Last = 256first flag that can be used by subclasses.

The different parsing errors that can occur.

Syntax = 0A syntax error occurred.
NoSuchElement = 1The description contained an unknown element
NoSuchProperty = 2An element did not have a specified property
Link = 3There was an error linking two pads.
CouldNotSetProperty = 4There was an error setting a property
EmptyBin = 5An empty bin was specified.
Empty = 6An empty description was specified
DelayedLink = 7A delayed link did not get resolved.
enumGstParseFlags : uint

Parsing options.

None = 0Do not use any special parsing options.
FatalErrors = 1Always return null when an error occurs (default behaviour is to return partially constructed bins or elements in some cases)
NoSingleElementBins = 2If a bin only has a single element, just return the element.
PlaceInBin = 4If more than one toplevel element is described by the pipeline description string, put them in a #GstBin instead of a #GstPipeline. (Since: 1.10)
enumGstPipelineFlags : uint

Pipeline flags

FixedClock = 524288this pipeline works with a fixed clock
Last = 8388608offset to define more flags
Members = 1Ignore enum members when generating the plugins cache. This is useful if the members of the enum are generated dynamically, in order not to expose incorrect documentation to the end user.

Flags used in connection with [gst.plugin.Plugin.addDependency].

None = 0no special flags
Recurse = 1recurse into subdirectories
PathsAreDefaultOnly = 2use paths argument only if none of the environment variables is set
FileNameIsSuffix = 4interpret filename argument as filter suffix and check all matching files in the directory
FileNameIsPrefix = 8interpret filename argument as filter prefix and check all matching files in the directory. Since: 1.8.
PathsAreRelativeToExe = 16interpret non-absolute paths as relative to the main executable directory. Since 1.14.

The plugin loading errors

Module = 0The plugin could not be loaded
Dependencies = 1The plugin has unresolved dependencies
NameMismatch = 2The plugin has already be loaded from a different file
enumGstPluginFlags : uint

The plugin loading state

Cached = 16Temporarily loaded plugins
Blacklisted = 32The plugin won't be scanned (again)

The type of a [gst.types.MessageType.Progress]. The progress messages inform the application of the status of asynchronous tasks.

Start = 0A new task started.
Continue = 1A task completed and a new one continues.
Complete = 2A task completed.
Canceled = 3A task was canceled.
Error = 4A task caused an error. An error message is also posted on the bus.

The result of a #GstPromise

Pending = 0Initial state. Waiting for transition to any other state.
Interrupted = 1Interrupted by the consumer as it doesn't want the value anymore.
Replied = 2A producer marked a reply
Expired = 3The promise expired (the carrying object lost all refs) and the promise will never be fulfilled.

The different types of QoS events that can be given to the [gst.event.Event.newQos] method.

Overflow = 0The QoS event type that is produced when upstream elements are producing data too quickly and the element can't keep up processing the data. Upstream should reduce their production rate. This type ...
Underflow = 1The QoS event type that is produced when upstream elements are producing data too slowly and need to speed up their production rate.
Throttle = 2The QoS event type that is produced when the application enabled throttling to limit the data rate.

Standard predefined Query types

Unknown = 0unknown query type
Position = 2563current position in stream
Duration = 5123total duration of the stream
Latency = 7683latency of stream
Jitter = 10243current jitter of stream
Rate = 12803current rate of the stream
Seeking = 15363seeking capabilities
Segment = 17923segment start/stop positions
Convert = 20483convert values between formats
Formats = 23043query supported formats for convert
Buffering = 28163query available media for efficient seeking.
Custom = 30723a custom application or element defined query.
Uri = 33283query the URI of the source or sink.
Allocation = 35846the buffer allocation properties
Scheduling = 38401the scheduling properties
AcceptCaps = 40963the accept caps query
Caps = 43523the caps query
Drain = 46086wait till all serialized data is consumed downstream
Context = 48643query the pipeline-local context from downstream or upstream (since 1.2)
Bitrate = 51202the bitrate query (since 1.16)
Selectable = 53763Query stream selection capability.

#GstQueryTypeFlags indicate the aspects of the different #GstQueryType values. You can get the type flags of a #GstQueryType with the [gst.global.queryTypeGetFlags] function.

Upstream = 1Set if the query can travel upstream.
Downstream = 2Set if the query can travel downstream.
Serialized = 4Set if the query should be serialized with data flow.

Element priority ranks. Defines the order in which the autoplugger (or similar rank-picking mechanisms, such as e.g. [gst.element.Element.makeFromUri]) will choose this element over an alternative one with the same function.

These constants serve as a rough guidance for defining the rank of a #GstPluginFeature. Any value is valid, including values bigger than @GST_RANK_PRIMARY.

None = 0will be chosen last or not at all
Marginal = 64unlikely to be chosen
Secondary = 128likely to be chosen
Primary = 256will be chosen first

Resource errors are for any resource used by an element: memory, files, network connections, process space, ... They're typically used by source and sink elements.

Failed = 1a general error which doesn't fit in any other category. Make sure you add a custom message to the error call.
TooLazy = 2do not use this except as a placeholder for deciding where to go while developing code.
NotFound = 3used when the resource could not be found.
Busy = 4used when resource is busy.
OpenRead = 5used when resource fails to open for reading.
OpenWrite = 6used when resource fails to open for writing.
OpenReadWrite = 7used when resource cannot be opened for both reading and writing, or either (but unspecified which).
Close = 8used when the resource can't be closed.
Read = 9used when the resource can't be read from.
Write = 10used when the resource can't be written to.
Seek = 11used when a seek on the resource fails.
Sync = 12used when a synchronize on the resource fails.
Settings = 13used when settings can't be manipulated on.
NoSpaceLeft = 14used when the resource has no space left.
NotAuthorized = 15used when the resource can't be opened due to missing authorization. (Since: 1.2.4)
NumErrors = 16the number of resource error types.

The different scheduling flags.

Seekable = 1if seeking is possible
Sequential = 2if sequential access is recommended
BandwidthLimited = 4if bandwidth is limited and buffering possible (since 1.2)

The different search modes.

Exact = 0Only search for exact matches.
Before = 1Search for an exact match or the element just before.
After = 2Search for an exact match or the element just after.
enumGstSeekFlags : uint

Flags to be used with [gst.element.Element.seek] or [gst.event.Event.newSeek]. All flags can be used together.

A non flushing seek might take some time to perform as the currently playing data in the pipeline will not be cleared.

An accurate seek might be slower for formats that don't have any indexes or timestamp markers in the stream. Specifying this flag might require a complete scan of the file in those cases.

When performing a segment seek: after the playback of the segment completes, no EOS will be emitted by the element that performed the seek, but a [gst.types.MessageType.SegmentDone] message will be posted on the bus by the element. When this message is posted, it is possible to send a new seek event to continue playback. With this seek method it is possible to perform seamless looping or simple linear editing.

When only changing the playback rate and not the direction, the [gst.types.SeekFlags.InstantRateChange] flag can be used for a non-flushing seek to signal that the rate change should be applied immediately. This requires special support in the seek handlers (e.g. demuxers) and any elements synchronizing to the clock, and in general can't work in all cases (for example UDP streaming where the delivery rate is controlled by a remote server). The instant-rate-change mode supports changing the trickmode-related GST_SEEK_ flags, but can't be used in conjunction with other seek flags that affect the new playback position - as the playback position will not be changing.

When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode playback, the [gst.types.SeekFlags.Trickmode] flag can be used to instruct decoders and demuxers to adjust the playback rate by skipping frames. This can improve performance and decrease CPU usage because not all frames need to be decoded.

Beyond that, the [gst.types.SeekFlags.TrickmodeKeyUnits] flag can be used to request that decoders skip all frames except key units, and [gst.types.SeekFlags.TrickmodeNoAudio] flags can be used to request that audio decoders do no decoding at all, and simple output silence.

The [gst.types.SeekFlags.SnapBefore] flag can be used to snap to the previous relevant location, and the [gst.types.SeekFlags.SnapAfter] flag can be used to select the next relevant location. If [gst.types.SeekFlags.KeyUnit] is specified, the relevant location is a keyframe. If both flags are specified, the nearest of these locations will be selected. If none are specified, the implementation is free to select whichever it wants.

The before and after here are in running time, so when playing backwards, the next location refers to the one that will played in next, and not the one that is located after in the actual source stream.

Also see part-seeking.txt in the GStreamer design documentation for more details on the meaning of these flags and the behaviour expected of elements that handle them.

None = 0no flag
Flush = 1flush pipeline
Accurate = 2accurate position is requested, this might be considerably slower for some formats.
KeyUnit = 4seek to the nearest keyframe. This might be faster but less accurate.
Segment = 8perform a segment seek.
Trickmode = 16when doing fast forward or fast reverse playback, allow elements to skip frames instead of generating all frames. (Since: 1.6)
Skip = 16Deprecated backward compatibility flag, replaced by [gst.types.SeekFlags.Trickmode]
SnapBefore = 32go to a location before the requested position, if [gst.types.SeekFlags.KeyUnit] this means the keyframe at or before the requested position the one at or before the seek target.
SnapAfter = 64go to a location after the requested position, if [gst.types.SeekFlags.KeyUnit] this means the keyframe at of after the requested position.
SnapNearest = 96go to a position near the requested position, if [gst.types.SeekFlags.KeyUnit] this means the keyframe closest to the requested position, if both keyframes are at an equal distance, behaves like [g...
TrickmodeKeyUnits = 128when doing fast forward or fast reverse playback, request that elements only decode keyframes and skip all other content, for formats that have keyframes. (Since: 1.6)
TrickmodeNoAudio = 256when doing fast forward or fast reverse playback, request that audio decoder elements skip decoding and output only gap events or silence. (Since: 1.6)
TrickmodeForwardPredicted = 512When doing fast forward or fast reverse playback, request that elements only decode keyframes and forward predicted frames and skip all other content (for example B-Frames), for formats that have k...
InstantRateChange = 1024Signals that a rate change should be applied immediately. Only valid if start/stop position are GSTCLOCKTIME_NONE, the playback direction does not change and the seek is not flushing. (Since: 1.18)

The different types of seek events. When constructing a seek event with [gst.event.Event.newSeek] or when doing gst_segment_do_seek ().

None = 0no change in position is required
Set = 1absolute position is requested
End = 2relative position to duration is requested
enumGstSegmentFlags : uint

Flags for the GstSegment structure. Currently mapped to the corresponding values of the seek flags.

None = 0no flags
Reset = 1reset the pipeline runningtime to the segment runningtime
Trickmode = 16perform skip playback (Since: 1.6)
Skip = 16Deprecated backward compatibility flag, replaced by @GSTSEGMENTFLAG_TRICKMODE
Segment = 8send SEGMENT_DONE instead of EOS
TrickmodeKeyUnits = 128Decode only keyframes, where possible (Since: 1.6)
TrickmodeForwardPredicted = 512Decode only keyframes or forward predicted frames, where possible (Since: 1.18)
TrickmodeNoAudio = 256Do not decode any audio, where possible (Since: 1.6)
None = 0No special flags specified.
BackwardCompat = 1Serialize using the old format for nested structures.
Strict = 2Serialization fails if a value cannot be serialized instead of using placeholder "NULL" value (e.g. pointers, objects).
None = 0Try to retrieve the minimum information available, which may be none on some platforms (Since: 1.18)
Full = 1Try to retrieve as much information as possible, including source information when getting the stack trace

The possible states an element can be in. States can be changed using [gst.element.Element.setState] and checked using [gst.element.Element.getState].

VoidPending = 0no pending state.
Null = 1the NULL state or initial state of an element.
Ready = 2the element is ready to go to PAUSED.
Paused = 3the element is PAUSED, it is ready to accept and process data. Sink elements however only accept one buffer and then block.
Playing = 4the element is PLAYING, the #GstClock is running and the data is flowing.

These are the different state changes an element goes through. [gst.types.State.Null] ⇒ [gst.types.State.Playing] is called an upwards state change and [gst.types.State.Playing] ⇒ [gst.types.State.Null] a downwards state change.

NullToReady = 10state change from NULL to READY. The element must check if the resources it needs are available. Device sinks and -sources typically try to probe the device to constrain their caps. The element o...
ReadyToPaused = 19state change from READY to PAUSED. The element pads are activated in order to receive data in PAUSED. Streaming threads are started. Some elements might need to return [gst.types.StateChangeRetur...
PausedToPlaying = 28state change from PAUSED to PLAYING. Most elements ignore this state change. The pipeline selects a #GstClock and distributes this to all the children before setting them to PLAYING. This means t...
PlayingToPaused = 35state change from PLAYING to PAUSED. Most elements ignore this state change. The pipeline calculates the runningtime based on the last selected #GstClock and the basetime. It stores this informat...
PausedToReady = 26state change from PAUSED to READY. Sinks unblock any waits in the preroll. Elements unblock any waits on devices Chain or get_range functions return [gst.types.FlowReturn.Flushing]. The element...
ReadyToNull = 17state change from READY to NULL. Elements close devices Elements reset any internal state.
NullToNull = 9state change from NULL to NULL. (Since: 1.14)
ReadyToReady = 18state change from READY to READY, This might happen when going to PAUSED asynchronously failed, in that case elements should make sure they are in a proper, coherent READY state. (Since: 1.14)
PausedToPaused = 27state change from PAUSED to PAUSED. This might happen when elements were in PLAYING state and 'lost state', they should make sure to go back to real 'PAUSED' state (prerolling for example). (Since:...
PlayingToPlaying = 36state change from PLAYING to PLAYING. (Since: 1.14)

The possible return values from a state change function such as [gst.element.Element.setState]. Only @GST_STATE_CHANGE_FAILURE is a real failure.

Failure = 0the state change failed
Success = 1the state change succeeded
Async = 2the state change will happen asynchronously
NoPreroll = 3the state change succeeded but the element cannot produce data in [gst.types.State.Paused]. This typically happens with live sources.

Stream errors are for anything related to the stream being processed: format errors, media type errors, ... They're typically used by decoders, demuxers, converters, ...

Failed = 1a general error which doesn't fit in any other category. Make sure you add a custom message to the error call.
TooLazy = 2do not use this except as a placeholder for deciding where to go while developing code.
NotImplemented = 3use this when you do not want to implement this functionality yet.
TypeNotFound = 4used when the element doesn't know the stream's type.
WrongType = 5used when the element doesn't handle this type of stream.
CodecNotFound = 6used when there's no codec to handle the stream's type.
Decode = 7used when decoding fails.
Encode = 8used when encoding fails.
Demux = 9used when demuxing fails.
Mux = 10used when muxing fails.
Format = 11used when the stream is of the wrong format (for example, wrong caps).
Decrypt = 12used when the stream is encrypted and can't be decrypted because this is not supported by the element.
DecryptNokey = 13used when the stream is encrypted and can't be decrypted because no suitable key is available.
NumErrors = 14the number of stream error types.
enumGstStreamFlags : uint
None = 0This stream has no special attributes
Sparse = 1This stream is a sparse stream (e.g. a subtitle stream), data may flow only in irregular intervals with large gaps in between.
Select = 2This stream should be selected by default. This flag may be used by demuxers to signal that a stream should be selected by default in a playback scenario.
Unselect = 4This stream should not be selected by default. This flag may be used by demuxers to signal that a stream should not be selected by default in a playback scenario, but only if explicitly selected by...

The type of a [gst.types.MessageType.StreamStatus]. The stream status messages inform the application of new streaming threads and their status.

Create = 0A new thread need to be created.
Enter = 1a thread entered its loop function
Leave = 2a thread left its loop function
Destroy = 3a thread is destroyed
Start = 8a thread is started
Pause = 9a thread is paused
Stop = 10a thread is stopped
enumGstStreamType : uint

#GstStreamType describes a high level classification set for flows of data in #GstStream objects.

Note that this is a flag, and therefore users should not assume it will be a single value. Do not use the equality operator for checking whether a stream is of a certain type.

Unknown = 1The stream is of unknown (unclassified) type.
Audio = 2The stream is of audio data
Video = 4The stream carries video data
Container = 8The stream is a muxed container type
Text = 16The stream contains subtitle / subpicture data.

The type of a [gst.types.MessageType.StructureChange].

Link = 0Pad linking is starting or done.
Unlink = 1Pad unlinking is starting or done.

Extra tag flags used when registering tags.

Undefined = 0undefined flag
Meta = 1tag is meta data
Encoded = 2tag is encoded
Decoded = 3tag is decoded
Count = 4number of tag flags

The different tag merging modes are basically replace, overwrite and append, but they can be seen from two directions. Given two taglists: (A) the tags already in the element and (B) the ones that are supplied to the element ( e.g. via [gst.tag_setter.TagSetter.mergeTags] / [gst.tag_setter.TagSetter.addTags] or a [gst.types.EventType.Tag]), how are these tags merged? In the table below this is shown for the cases that a tag exists in the list (A) or does not exists (!A) and combinations thereof.

merge modeA + BA + !B!A + B!A + !B
REPLACE_ALLBøBø
REPLACEBABø
APPENDA, BABø
PREPENDB, AABø
KEEPAABø
KEEP_ALLAAøø
Undefined = 0undefined merge mode
ReplaceAll = 1replace all tags (clear list and append)
Replace = 2replace tags
Append = 3append tags
Prepend = 4prepend tags
Keep = 5keep existing tags
KeepAll = 6keep all existing tags
Count = 7the number of merge modes

GstTagScope specifies if a taglist applies to the complete medium or only to one single stream.

Stream = 0tags specific to this single stream
Global = 1global tags for the complete medium

The different states a task can be in

Started = 0the task is started and running
Stopped = 1the task is stopped
Paused = 2the task is paused

The different types of TOC entries (see #GstTocEntry).

There are two types of TOC entries: alternatives or parts in a sequence.

Angle = - 3entry is an angle (i.e. an alternative)
Version = - 2entry is a version (i.e. alternative)
Edition = - 1entry is an edition (i.e. alternative)
Invalid = 0invalid entry type value
Title = 1entry is a title (i.e. a part of a sequence)
Track = 2entry is a track (i.e. a part of a sequence)
Chapter = 3entry is a chapter (i.e. a part of a sequence)

How a #GstTocEntry should be repeated. By default, entries are played a single time.

None = 0single forward playback
Forward = 1repeat forward
Reverse = 2repeat backward
PingPong = 3repeat forward and backward

The scope of a TOC.

Global = 1global TOC representing all selectable options (this is what applications are usually interested in)
Current = 2TOC for the currently active/selected stream (this is a TOC representing the current stream from start to EOS, and is what a TOC writer / muxer is usually interested in; it will usually be a subset...

Flag that describe the value. These flags help applications processing the logs to understand the values.

None = 0no flags
Optional = 1the value is optional. When using this flag one need to have an additional boolean arg before this value in the var-args list passed to [gst.tracer_record.TracerRecord.log].
Aggregated = 2the value is a combined figure, since the start of tracing. Examples are averages or timestamps.

Tracing record will contain fields that contain a measured value or extra meta-data. One such meta data are values that tell where a measurement was taken. This enumerating declares to which scope such a meta data field relates to. If it is e.g. [gst.types.TracerValueScope.Pad], then each of the log events may contain values for different #GstPads.

Process = 0the value is related to the process
Thread = 1the value is related to a thread
Element = 2the value is related to an #GstElement
Pad = 3the value is related to a #GstPad

The probability of the typefind function. Higher values have more certainty in doing a reliable typefind.

None = 0type undetected.
Minimum = 1unlikely typefind.
Possible = 50possible type detected.
Likely = 80likely a type was detected.
NearlyCertain = 99nearly certain that a type was detected.
Maximum = 100very certain a type was detected.

Different URI-related errors that can occur.

UnsupportedProtocol = 0The protocol is not supported
BadUri = 1There was a problem with the URI
BadState = 2Could not set or change the URI because the URI handler was in a state where that is not possible or not permitted
BadReference = 3There was a problem with the entity that the URI references

The different types of URI direction.

Unknown = 0The URI direction is unknown
Sink = 1The URI is a consumer.
Src = 2The URI is a producer.

Parameters to control the allocation of memory

Fields
GstMemoryFlags flagsflags to control allocation
size_t align_the desired alignment of the memory
size_t prefixthe desired prefix
size_t paddingthe desired padding
void *[4] GstReserved

Memory is usually created by allocators with a [gst.allocator.Allocator.alloc] method call. When null is used as the allocator, the default allocator will be used.

New allocators can be registered with [gst.allocator.Allocator.register]. Allocators are identified by name and can be retrieved with [gst.allocator.Allocator.find]. [gst.allocator.Allocator.setDefault] can be used to change the default allocator.

New memory can be created with [gst.memory.Memory.newWrapped] that wraps the memory allocated elsewhere.

Fields
GstObject object
const(char) * memType
GstMemoryMapFunction memMapthe implementation of the GstMemoryMapFunction
GstMemoryUnmapFunction memUnmapthe implementation of the GstMemoryUnmapFunction
GstMemoryCopyFunction memCopythe implementation of the GstMemoryCopyFunction
GstMemoryShareFunction memSharethe implementation of the GstMemoryShareFunction
GstMemoryIsSpanFunction memIsSpanthe implementation of the GstMemoryIsSpanFunction
GstMemoryMapFullFunction memMapFullthe implementation of the GstMemoryMapFullFunction. Will be used instead of @mem_map if present. (Since: 1.6)
GstMemoryUnmapFullFunction memUnmapFullthe implementation of the GstMemoryUnmapFullFunction. Will be used instead of @mem_unmap if present. (Since: 1.6)
void *[2] GstReserved

The #GstAllocator is used to create new memory.

Fields
GstObjectClass objectClassObject parent class
GstMemory * function(GstAllocator * allocator, size_t size, GstAllocationParams * params) allocimplementation that acquires memory
void function(GstAllocator * allocator, GstMemory * memory) freeimplementation that releases memory
void *[4] GstReserved

The #GstAtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations.

structGstBin

#GstBin is an element that can contain other #GstElement, allowing them to be managed as a group. Pads from the child elements can be ghosted to the bin, see #GstGhostPad. This makes the bin look like any other elements and enables creation of higher-level abstraction elements.

A new #GstBin is created with [gst.bin.Bin.new_]. Use a #GstPipeline instead if you want to create a toplevel bin because a normal bin doesn't have a bus or handle clock distribution of its own.

After the bin has been created you will typically add elements to it with [gst.bin.Bin.add]. You can remove elements with [gst.bin.Bin.remove].

An element can be retrieved from a bin with [gst.bin.Bin.getByName], using the elements name. [gst.bin.Bin.getByNameRecurseUp] is mainly used for internal purposes and will query the parent bins when the element is not found in the current bin.

An iterator of elements in a bin can be retrieved with [gst.bin.Bin.iterateElements]. Various other iterators exist to retrieve the elements in a bin.

[gst.object.ObjectWrap.unref] is used to drop your reference to the bin.

The #GstBin::element-added signal is fired whenever a new element is added to the bin. Likewise the #GstBin::element-removed signal is fired whenever an element is removed from the bin.

A #GstBin internally intercepts every #GstMessage posted by its children and implements the following default behaviour for each of them:

  • [gst.types.MessageType.Eos]: This message is only posted by sinks in the PLAYING

state. If all sinks posted the EOS message, this bin will post and EOS message upwards.

  • [gst.types.MessageType.SegmentStart]: Just collected and never forwarded upwards.

The messages are used to decide when all elements have completed playback of their segment.

  • [gst.types.MessageType.SegmentDone]: Is posted by #GstBin when all elements that posted

a SEGMENT_START have posted a SEGMENT_DONE.

  • [gst.types.MessageType.DurationChanged]: Is posted by an element that detected a change

in the stream duration. The duration change is posted to the application so that it can refetch the new duration with a duration query.

Note that these messages can be posted before the bin is prerolled, in which case the duration query might fail.

Note also that there might be a discrepancy (due to internal buffering/queueing) between the stream being currently displayed and the returned duration query.

Applications might want to also query for duration (and changes) by listening to the [gst.types.MessageType.StreamStart] message, signaling the active start of a (new) stream.

  • [gst.types.MessageType.ClockLost]: This message is posted by an element when it

can no longer provide a clock.

The default bin behaviour is to check if the lost clock was the one provided by the bin. If so and the bin is currently in the PLAYING state, the message is forwarded to the bin parent.

This message is also generated when a clock provider is removed from the bin. If this message is received by the application, it should PAUSE the pipeline and set it back to PLAYING to force a new clock distribution.

  • [gst.types.MessageType.ClockProvide]: This message is generated when an element

can provide a clock. This mostly happens when a new clock provider is added to the bin.

The default behaviour of the bin is to mark the currently selected clock as dirty, which will perform a clock recalculation the next time the bin is asked to provide a clock.

This message is never sent to the application but is forwarded to the parent of the bin.

  • OTHERS: posted upwards.

A #GstBin implements the following default behaviour for answering to a #GstQuery:

  • [gst.types.QueryType.Duration]: The bin will forward the query to all sink

elements contained within and will return the maximum value. If no sinks are available in the bin, the query fails.

  • [gst.types.QueryType.Position]: The query is sent to all sink elements in the bin and the

MAXIMUM of all values is returned. If no sinks are available in the bin, the query fails.

  • OTHERS: the query is forwarded to all sink elements, the result

of the first sink that answers the query successfully is returned. If no sink is in the bin, the query fails.

A #GstBin will by default forward any event sent to it to all sink ( [gst.types.EventTypeFlags.Upstream] ) or source ( [gst.types.EventTypeFlags.Downstream] ) elements depending on the event type.

If all the elements return true, the bin will also return true, else false is returned. If no elements of the required type are in the bin, the event handler will return true.

Fields
GstElement element
int numchildrenthe number of children in this bin
GList * childrenthe list of children in this bin
uint childrenCookieupdated whenever @children changes
GstBus * childBusinternal bus for handling child messages
GList * messagesqueued and cached messages
gboolean pollingthe bin is currently calculating its state
gboolean stateDirtythe bin needs to recalculate its state (deprecated)
gboolean clockDirtythe bin needs to select a new clock
GstClock * providedClockthe last clock selected
GstElement * clockProviderthe element that provided @provided_clock
void *[4] GstReserved

Subclasses can override #GstBinClass::add_element and #GstBinClass::remove_element to update the list of children in the bin.

The #GstBinClass::handle_message method can be overridden to implement custom message handling.

#GstBinClass::deep_element_added will be called when a new element has been added to any bin inside this bin, so it will also be called if a new child was added to a sub-bin of this bin. #GstBin implementations that override this message should chain up to the parent class implementation so the #GstBin::deep-element-added signal is emitted on all parents.

Fields
GstElementClass parentClassbin parent class
void function(GstBin * bin, GstElement * child) elementAdded
void function(GstBin * bin, GstElement * child) elementRemoved
gboolean function(GstBin * bin, GstElement * element) addElement
gboolean function(GstBin * bin, GstElement * element) removeElement
void function(GstBin * bin, GstMessage * message) handleMessage
gboolean function(GstBin * bin) doLatency
void function(GstBin * bin, GstBin * subBin, GstElement * child) deepElementAdded
void function(GstBin * bin, GstBin * subBin, GstElement * child) deepElementRemoved
void *[2] GstReserved

A fundamental type that describes a 64-bit bitmask

structGstBuffer

Buffers are the basic unit of data transfer in GStreamer. They contain the timing and offset along with other arbitrary metadata that is associated with the #GstMemory blocks that the buffer contains.

Buffers are usually created with [gst.buffer.Buffer.new_]. After a buffer has been created one will typically allocate memory for it and add it to the buffer. The following example creates a buffer that can hold a given video frame with a given width, height and bits per plane.

`` C GstBuffer *buffer; GstMemory *memory; gint size, width, height, bpp; ... size = width * height * bpp; buffer = gst_buffer_new (); memory = gst_allocator_alloc (NULL, size, NULL); gst_buffer_insert_memory (buffer, -1, memory); ... ``

Alternatively, use [gst.buffer.Buffer.newAllocate] to create a buffer with preallocated data of a given size.

Buffers can contain a list of #GstMemory objects. You can retrieve how many memory objects with [gst.buffer.Buffer.nMemory] and you can get a pointer to memory with [gst.buffer.Buffer.peekMemory]

A buffer will usually have timestamps, and a duration, but neither of these are guaranteed (they may be set to #GST_CLOCK_TIME_NONE). Whenever a meaningful value can be given for these, they should be set. The timestamps and duration are measured in nanoseconds (they are #GstClockTime values).

The buffer DTS refers to the timestamp when the buffer should be decoded and is usually monotonically increasing. The buffer PTS refers to the timestamp when the buffer content should be presented to the user and is not always monotonically increasing.

A buffer can also have one or both of a start and an end offset. These are media-type specific. For video buffers, the start offset will generally be the frame number. For audio buffers, it will be the number of samples produced so far. For compressed data, it could be the byte offset in a source or destination file. Likewise, the end offset will be the offset of the end of the buffer. These can only be meaningfully interpreted if you know the media type of the buffer (the preceding CAPS event). Either or both can be set to #GST_BUFFER_OFFSET_NONE.

gst_buffer_ref() is used to increase the refcount of a buffer. This must be done when you want to keep a handle to the buffer after pushing it to the next element. The buffer refcount determines the writability of the buffer, a buffer is only writable when the refcount is exactly 1, i.e. when the caller has the only reference to the buffer.

To efficiently create a smaller buffer out of an existing one, you can use [gst.buffer.Buffer.copyRegion]. This method tries to share the memory objects between the two buffers.

If a plug-in wants to modify the buffer data or metadata in-place, it should first obtain a buffer that is safe to modify by using gst_buffer_make_writable(). This function is optimized so that a copy will only be made when it is necessary.

Several flags of the buffer can be set and unset with the GST_BUFFER_FLAG_SET() and GST_BUFFER_FLAG_UNSET() macros. Use GST_BUFFER_FLAG_IS_SET() to test if a certain #GstBufferFlags flag is set.

Buffers can be efficiently merged into a larger buffer with [gst.buffer.Buffer.append]. Copying of memory will only be done when absolutely needed.

Arbitrary extra metadata can be set on a buffer with [gst.buffer.Buffer.addMeta]. Metadata can be retrieved with [gst.buffer.Buffer.getMeta]. See also #GstMeta.

An element should either unref the buffer or push it out on a src pad using [gst.pad.Pad.push] (see #GstPad).

Buffers are usually freed by unreffing them with gst_buffer_unref(). When the refcount drops to 0, any memory and metadata pointed to by the buffer is unreffed as well. Buffers allocated from a #GstBufferPool will be returned to the pool when the refcount drops to 0.

The #GstParentBufferMeta is a meta which can be attached to a #GstBuffer to hold a reference to another buffer that is only released when the child #GstBuffer is released.

Typically, #GstParentBufferMeta is used when the child buffer is directly using the #GstMemory of the parent buffer, and wants to prevent the parent buffer from being returned to a buffer pool until the #GstMemory is available for re-use. (Since: 1.6)

Fields
GstMiniObject miniObjectthe parent structure
GstBufferPool * poolpointer to the pool owner of the buffer
GstClockTime ptspresentation timestamp of the buffer, can be #GSTCLOCKTIME_NONE when the pts is not known or relevant. The pts contains the timestamp when the media should be presented to the user.
GstClockTime dtsdecoding timestamp of the buffer, can be #GSTCLOCKTIME_NONE when the dts is not known or relevant. The dts contains the timestamp when the media should be processed.
GstClockTime durationduration in time of the buffer data, can be #GSTCLOCKTIME_NONE when the duration is not known or relevant.
ulong offseta media specific offset for the buffer data. For video frames, this is the frame number of this buffer. For audio samples, this is the offset of the first sample in this buffer. For file data or co...
ulong offsetEndthe last offset contained in this buffer. It has the same format as @offset.

Buffer lists are an object containing a list of buffers.

Buffer lists are created with [gst.buffer_list.BufferList.new_] and filled with data using [gst.buffer_list.BufferList.insert].

Buffer lists can be pushed on a srcpad with [gst.pad.Pad.pushList]. This is interesting when multiple buffers need to be pushed in one go because it can reduce the amount of overhead for pushing each buffer individually.

A #GstBufferPool is an object that can be used to pre-allocate and recycle buffers of the same size and with the same properties.

A #GstBufferPool is created with [gst.buffer_pool.BufferPool.new_].

Once a pool is created, it needs to be configured. A call to [gst.buffer_pool.BufferPool.getConfig] returns the current configuration structure from the pool. With [gst.buffer_pool.BufferPool.configSetParams] and [gst.buffer_pool.BufferPool.configSetAllocator] the bufferpool parameters and allocator can be configured. Other properties can be configured in the pool depending on the pool implementation.

A bufferpool can have extra options that can be enabled with [gst.buffer_pool.BufferPool.configAddOption]. The available options can be retrieved with [gst.buffer_pool.BufferPool.getOptions]. Some options allow for additional configuration properties to be set.

After the configuration structure has been configured, [gst.buffer_pool.BufferPool.setConfig] updates the configuration in the pool. This can fail when the configuration structure is not accepted.

After the pool has been configured, it can be activated with [gst.buffer_pool.BufferPool.setActive]. This will preallocate the configured resources in the pool.

When the pool is active, [gst.buffer_pool.BufferPool.acquireBuffer] can be used to retrieve a buffer from the pool.

Buffers allocated from a bufferpool will automatically be returned to the pool with [gst.buffer_pool.BufferPool.releaseBuffer] when their refcount drops to 0.

The bufferpool can be deactivated again with [gst.buffer_pool.BufferPool.setActive]. All further [gst.buffer_pool.BufferPool.acquireBuffer] calls will return an error. When all buffers are returned to the pool they will be freed.

Fields
GstObject objectthe parent structure
int flushingwhether the pool is currently gathering back outstanding buffers
void *[4] GstReserved

Parameters passed to the [gst.buffer_pool.BufferPool.acquireBuffer] function to control the allocation of the buffer.

The default implementation ignores the @start and @stop members but other implementations can use this extra information to decide what buffer to return.

Fields
GstFormat formatthe format of @start and @stop
long startthe start position
long stopthe stop position
GstBufferPoolAcquireFlags flagsadditional flags
void *[4] GstReserved

The #GstBufferPool class.

Fields
GstObjectClass objectClassObject parent class
const(char *) * function(GstBufferPool * pool) getOptions
gboolean function(GstBufferPool * pool, GstStructure * config) setConfig
gboolean function(GstBufferPool * pool) start
gboolean function(GstBufferPool * pool) stop
GstFlowReturn function(GstBufferPool * pool, GstBuffer * * buffer, GstBufferPoolAcquireParams * params) acquireBuffer
GstFlowReturn function(GstBufferPool * pool, GstBuffer * * buffer, GstBufferPoolAcquireParams * params) allocBuffer
void function(GstBufferPool * pool, GstBuffer * buffer) resetBuffer
void function(GstBufferPool * pool, GstBuffer * buffer) releaseBuffer
void function(GstBufferPool * pool, GstBuffer * buffer) freeBuffer
void function(GstBufferPool * pool) flushStart
void function(GstBufferPool * pool) flushStop
void *[2] GstReserved
structGstBus

The #GstBus is an object responsible for delivering #GstMessage packets in a first-in first-out way from the streaming threads (see #GstTask) to the application.

Since the application typically only wants to deal with delivery of these messages from one thread, the GstBus will marshall the messages between different threads. This is important since the actual streaming of media is done in another thread than the application.

The GstBus provides support for #GSource based notifications. This makes it possible to handle the delivery in the glib #GMainLoop.

The #GSource callback function [gst.bus.Bus.asyncSignalFunc] can be used to convert all bus messages into signal emissions.

A message is posted on the bus with the [gst.bus.Bus.post] method. With the [gst.bus.Bus.peek] and [gst.bus.Bus.pop] methods one can look at or retrieve a previously posted message.

The bus can be polled with the [gst.bus.Bus.poll] method. This methods blocks up to the specified timeout value until one of the specified messages types is posted on the bus. The application can then [gst.bus.Bus.pop] the messages from the bus to handle them. Alternatively the application can register an asynchronous bus function using [gst.bus.Bus.addWatchFull] or [gst.bus.Bus.addWatch]. This function will install a #GSource in the default glib main loop and will deliver messages a short while after they have been posted. Note that the main loop should be running for the asynchronous callbacks.

It is also possible to get messages from the bus without any thread marshalling with the [gst.bus.Bus.setSyncHandler] method. This makes it possible to react to a message in the same thread that posted the message on the bus. This should only be used if the application is able to deal with messages from different threads.

Every #GstPipeline has one bus.

Note that a #GstPipeline will set its bus into flushing state when changing from READY to NULL state.

Fields
GstObject objectthe parent structure
void *[4] GstReserved

GStreamer bus class.

Fields
GstObjectClass parentClassthe parent class structure
void function(GstBus * bus, GstMessage * message) message
void function(GstBus * bus, GstMessage * message) syncMessage
void *[4] GstReserved

Interface for an array of bytes. It is expected to be subclassed to implement @resize virtual method using language native array implementation, such as GLib's #GByteArray, C++'s std::vector<uint8_t> or Rust's Vec<u8>.

@resize implementation could allocate more than requested to avoid repeated reallocations. It can return false, or be set to null, in the case the array cannot grow.

Fields
ubyte * dataA pointer to an array of bytes.
size_t lenNumber of bytes in @data.
gboolean function(GstByteArrayInterface * self, size_t length) resizeReallocate @data.
void *[4] GstReserved
structGstCaps

Caps (capabilities) are lightweight refcounted objects describing media types. They are composed of an array of #GstStructure.

Caps are exposed on #GstPadTemplate to describe all possible types a given pad can handle. They are also stored in the #GstRegistry along with a description of the #GstElement.

Caps are exposed on the element pads using the [gst.pad.Pad.queryCaps] pad function. This function describes the possible types that the pad can handle or produce at runtime.

A #GstCaps can be constructed with the following code fragment:

`` C GstCaps *caps = gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, "I420", "framerate", GST_TYPE_FRACTION, 25, 1, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, "width", G_TYPE_INT, 320, "height", G_TYPE_INT, 240, NULL); ``

A #GstCaps is fixed when it has no fields with ranges or lists. Use [gst.caps.Caps.isFixed] to test for fixed caps. Fixed caps can be used in a caps event to notify downstream elements of the current media type.

Various methods exist to work with the media types such as subtracting or intersecting.

Be aware that until 1.20 the #GstCaps / #GstStructure serialization into string had limited support for nested #GstCaps / #GstStructure fields. It could only support one level of nesting. Using more levels would lead to unexpected behavior when using serialization features, such as [gst.caps.Caps.toString_] or [gst.global.valueSerialize] and their counterparts.

Fields
GstMiniObject miniObjectthe parent type

#GstCapsFeatures can optionally be set on a #GstCaps to add requirements for additional features for a specific #GstStructure. Caps structures with the same name but with a non-equal set of caps features are not compatible. If a pad supports multiple sets of features it has to add multiple equal structures with different feature sets to the caps.

Empty #GstCapsFeatures are equivalent with the #GstCapsFeatures that only contain #GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANY #GstCapsFeatures as created by [gst.caps_features.CapsFeatures.newAny] are equal to any other #GstCapsFeatures and can be used to specify that any #GstCapsFeatures would be supported, e.g. for elements that don't touch buffer memory. #GstCaps with ANY #GstCapsFeatures are considered non-fixed and during negotiation some #GstCapsFeatures have to be selected.

Examples for caps features would be the requirement of a specific #GstMemory types or the requirement of having a specific #GstMeta on the buffer. Features are given as a string of the format memory:GstMemoryTypeName or meta:GstMetaAPIName.

This interface abstracts handling of property sets for elements with children. Imagine elements such as mixers or polyphonic generators. They all have multiple #GstPad or some kind of voice objects. Another use case are container elements like #GstBin. The element implementing the interface acts as a parent for those child objects.

By implementing this interface the child properties can be accessed from the parent element by using [gst.child_proxy.ChildProxy.get] and [gst.child_proxy.ChildProxy.set].

Property names are written as child-name::property-name. The whole naming scheme is recursive. Thus child1::child2::property is valid too, if child1 and child2 implement the #GstChildProxy interface.

#GstChildProxy interface.

Fields
GTypeInterface parentparent interface type.
GObject * function(GstChildProxy * parent, const(char) * name) getChildByNameFetch a child object by name
GObject * function(GstChildProxy * parent, uint index) getChildByIndexFetch a child object by index
uint function(GstChildProxy * parent) getChildrenCountGet the number of children in @parent
void function(GstChildProxy * parent, GObject * child, const(char) * name) childAddedCalled when @child is added to @parent
void function(GstChildProxy * parent, GObject * child, const(char) * name) childRemovedCalled when @child is removed from @parent
void *[4] GstReserved
structGstClock

GStreamer uses a global clock to synchronize the plugins in a pipeline. Different clock implementations are possible by implementing this abstract base class or, more conveniently, by subclassing #GstSystemClock.

The #GstClock returns a monotonically increasing time with the method [gst.clock.Clock.getTime]. Its accuracy and base time depend on the specific clock implementation but time is always expressed in nanoseconds. Since the baseline of the clock is undefined, the clock time returned is not meaningful in itself, what matters are the deltas between two clock times. The time returned by a clock is called the absolute time.

The pipeline uses the clock to calculate the running time. Usually all renderers synchronize to the global clock using the buffer timestamps, the #GST_EVENT_SEGMENT events and the element's base time, see #GstPipeline.

A clock implementation can support periodic and single shot clock notifications both synchronous and asynchronous.

One first needs to create a #GstClockID for the periodic or single shot notification using [gst.clock.Clock.newSingleShotId] or [gst.clock.Clock.newPeriodicId].

To perform a blocking wait for the specific time of the #GstClockID use [gst.clock.Clock.idWait]. To receive a callback when the specific time is reached in the clock use [gst.clock.Clock.idWaitAsync]. Both these calls can be interrupted with the [gst.clock.Clock.idUnschedule] call. If the blocking wait is unscheduled a return value of #GST_CLOCK_UNSCHEDULED is returned.

Periodic callbacks scheduled async will be repeatedly called automatically until they are unscheduled. To schedule a sync periodic callback, [gst.clock.Clock.idWait] should be called repeatedly.

The async callbacks can happen from any thread, either provided by the core or from a streaming thread. The application should be prepared for this.

A #GstClockID that has been unscheduled cannot be used again for any wait operation, a new #GstClockID should be created and the old unscheduled one should be destroyed with [gst.clock.Clock.idUnref].

It is possible to perform a blocking wait on the same #GstClockID from multiple threads. However, registering the same #GstClockID for multiple async notifications is not possible, the callback will only be called for the thread registering the entry last.

None of the wait operations unref the #GstClockID, the owner is responsible for unreffing the ids itself. This holds for both periodic and single shot notifications. The reason being that the owner of the #GstClockID has to keep a handle to the #GstClockID to unblock the wait on FLUSHING events or state changes and if the entry would be unreffed automatically, the handle might become invalid without any notification.

These clock operations do not operate on the running time, so the callbacks will also occur when not in PLAYING state as if the clock just keeps on running. Some clocks however do not progress when the element that provided the clock is not PLAYING.

When a clock has the #GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be slaved to another #GstClock with [gst.clock.Clock.setMaster]. The clock will then automatically be synchronized to this master clock by repeatedly sampling the master clock and the slave clock and recalibrating the slave clock with [gst.clock.Clock.setCalibration]. This feature is mostly useful for plugins that have an internal clock but must operate with another clock selected by the #GstPipeline. They can track the offset and rate difference of their internal clock relative to the master clock by using the [gst.clock.Clock.getCalibration] function.

The master/slave synchronisation can be tuned with the #GstClock:timeout, #GstClock:window-size and #GstClock:window-threshold properties. The #GstClock:timeout property defines the interval to sample the master clock and run the calibration functions. #GstClock:window-size defines the number of samples to use when calibrating and #GstClock:window-threshold defines the minimum number of samples before the calibration is performed.

Fields
GstObject objectthe parent structure
void *[4] GstReserved

GStreamer clock class. Override the vmethods to implement the clock functionality.

Fields
GstObjectClass parentClassthe parent class structure
GstClockTime function(GstClock * clock, GstClockTime oldResolution, GstClockTime newResolution) changeResolution
GstClockTime function(GstClock * clock) getResolution
GstClockTime function(GstClock * clock) getInternalTime
GstClockReturn function(GstClock * clock, GstClockEntry * entry, GstClockTimeDiff * jitter) wait
GstClockReturn function(GstClock * clock, GstClockEntry * entry) waitAsync
void function(GstClock * clock, GstClockEntry * entry) unschedule
void *[4] GstReserved

All pending timeouts or periodic notifies are converted into an entry. Note that GstClockEntry should be treated as an opaque structure. It must not be extended or allocated using a custom allocator.

Fields
int refcountreference counter (read-only)
GstClock * clock
GstClockTime interval
void * userData
GDestroyNotify destroyData
gboolean unscheduled
gboolean wokenUp
void *[4] GstReserved

#GstContext is a container object used to store contexts like a device context, a display server connection and similar concepts that should be shared between multiple elements.

Applications can set a context on a complete pipeline by using [gst.element.Element.setContext], which will then be propagated to all child elements. Elements can handle these in #GstElementClass::set_context and merge them with the context information they already have.

When an element needs a context it will do the following actions in this order until one step succeeds:

  1. Check if the element already has a context
  2. Query downstream with [gst.types.QueryType.Context] for the context
  3. Query upstream with [gst.types.QueryType.Context] for the context
  4. Post a [gst.types.MessageType.NeedContext] message on the bus with the required

context types and afterwards check if a usable context was set now

  1. Create a context by itself and post a [gst.types.MessageType.HaveContext] message

on the bus.

Bins will catch [gst.types.MessageType.NeedContext] messages and will set any previously known context on the element that asks for it if possible. Otherwise the application should provide one if it can.

#GstContext can be persistent. A persistent #GstContext is kept in elements when they reach [gst.types.State.Null], non-persistent ones will be removed. Also, a non-persistent context won't override a previous persistent context set to an element.

A base class for value mapping objects that attaches control sources to #GObject properties. Such an object is taking one or more #GstControlSource instances, combines them and maps the resulting value to the type and value range of the bound property.

Fields
GstObject parentthe parent structure
char * namename of the property of this binding
GParamSpec * pspec#GParamSpec for this property
GstObject * object
gboolean disabled
ABIType ABI

The class structure of #GstControlBinding.

Fields
GstObjectClass parentClassParent class
gboolean function(GstControlBinding * binding, GstObject * object, GstClockTime timestamp, GstClockTime lastSync) syncValues
GValue * function(GstControlBinding * binding, GstClockTime timestamp) getValue
gboolean function(GstControlBinding * binding, GstClockTime timestamp, GstClockTime interval, uint nValues, void * values) getValueArray
gboolean function(GstControlBinding * binding, GstClockTime timestamp, GstClockTime interval, uint nValues, GValue * values) getGValueArray
void *[4] GstReserved

The #GstControlSource is a base class for control value sources that could be used to get timestamp-value pairs. A control source essentially is a function over time.

A #GstControlSource is used by first getting an instance of a specific control-source, creating a binding for the control-source to the target property of the element and then adding the binding to the element. The binding will convert the data types and value range to fit to the bound property.

For implementing a new #GstControlSource one has to implement #GstControlSourceGetValue and #GstControlSourceGetValueArray functions. These are then used by [gst.control_source.ControlSource.controlSourceGetValue] and [gst.control_source.ControlSource.controlSourceGetValueArray] to get values for specific timestamps.

Fields
GstObject parentthe parent structure
GstControlSourceGetValue getValueFunction for returning a value for a given timestamp
GstControlSourceGetValueArray getValueArrayFunction for returning a values array for a given timestamp
void *[4] GstReserved

The class structure of #GstControlSource.

Fields
GstObjectClass parentClassParent class
void *[4] GstReserved

Extra custom metadata. The @structure field is the same as returned by [gst.custom_meta.CustomMeta.getStructure].

Since 1.24 it can be serialized using [gst.meta.Meta.serialize] and [gst.meta.Meta.deserialize], but only if the #GstStructure does not contain any fields that cannot be serialized, see [gst.types.SerializeFlags.Strict].

Fields
GstMeta metaparent #GstMeta
GstStructure * structure#GstStructure containing custom metadata.

Struct to store date, time and timezone information altogether. #GstDateTime is refcounted and immutable.

Date information is handled using the [proleptic Gregorian calendar].

Provides basic creation functions and accessor functions to its fields.

[proleptic Gregorian calendar]: https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar

This is the struct that describes the categories. Once initialized with #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore.

Fields
int threshold
uint color
const(char) * name
const(char) * description
structGstDevice

#GstDevice are objects representing a device, they contain relevant metadata about the device, such as its class and the #GstCaps representing the media types it can produce or handle.

#GstDevice are created by #GstDeviceProvider objects which can be aggregated by #GstDeviceMonitor objects.

Fields
GstObject parentThe parent #GstObject structure.
void *[4] GstReserved

The class structure for a #GstDevice object.

Fields
GstObjectClass parentClassThe parent #GstObjectClass structure.
GstElement * function(GstDevice * device, const(char) * name) createElementCreates the fully configured element to access this device. Subclasses need to override this and return a new element.
gboolean function(GstDevice * device, GstElement * element) reconfigureElementThis only needs to be implemented by subclasses if the element can be reconfigured to use a different device. See the documentation for [gst.device.Device.reconfigureElement].
void *[4] GstReserved

Applications should create a #GstDeviceMonitor when they want to probe, list and monitor devices of a specific type. The #GstDeviceMonitor will create the appropriate #GstDeviceProvider objects and manage them. It will then post messages on its #GstBus for devices that have been added and removed.

The device monitor will monitor all devices matching the filters that the application has set.

The basic use pattern of a device monitor is as follows:

static gboolean
 my_bus_func (GstBus * bus, GstMessage * message, gpointer user_data)
 {
    GstDevice *device;
    gchar *name;

    switch (GST_MESSAGE_TYPE (message)) {
      case GST_MESSAGE_DEVICE_ADDED:
        gst_message_parse_device_added (message, &device);
        name = gst_device_get_display_name (device);
        g_print("Device added: %s\n", name);
        g_free (name);
        gst_object_unref (device);
        break;
      case GST_MESSAGE_DEVICE_REMOVED:
        gst_message_parse_device_removed (message, &device);
        name = gst_device_get_display_name (device);
        g_print("Device removed: %s\n", name);
        g_free (name);
        gst_object_unref (device);
        break;
      default:
        break;
    }

    return G_SOURCE_CONTINUE;
 }

 GstDeviceMonitor *
 setup_raw_video_source_device_monitor (void) {
    GstDeviceMonitor *monitor;
    GstBus *bus;
    GstCaps *caps;

    monitor = gst_device_monitor_new ();

    bus = gst_device_monitor_get_bus (monitor);
    gst_bus_add_watch (bus, my_bus_func, NULL);
    gst_object_unref (bus);

    caps = gst_caps_new_empty_simple ("video/x-raw");
    gst_device_monitor_add_filter (monitor, "Video/Source", caps);
    gst_caps_unref (caps);

    gst_device_monitor_start (monitor);

    return monitor;
 }

Fields
GstObject parentthe parent #GstObject structure
void *[4] GstReserved

Opaque device monitor class structure.

Fields
GstObjectClass parentClassthe parent #GstObjectClass structure
void *[4] GstReserved

A #GstDeviceProvider subclass is provided by a plugin that handles devices if there is a way to programmatically list connected devices. It can also optionally provide updates to the list of connected devices.

Each #GstDeviceProvider subclass is a singleton, a plugin should normally provide a single subclass for all devices.

Applications would normally use a #GstDeviceMonitor to monitor devices from all relevant providers.

Fields
GstObject parentThe parent #GstObject
GList * devicesa #GList of the #GstDevice objects
void *[4] GstReserved

The structure of the base #GstDeviceProviderClass

Fields
GstObjectClass parentClassthe parent #GstObjectClass structure
GstDeviceProviderFactory * factorya pointer to the #GstDeviceProviderFactory that creates this provider
GList * function(GstDeviceProvider * provider) probeReturns a list of devices that are currently available. This should never block. The devices should not have a parent and should be floating.
gboolean function(GstDeviceProvider * provider) startStarts monitoring for new devices. Only subclasses that can know that devices have been added or remove need to implement this method.
void function(GstDeviceProvider * provider) stopStops monitoring for new devices. Only subclasses that implement the start() method need to implement this method.
void * metadata
void *[4] GstReserved

#GstDeviceProviderFactory is used to create instances of device providers. A GstDeviceProviderfactory can be added to a #GstPlugin as it is also a #GstPluginFeature.

Use the [gst.device_provider_factory.DeviceProviderFactory.find] and [gst.device_provider_factory.DeviceProviderFactory.get] functions to create device provider instances or use [gst.device_provider_factory.DeviceProviderFactory.getByName] as a convenient shortcut.

The opaque #GstDeviceProviderFactoryClass data structure.

A fundamental type that describes a #gdouble range

#GstDynamicTypeFactory is used to represent a type that can be automatically loaded the first time it is used. For example, a non-standard type for use in caps fields.

In general, applications and plugins don't need to use the factory beyond registering the type in a plugin init function. Once that is done, the type is stored in the registry, and ready as soon as the registry is loaded.

Registering a type for dynamic loading

static gboolean
plugin_init (GstPlugin * plugin)
{
 return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD);
}

GstElement is the abstract base class needed to construct an element that can be used in a GStreamer pipeline. Please refer to the plugin writers guide for more information on creating #GstElement subclasses.

The name of a #GstElement can be get with gst_element_get_name() and set with gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the core when using the appropriate locking. Do not use this in plug-ins or applications in order to retain ABI compatibility.

Elements can have pads (of the type #GstPad). These pads link to pads on other elements. #GstBuffer flow between these linked pads. A #GstElement has a #GList of #GstPad structures for all their input (or sink) and output (or source) pads. Core and plug-in writers can add and remove pads with [gst.element.Element.addPad] and [gst.element.Element.removePad].

An existing pad of an element can be retrieved by name with [gst.element.Element.getStaticPad]. A new dynamic pad can be created using [gst.element.Element.requestPad] with a #GstPadTemplate. An iterator of all pads can be retrieved with [gst.element.Element.iteratePads].

Elements can be linked through their pads. If the link is straightforward, use the [gst.element.Element.link] convenience function to link two elements, or [gst.element.Element.linkMany] for more elements in a row. Use [gst.element.Element.linkFiltered] to link two elements constrained by a specified set of #GstCaps. For finer control, use [gst.element.Element.linkPads] and [gst.element.Element.linkPadsFiltered] to specify the pads to link on each element by name.

Each element has a state (see #GstState). You can get and set the state of an element with [gst.element.Element.getState] and [gst.element.Element.setState]. Setting a state triggers a #GstStateChange. To get a string representation of a #GstState, use [gst.element.Element.stateGetName].

You can get and set a #GstClock on an element using [gst.element.Element.getClock] and [gst.element.Element.setClock]. Some elements can provide a clock for the pipeline if the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the [gst.element.Element.provideClock] method one can retrieve the clock provided by such an element. Not all elements require a clock to operate correctly. If the #GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the element with [gst.element.Element.setClock].

Note that clock selection and distribution is normally handled by the toplevel #GstPipeline so the clock functions are only to be used in very specific situations.

Fields
GstObject object
GRecMutex stateLockUsed to serialize execution of [gst.element.Element.setState]
GCond stateCondUsed to signal completion of a state change
uint stateCookieUsed to detect concurrent execution of [gst.element.Element.setState] and [gst.element.Element.getState]
GstState targetStatethe target state of an element as set by the application
GstState currentStatethe current state of an element
GstState nextStatethe next state of an element, can be #GSTSTATEVOID_PENDING if the element is in the correct state.
GstState pendingStatethe final state the element should go to, can be #GSTSTATEVOID_PENDING if the element is in the correct state
GstStateChangeReturn lastReturnthe last return value of an element state change
GstBus * busthe bus of the element. This bus is provided to the element by the parent element or the application. A #GstPipeline has a bus of its own.
GstClock * clockthe clock of the element. This clock is usually provided to the element by the toplevel #GstPipeline.
GstClockTimeDiff baseTimethe time of the clock right before the element is set to PLAYING. Subtracting @basetime from the current clock time in the PLAYING state will yield the runningtime against the clock.
GstClockTime startTimethe running_time of the last PAUSED state
ushort numpadsnumber of pads of the element, includes both source and sink pads.
GList * padslist of pads
ushort numsrcpadsnumber of source pads of the element.
GList * srcpadslist of source pads
ushort numsinkpadsnumber of sink pads of the element.
GList * sinkpadslist of sink pads
uint padsCookieupdated whenever the a pad is added or removed
GList * contextslist of contexts
void *[3] GstReserved

GStreamer element class. Override the vmethods to implement the element functionality.

Fields
GstObjectClass parentClassthe parent class structure
void * metadatametadata for elements of this class
GstElementFactory * elementfactorythe #GstElementFactory that creates these elements
GList * padtemplatesa #GList of #GstPadTemplate
int numpadtemplatesthe number of padtemplates
uint padTemplCookiechanged whenever the padtemplates change
void function(GstElement * element, GstPad * pad) padAdded
void function(GstElement * element, GstPad * pad) padRemoved
void function(GstElement * element) noMorePads
GstPad * function(GstElement * element, GstPadTemplate * templ, const(char) * name, const(GstCaps) * caps) requestNewPadcalled when a new pad is requested
void function(GstElement * element, GstPad * pad) releasePadcalled when a request pad is to be released
GstStateChangeReturn function(GstElement * element, GstState * state, GstState * pending, GstClockTime timeout) getStateget the state of the element
GstStateChangeReturn function(GstElement * element, GstState state) setStateset a new state on the element
GstStateChangeReturn function(GstElement * element, GstStateChange transition) changeStatecalled by @set_state to perform an incremental state change
void function(GstElement * element, GstState oldstate, GstState newstate, GstState pending) stateChangedcalled immediately after a new state was set.
void function(GstElement * element, GstBus * bus) setBusset a #GstBus on the element
GstClock * function(GstElement * element) provideClockgets the #GstClock provided by the element
gboolean function(GstElement * element, GstClock * clock) setClockset the #GstClock on the element
gboolean function(GstElement * element, GstEvent * event) sendEventsend a #GstEvent to the element
gboolean function(GstElement * element, GstQuery * query) queryperform a #GstQuery on the element
gboolean function(GstElement * element, GstMessage * message) postMessagecalled when a message is posted on the element. Chain up to the parent class' handler to have it posted on the bus.
void function(GstElement * element, GstContext * context) setContextset a #GstContext on the element
void *[18] GstReserved

#GstElementFactory is used to create instances of elements. A GstElementFactory can be added to a #GstPlugin as it is also a #GstPluginFeature.

Use the [gst.element_factory.ElementFactory.find] and [gst.element_factory.ElementFactory.create] functions to create element instances or use [gst.element_factory.ElementFactory.make] as a convenient shortcut.

The following code example shows you how to create a GstFileSrc element.

Using an element factory

#include <gst/gst.h>

 GstElement *src;
 GstElementFactory *srcfactory;

 gst_init (&argc, &argv);

 srcfactory = gst_element_factory_find ("filesrc");
 g_return_if_fail (srcfactory != NULL);
 src = gst_element_factory_create (srcfactory, "src");
 g_return_if_fail (src != NULL);
 ...

structGstEvent

The event class provides factory methods to construct events for sending and functions to query (parse) received events.

Events are usually created with gst_event_new_*() which takes event-type specific parameters as arguments. To send an event application will usually use [gst.element.Element.sendEvent] and elements will use [gst.pad.Pad.sendEvent] or [gst.pad.Pad.pushEvent]. The event should be unreffed with gst_event_unref() if it has not been sent.

Events that have been received can be parsed with their respective gst_event_parse_*() functions. It is valid to pass null for unwanted details.

Events are passed between elements in parallel to the data stream. Some events are serialized with buffers, others are not. Some events only travel downstream, others only upstream. Some events can travel both upstream and downstream.

The events are used to signal special conditions in the datastream such as EOS (end of stream) or the start of a new stream-segment. Events are also used to flush the pipeline of any pending data.

Most of the event API is used inside plugins. Applications usually only construct and use seek events. To do that [gst.event.Event.newSeek] is used to create a seek event. It takes the needed parameters to specify seeking time and mode.

GstEvent *event;
 gboolean result;
 ...
 // construct a seek event to play the media from second 2 to 5, flush
 // the pipeline to decrease latency.
 event = gst_event_new_seek (1.0,
    GST_FORMAT_TIME,
    GST_SEEK_FLAG_FLUSH,
    GST_SEEK_TYPE_SET, 2 * GST_SECOND,
    GST_SEEK_TYPE_SET, 5 * GST_SECOND);
 ...
 result = gst_element_send_event (pipeline, event);
 if (!result)
   g_warning ("seek failed");
 ...

Fields
GstMiniObject miniObjectthe parent structure
GstEventType typethe #GstEventType of the event
ulong timestampthe timestamp of the event
uint seqnumthe sequence number of the event

A fundamental type that describes a 32-bit flag bitfield, with 32-bit mask indicating which of the bits in the field are explicitly set.

A format definition

Fields
GstFormat valueThe unique id of this format
const(char) * nickA short nick of the format
const(char) * descriptionA longer description of the format
GQuark quarkA quark for the nick

A fundamental type that describes a fraction of an integer numerator over an integer denominator

A fundamental type that describes a #GstFractionRange range

GhostPads are useful when organizing pipelines with #GstBin like elements. The idea here is to create hierarchical element graphs. The bin element contains a sub-graph. Now one would like to treat the bin-element like any other #GstElement. This is where GhostPads come into play. A GhostPad acts as a proxy for another pad. Thus the bin can have sink and source ghost-pads that are associated with sink and source pads of the child elements.

If the target pad is known at creation time, [gst.ghost_pad.GhostPad.new_] is the function to use to get a ghost-pad. Otherwise one can use [gst.ghost_pad.GhostPad.newNoTarget] to create the ghost-pad and use [gst.ghost_pad.GhostPad.setTarget] to establish the association later on.

Note that GhostPads add overhead to the data processing of a pipeline.

Fields
GstProxyPadClass parentClass
void *[4] GstReserved

A fundamental type that describes a #gint64 range

A fundamental type that describes a #gint range

A GstIterator is used to retrieve multiple objects from another object in a threadsafe way.

Various GStreamer objects provide access to their internal structures using an iterator.

Note that if calling a GstIterator function results in your code receiving a refcounted object (with, say, [gobject.value.Value.getObject]), the refcount for that object will not be increased. Your code is responsible for taking a reference if it wants to continue using it later.

The basic use pattern of an iterator is as follows:

GstIterator *it = _get_iterator(object);
 GValue item = G_VALUE_INIT;
 done = FALSE;
 while (!done) {
   switch (gst_iterator_next (it, &item)) {
     case GST_ITERATOR_OK:
       ...get/use/change item here...
       g_value_reset (&item);
       break;
     case GST_ITERATOR_RESYNC:
       ...rollback changes to items...
       gst_iterator_resync (it);
       break;
     case GST_ITERATOR_ERROR:
       ...wrong parameters were given...
       done = TRUE;
       break;
     case GST_ITERATOR_DONE:
       done = TRUE;
       break;
   }
 }
 g_value_unset (&item);
 gst_iterator_free (it);

Fields
GstIteratorCopyFunction copyThe function to copy the iterator
GstIteratorNextFunction nextThe function to get the next item in the iterator
GstIteratorItemFunction itemThe function to be called for each item retrieved
GstIteratorResyncFunction resyncThe function to call when a resync is needed.
GstIteratorFreeFunction freeThe function to call when the iterator is freed
GstIterator * pushedThe iterator that is currently pushed with [gst.iterator.Iterator.push]
GType typeThe type of the object that this iterator will return
GMutex * lockThe lock protecting the data structure and the cookie.
uint cookieThe cookie; the value of the master_cookie when this iterator was created.
uint * masterCookieA pointer to the master cookie.
uint sizethe size of the iterator
void *[4] GstReserved

A structure containing the result of a map operation such as [gst.memory.Memory.map]. It contains the data and size.

#GstMapInfo cannot be used with g_auto() because it is ambiguous whether it needs to be unmapped using [gst.buffer.Buffer.unmap] or [gst.memory.Memory.unmap]. Instead, #GstBufferMapInfo and #GstMemoryMapInfo can be used in that case.

Fields
GstMemory * memorya pointer to the mapped memory
GstMapFlags flagsflags used when mapping the memory
ubyte * dataa pointer to the mapped data
size_t sizethe valid size in @data
size_t maxsizethe maximum bytes in @data
void *[4] userDataextra private user_data that the implementation of the memory can use to store extra info.
void *[4] GstReserved
structGstMemory

GstMemory is a lightweight refcounted object that wraps a region of memory. They are typically used to manage the data of a #GstBuffer.

A GstMemory object has an allocated region of memory of maxsize. The maximum size does not change during the lifetime of the memory object. The memory also has an offset and size property that specifies the valid range of memory in the allocated region.

Memory is usually created by allocators with a [gst.allocator.Allocator.alloc] method call. When null is used as the allocator, the default allocator will be used.

New allocators can be registered with [gst.allocator.Allocator.register]. Allocators are identified by name and can be retrieved with [gst.allocator.Allocator.find]. [gst.allocator.Allocator.setDefault] can be used to change the default allocator.

New memory can be created with [gst.memory.Memory.newWrapped] that wraps the memory allocated elsewhere.

Refcounting of the memory block is performed with gst_memory_ref() and gst_memory_unref().

The size of the memory can be retrieved and changed with [gst.memory.Memory.getSizes] and [gst.memory.Memory.resize] respectively.

Getting access to the data of the memory is performed with [gst.memory.Memory.map]. The call will return a pointer to offset bytes into the region of memory. After the memory access is completed, [gst.memory.Memory.unmap] should be called.

Memory can be copied with [gst.memory.Memory.copy], which will return a writable copy. [gst.memory.Memory.share] will create a new memory block that shares the memory with an existing memory block at a custom offset and with a custom size.

Memory can be efficiently merged when [gst.memory.Memory.isSpan] returns true.

Fields
GstMiniObject miniObjectparent structure
GstAllocator * allocatorpointer to the #GstAllocator
GstMemory * parentparent memory block
size_t maxsizethe maximum size allocated
size_t align_the alignment of the memory
size_t offsetthe offset where valid data starts
size_t sizethe size of valid data

Messages are implemented as a subclass of #GstMiniObject with a generic #GstStructure as the content. This allows for writing custom messages without requiring an API change while allowing a wide range of different types of messages.

Messages are posted by objects in the pipeline and are passed to the application using the #GstBus.

The basic use pattern of posting a message on a #GstBus is as follows:

gst_bus_post (bus, gst_message_new_eos());

A #GstElement usually posts messages on the bus provided by the parent container using [gst.element.Element.postMessage].

Fields
GstMiniObject miniObjectthe parent structure
GstMessageType typethe #GstMessageType of the message
ulong timestampthe timestamp of the message
GstObject * srcthe src of the message
uint seqnumthe sequence number of the message
GMutex lock
GCond cond
structGstMeta

The #GstMeta structure should be included as the first member of a #GstBuffer metadata structure. The structure defines the API of the metadata and should be accessible to all elements using the metadata.

A metadata API is registered with [gst.meta.Meta.apiTypeRegister] which takes a name for the metadata API and some tags associated with the metadata. With [gst.meta.Meta.apiTypeHasTag] one can check if a certain metadata API contains a given tag.

Multiple implementations of a metadata API can be registered. To implement a metadata API, [gst.meta.Meta.register] should be used. This function takes all parameters needed to create, free and transform metadata along with the size of the metadata. The function returns a #GstMetaInfo structure that contains the information for the implementation of the API.

A specific implementation can be retrieved by name with [gst.meta.Meta.getInfo].

See #GstBuffer for how the metadata can be added, retrieved and removed from buffers.

Fields
GstMetaFlags flagsextra flags for the metadata
const(GstMetaInfo) * infopointer to the #GstMetaInfo

The #GstMetaInfo provides information about a specific metadata structure.

Fields
GType apitag identifying the metadata structure and api
GType typetype identifying the implementor of the api
size_t sizesize of the metadata
GstMetaInitFunction initFuncfunction for initializing the metadata
GstMetaFreeFunction freeFuncfunction for freeing the metadata
GstMetaTransformFunction transformFuncfunction for transforming the metadata
GstMetaSerializeFunction serializeFuncFunction for serializing the metadata, or null if not supported by this meta.
GstMetaDeserializeFunction deserializeFuncFunction for deserializing the metadata, or null if not supported by this meta.
GstMetaClearFunction clearFuncFunction for clearing the metadata, or null if not supported by this meta. This is called by the buffer pool when a buffer is returned for pooled metas.

Extra data passed to a "gst-copy" transform #GstMetaTransformFunction.

Fields
gboolean regiontrue if only region is copied
size_t offsetthe offset to copy, 0 if @region is false, otherwise > 0
size_t sizethe size to copy, -1 or the buffer size when @region is false

#GstMiniObject is a simple structure that can be used to implement refcounted types.

Subclasses will include #GstMiniObject as the first member in their structure and then call [gst.mini_object.MiniObject.init_] to initialize the #GstMiniObject fields.

[gst.mini_object.MiniObject.ref_] and [gst.mini_object.MiniObject.unref] increment and decrement the refcount respectively. When the refcount of a mini-object reaches 0, the dispose function is called first and when this returns true, the free function of the miniobject is called.

A copy can be made with [gst.mini_object.MiniObject.copy].

[gst.mini_object.MiniObject.isWritable] will return true when the refcount of the object is exactly 1 and there is no parent or a single parent exists and is writable itself, meaning the current caller has the only reference to the object. [gst.mini_object.MiniObject.makeWritable] will return a writable version of the object, which might be a new copy when the refcount was not 1.

Opaque data can be associated with a #GstMiniObject with [gst.mini_object.MiniObject.setQdata] and [gst.mini_object.MiniObject.getQdata]. The data is meant to be specific to the particular object and is not automatically copied with [gst.mini_object.MiniObject.copy] or similar methods.

A weak reference can be added and remove with [gst.mini_object.MiniObject.weakRef] and [gst.mini_object.MiniObject.weakUnref] respectively.

Fields
GType typethe GType of the object
int refcountatomic refcount
int lockstateatomic state of the locks
uint flagsextra flags.
GstMiniObjectCopyFunction copya copy function
GstMiniObjectDisposeFunction disposea dispose function
GstMiniObjectFreeFunction freethe free function
uint privUint
void * privPointer

GStreamer base object class.

Fields
GInitiallyUnownedClass parentClassparent
const(char) * pathStringSeparatorseparator used by [gst.object.ObjectWrap.getPathString]
void function(GstObject * object, GstObject * orig, GParamSpec * pspec) deepNotifydefault signal handler
void *[4] GstReserved
structGstObject

#GstObject provides a root for the object hierarchy tree filed in by the GStreamer library. It is currently a thin wrapper on top of #GInitiallyUnowned. It is an abstract class that is not very usable on its own.

#GstObject gives us basic refcounting, parenting functionality and locking. Most of the functions are just extended for special GStreamer needs and can be found under the same name in the base class of #GstObject which is #GObject (e.g. [gobject.object.ObjectWrap.ref_] becomes [gst.object.ObjectWrap.ref_]).

Since #GstObject derives from #GInitiallyUnowned, it also inherits the floating reference. Be aware that functions such as [gst.bin.Bin.add] and [gst.element.Element.addPad] take ownership of the floating reference.

In contrast to #GObject instances, #GstObject adds a name property. The functions [gst.object.ObjectWrap.setName] and [gst.object.ObjectWrap.getName] are used to set/get the name of the object.

controlled properties

Controlled properties offers a lightweight way to adjust gobject properties over stream-time. It works by using time-stamped value pairs that are queued for element-properties. At run-time the elements continuously pull value changes for the current stream-time.

What needs to be changed in a #GstElement? Very little - it is just two steps to make a plugin controllable!

  • mark gobject-properties paramspecs that make sense to be controlled,

by GST_PARAM_CONTROLLABLE.

  • when processing data (get, chain, loop function) at the beginning call

gst_object_sync_values(element,timestamp). This will make the controller update all GObject properties that are under its control with the current values based on the timestamp.

What needs to be done in applications? Again it's not a lot to change.

  • create a #GstControlSource.

csource = gst_interpolation_control_source_new (); g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL);

  • Attach the #GstControlSource on the controller to a property.

gst_object_add_control_binding (object, gst_direct_control_binding_new (object, "prop1", csource));

  • Set the control values

gst_timed_value_control_source_set ((GstTimedValueControlSource )csource,0 GST_SECOND, value1); gst_timed_value_control_source_set ((GstTimedValueControlSource )csource,1 GST_SECOND, value2);

  • start your pipeline
Fields
GMutex lockobject LOCK
char * nameThe name of the object
GstObject * parentthis object's parent, weak ref
uint flagsflags for this object
GList * controlBindings
ulong controlRate
ulong lastSync
void * GstReserved
structGstPad

A #GstElement is linked to other elements via "pads", which are extremely light-weight generic link points.

Pads have a #GstPadDirection, source pads produce data, sink pads consume data.

Pads are typically created from a #GstPadTemplate with [gst.pad.Pad.newFromTemplate] and are then added to a #GstElement. This usually happens when the element is created but it can also happen dynamically based on the data that the element is processing or based on the pads that the application requests.

Pads without pad templates can be created with [gst.pad.Pad.new_], which takes a direction and a name as an argument. If the name is null, then a guaranteed unique name will be assigned to it.

A #GstElement creating a pad will typically use the various gst_pad_set_*_function\() calls to register callbacks for events, queries or dataflow on the pads.

gst_pad_get_parent() will retrieve the #GstElement that owns the pad.

After two pads are retrieved from an element by [gst.element.Element.getStaticPad], the pads can be linked with [gst.pad.Pad.link]. (For quick links, you can also use [gst.element.Element.link], which will make the obvious link for you if it's straightforward.). Pads can be unlinked again with [gst.pad.Pad.unlink]. [gst.pad.Pad.getPeer] can be used to check what the pad is linked to.

Before dataflow is possible on the pads, they need to be activated with [gst.pad.Pad.setActive].

[gst.pad.Pad.query] and [gst.pad.Pad.peerQuery] can be used to query various properties of the pad and the stream.

To send a #GstEvent on a pad, use [gst.pad.Pad.sendEvent] and [gst.pad.Pad.pushEvent]. Some events will be sticky on the pad, meaning that after they pass on the pad they can be queried later with [gst.pad.Pad.getStickyEvent] and [gst.pad.Pad.stickyEventsForeach]. [gst.pad.Pad.getCurrentCaps] and [gst.pad.Pad.hasCurrentCaps] are convenience functions to query the current sticky CAPS event on a pad.

GstElements will use [gst.pad.Pad.push] and [gst.pad.Pad.pullRange] to push out or pull in a buffer.

The dataflow, events and queries that happen on a pad can be monitored with probes that can be installed with [gst.pad.Pad.addProbe]. [gst.pad.Pad.isBlocked] can be used to check if a block probe is installed on the pad. [gst.pad.Pad.isBlocking] checks if the blocking probe is currently blocking the pad. [gst.pad.Pad.removeProbe] is used to remove a previously installed probe and unblock blocking probes if any.

Pad have an offset that can be retrieved with [gst.pad.Pad.getOffset]. This offset will be applied to the running_time of all data passing over the pad. [gst.pad.Pad.setOffset] can be used to change the offset.

Convenience functions exist to start, pause and stop the task on a pad with [gst.pad.Pad.startTask], [gst.pad.Pad.pauseTask] and [gst.pad.Pad.stopTask] respectively.

Fields
GstObject object
void * elementPrivateprivate data owned by the parent element
GstPadTemplate * padtemplatepadtemplate for this pad
GstPadDirection directionthe direction of the pad, cannot change after creating the pad.
GRecMutex streamRecLock
GstTask * task
GCond blockCond
GHookList probes
void * activatedata
GDestroyNotify activatenotify
void * activatemodedata
GDestroyNotify activatemodenotify
GstPad * peer
void * linkdata
GDestroyNotify linknotify
void * unlinkdata
GDestroyNotify unlinknotify
void * chaindata
GDestroyNotify chainnotify
void * chainlistdata
GDestroyNotify chainlistnotify
void * getrangedata
GDestroyNotify getrangenotify
void * eventdata
GDestroyNotify eventnotify
long offset
void * querydata
GDestroyNotify querynotify
void * iterintlinkdata
GDestroyNotify iterintlinknotify
int numProbes
int numBlocked
ABIType ABI
Fields
GstObjectClass parentClass
void function(GstPad * pad, GstPad * peer) linked
void function(GstPad * pad, GstPad * peer) unlinked
void *[4] GstReserved

Info passed in the #GstPadProbeCallback.

Fields
GstPadProbeType typethe current probe type
gulong idthe id of the probe
void * datatype specific data, check the @type field to know the datatype. This field can be null.
ulong offsetoffset of pull probe, this field is valid when @type contains #GSTPADPROBETYPEPULL
uint sizesize of pull probe, this field is valid when @type contains #GSTPADPROBETYPEPULL
ABIType ABI

Padtemplates describe the possible media types a pad or an elementfactory can handle. This allows for both inspection of handled types before loading the element plugin as well as identifying pads on elements that are not yet created (request or sometimes pads).

Pad and PadTemplates have #GstCaps attached to it to describe the media type they are capable of dealing with. [gst.pad_template.PadTemplate.getCaps] or GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not possible to modify the caps of a padtemplate after creation.

PadTemplates have a #GstPadPresence property which identifies the lifetime of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also the direction of the pad can be retrieved from the #GstPadTemplate with GST_PAD_TEMPLATE_DIRECTION().

The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads because it has to be used as the name in the [gst.element.Element.requestPadSimple] call to instantiate a pad from this template.

Padtemplates can be created with [gst.pad_template.PadTemplate.new_] or with gst_static_pad_template_get (), which creates a #GstPadTemplate from a #GstStaticPadTemplate that can be filled with the convenient GST_STATIC_PAD_TEMPLATE() macro.

A padtemplate can be used to create a pad (see [gst.pad.Pad.newFromTemplate] or gst_pad_new_from_static_template ()) or to add to an element class (see gst_element_class_add_static_pad_template ()).

The following code example shows the code to create a pad from a padtemplate.

GstStaticPadTemplate my_template =
 GST_STATIC_PAD_TEMPLATE (
   "sink",          // the name of the pad
   GST_PAD_SINK,    // the direction of the pad
   GST_PAD_ALWAYS,  // when this pad will be present
   GST_STATIC_CAPS (        // the capabilities of the padtemplate
     "audio/x-raw, "
       "channels = (int) [ 1, 6 ]"
   )
 );
 void
 my_method (void)
 {
   GstPad *pad;
   pad = gst_pad_new_from_static_template (&my_template, "sink");
   ...
 }

The following example shows you how to add the padtemplate to an element class, this is usually done in the class_init of the class:

static void
 my_element_class_init (GstMyElementClass *klass)
 {
   GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);

   gst_element_class_add_static_pad_template (gstelement_class, &my_template);
 }

Fields
GstObject object
char * nameTemplate
GstPadDirection direction
GstCaps * caps
ABIType ABI
Fields
GstObjectClass parentClass
void function(GstPadTemplate * templ, GstPad * pad) padCreated
void *[4] GstReserved

A fundamental type that describes a #GParamSpec for arrays of values

A fundamental type that describes a #GParamSpec for fractional properties

A GParamSpec derived structure for arrays of values.

Fields
GParamSpec parentInstancesuper class
GParamSpec * elementSpecthe #GParamSpec of the type of values in the array

A GParamSpec derived structure that contains the meta data for fractional properties.

Fields
GParamSpec parentInstancesuper class
int minNumminimal numerator
int minDenminimal denominator
int maxNummaximal numerator
int maxDenmaximal denominator
int defNumdefault numerator
int defDendefault denominator

The #GstParentBufferMeta is a #GstMeta which can be attached to a #GstBuffer to hold a reference to another buffer that is only released when the child #GstBuffer is released.

Typically, #GstParentBufferMeta is used when the child buffer is directly using the #GstMemory of the parent buffer, and wants to prevent the parent buffer from being returned to a buffer pool until the #GstMemory is available for re-use.

Fields
GstMeta parentthe parent #GstMeta structure
GstBuffer * bufferthe #GstBuffer on which a reference is being held.

Opaque structure.

A #GstPipeline is a special #GstBin used as the toplevel container for the filter graph. The #GstPipeline will manage the selection and distribution of a global #GstClock as well as provide a #GstBus to the application.

[gst.pipeline.Pipeline.new_] is used to create a pipeline. when you are done with the pipeline, use [gst.object.ObjectWrap.unref] to free its resources including all added #GstElement objects (if not otherwise referenced).

Elements are added and removed from the pipeline using the #GstBin methods like [gst.bin.Bin.add] and [gst.bin.Bin.remove] (see #GstBin).

Before changing the state of the #GstPipeline (see #GstElement) a #GstBus should be retrieved with [gst.pipeline.Pipeline.getBus]. This #GstBus should then be used to receive #GstMessage from the elements in the pipeline. Listening to the #GstBus is necessary for retrieving error messages from the #GstPipeline and otherwise the #GstPipeline might stop without any indication, why. Furthermore, the #GstPipeline posts messages even if nobody listens on the #GstBus, which will pile up and use up memory.

By default, a #GstPipeline will automatically flush the pending #GstBus messages when going to the NULL state to ensure that no circular references exist when no messages are read from the #GstBus. This behaviour can be changed with [gst.pipeline.Pipeline.setAutoFlushBus].

When the #GstPipeline performs the PAUSED to PLAYING state change it will select a clock for the elements. The clock selection algorithm will by default select a clock provided by an element that is most upstream (closest to the source). For live pipelines (ones that return #GST_STATE_CHANGE_NO_PREROLL from the [gst.element.Element.setState] call) this will select the clock provided by the live source. For normal pipelines this will select a clock provided by the sinks (most likely the audio sink). If no element provides a clock, a default #GstSystemClock is used.

The clock selection can be controlled with the [gst.pipeline.Pipeline.useClock] method, which will enforce a given clock on the pipeline. With [gst.pipeline.Pipeline.autoClock] the default clock selection algorithm can be restored.

A #GstPipeline maintains a running time for the elements. The running time is defined as the difference between the current clock time and the base time. When the pipeline goes to READY or a flushing seek is performed on it, the running time is reset to 0. When the pipeline is set from PLAYING to PAUSED, the current clock time is sampled and used to configure the base time for the elements when the pipeline is set to PLAYING again. The effect is that the running time (as the difference between the clock time and the base time) will count how much time was spent in the PLAYING state. This default behaviour can be changed with the [gst.element.Element.setStartTime] method.

Fields
GstBin bin
GstClock * fixedClockThe fixed clock of the pipeline, used when GSTPIPELINEFLAGFIXEDCLOCK is set.
GstClockTime streamTimeThe stream time of the pipeline. A better name for this property would be the runningtime, the total time spent in the PLAYING state without being flushed. (deprecated, use the starttime on GstElem...
GstClockTime delayExtra delay added to base_time to compensate for computing delays when setting elements to PLAYING.
void *[4] GstReserved
Fields
GstBinClass parentClass
void *[4] GstReserved
structGstPlugin

GStreamer is extensible, so #GstElement instances can be loaded at runtime. A plugin system can provide one or more of the basic GStreamer #GstPluginFeature subclasses.

A plugin should export a symbol gst_plugin_desc that is a struct of type #GstPluginDesc. the plugin loader will check the version of the core library the plugin was linked against and will create a new #GstPlugin. It will then call the #GstPluginInitFunc function that was provided in the gst_plugin_desc.

Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you can add any object that subclasses #GstPluginFeature.

Usually plugins are always automatically loaded so you don't need to call [gst.plugin.Plugin.load] explicitly to bring it into memory. There are options to statically link plugins to an app or even use GStreamer without a plugin repository in which case [gst.plugin.Plugin.load] can be needed to bring the plugin into memory.

A plugin should export a variable of this type called plugin_desc. The plugin loader will use the data provided there to initialize the plugin.

The @licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL, BSD, MIT/X11, Proprietary, unknown.

Fields
int majorVersionthe major version number of core that plugin was compiled for
int minorVersionthe minor version number of core that plugin was compiled for
const(char) * namea unique name of the plugin
const(char) * descriptiondescription of plugin
GstPluginInitFunc pluginInitpointer to the init function of this plugin.
const(char) * version_version of the plugin
const(char) * licenseeffective license of plugin
const(char) * sourcesource module plugin belongs to
const(char) * package_shipped package plugin belongs to
const(char) * originURL to provider of plugin
const(char) * releaseDatetimedate time string in ISO 8601 format (or rather, a subset thereof), or null. Allowed are the following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with 'T' a separator and 'Z' indicating UTC/Zulu ...
void *[4] GstReserved

This is a base class for anything that can be added to a #GstPlugin.

structGstPoll

A #GstPoll keeps track of file descriptors much like fd_set (used with select ()) or a struct pollfd array (used with poll ()). Once created with [gst.poll.Poll.new_], the set can be used to wait for file descriptors to be readable and/or writable. It is possible to make this wait be controlled by specifying true for the @controllable flag when creating the set (or later calling [gst.poll.Poll.setControllable]).

New file descriptors are added to the set using [gst.poll.Poll.addFd], and removed using [gst.poll.Poll.removeFd]. Controlling which file descriptors should be waited for to become readable and/or writable are done using [gst.poll.Poll.fdCtlRead], [gst.poll.Poll.fdCtlWrite] and [gst.poll.Poll.fdCtlPri].

Use [gst.poll.Poll.wait] to wait for the file descriptors to actually become readable and/or writable, or to timeout if no file descriptor is available in time. The wait can be controlled by calling [gst.poll.Poll.restart] and [gst.poll.Poll.setFlushing].

Once the file descriptor set has been waited for, one can use [gst.poll.Poll.fdHasClosed] to see if the file descriptor has been closed, [gst.poll.Poll.fdHasError] to see if it has generated an error, [gst.poll.Poll.fdCanRead] to see if it is possible to read from the file descriptor, and [gst.poll.Poll.fdCanWrite] to see if it is possible to write to it.

structGstPollFD

A file descriptor object.

Fields
int fda file descriptor
int idx
structGstPreset

This interface offers methods to query and manipulate parameter preset sets. A preset is a bunch of property settings, together with meta data and a name. The name of a preset serves as key for subsequent method calls to manipulate single presets. All instances of one type will share the list of presets. The list is created on demand, if presets are not used, the list is not created.

The interface comes with a default implementation that serves most plugins. Wrapper plugins will override most methods to implement support for the native preset format of those wrapped plugins. One method that is useful to be overridden is [gst.preset.Preset.getPropertyNames]. With that one can control which properties are saved and in which order. When implementing support for read-only presets, one should set the vmethods for [gst.preset.Preset.savePreset] and [gst.preset.Preset.deletePreset] to null. Applications can use [gst.preset.Preset.isEditable] to check for that.

The default implementation supports presets located in a system directory, application specific directory and in the users home directory. When getting a list of presets individual presets are read and overlaid in 1) system, 2) application and 3) user order. Whenever an earlier entry is newer, the later entries will be updated. Since 1.8 you can also provide extra paths where to find presets through the GST_PRESET_PATH environment variable. Presets found in those paths will be considered as "app presets".

#GstPreset interface.

Fields
GTypeInterface parentparent interface type.
char * * function(GstPreset * preset) getPresetNamesvirtual method to get list of presets
char * * function(GstPreset * preset) getPropertyNamesvirtual methods to get properties that are persistent
gboolean function(GstPreset * preset, const(char) * name) loadPresetvirtual methods to load a preset into properties
gboolean function(GstPreset * preset, const(char) * name) savePresetvirtual methods to save properties into a preset
gboolean function(GstPreset * preset, const(char) * oldName, const(char) * newName) renamePresetvirtual methods to rename a preset
gboolean function(GstPreset * preset, const(char) * name) deletePresetvirtual methods to remove a preset
gboolean function(GstPreset * preset, const(char) * name, const(char) * tag, const(char) * value) setMetavirtual methods to set textual meta data to a preset
gboolean function(GstPreset * preset, const(char) * name, const(char) * tag, char * * value) getMetavirtual methods to get textual meta data from a preset
void *[4] GstReserved

The #GstPromise object implements the container for values that may be available later. i.e. a Future or a Promise in

<https://en.wikipedia.org/wiki/Futures_and_promises>.

As with all Future/Promise-like functionality, there is the concept of the producer of the value and the consumer of the value.

A #GstPromise is created with [gst.promise.Promise.new_] by the consumer and passed to the producer to avoid thread safety issues with the change callback. A #GstPromise can be replied to with a value (or an error) by the producer with [gst.promise.Promise.reply]. The exact value returned is defined by the API contract of the producer and null may be a valid reply. [gst.promise.Promise.interrupt] is for the consumer to indicate to the producer that the value is not needed anymore and producing that value can stop. The @GST_PROMISE_RESULT_EXPIRED state set by a call to [gst.promise.Promise.expire] indicates to the consumer that a value will never be produced and is intended to be called by a third party that implements some notion of message handling such as #GstBus. A callback can also be installed at #GstPromise creation for result changes with [gst.promise.Promise.newWithChangeFunc]. The change callback can be used to chain #GstPromises's together as in the following example.

const GstStructure *reply;
GstPromise *p;
if (gst_promise_wait (promise) != GST_PROMISE_RESULT_REPLIED)
 return; // interrupted or expired value
reply = gst_promise_get_reply (promise);
if (error in reply)
 return; // propagate error
p = gst_promise_new_with_change_func (another_promise_change_func, user_data, notify);
pass p to promise-using API

Each #GstPromise starts out with a #GstPromiseResult of [gst.types.PromiseResult.Pending] and only ever transitions once into one of the other #GstPromiseResult's.

In order to support multi-threaded code, [gst.promise.Promise.reply], [gst.promise.Promise.interrupt] and [gst.promise.Promise.expire] may all be from different threads with some restrictions and the final result of the promise is whichever call is made first. There are two restrictions on ordering:

  1. That [gst.promise.Promise.reply] and [gst.promise.Promise.interrupt] cannot be called

after [gst.promise.Promise.expire]

  1. That [gst.promise.Promise.reply] and [gst.promise.Promise.interrupt]

cannot be called twice.

The change function set with [gst.promise.Promise.newWithChangeFunc] is called directly from either the [gst.promise.Promise.reply], [gst.promise.Promise.interrupt] or [gst.promise.Promise.expire] and can be called from an arbitrary thread. #GstPromise using APIs can restrict this to a single thread or a subset of threads but that is entirely up to the API that uses #GstPromise.

Fields
GstMiniObject parentparent #GstMiniObject

Metadata type that holds information about a sample from a protection-protected track, including the information needed to decrypt it (if it is encrypted).

Fields
GstMeta metathe parent #GstMeta.
GstStructure * infothe cryptographic information needed to decrypt the sample.
Fields
GstPadClass parentClass
void *[1] GstReserved
structGstQuery

Queries can be performed on pads ([gst.pad.Pad.query]) and elements ([gst.element.Element.query]). Please note that some queries might need a running pipeline to work.

Queries can be created using the gst_query_new_*() functions. Query values can be set using gst_query_set_*(), and parsed using gst_query_parse_*() helpers.

The following example shows how to query the duration of a pipeline:

GstQuery *query;
 gboolean res;
 query = gst_query_new_duration (GST_FORMAT_TIME);
 res = gst_element_query (pipeline, query);
 if (res) {
   gint64 duration;
   gst_query_parse_duration (query, NULL, &duration);
   g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration));
 } else {
   g_print ("duration query failed...");
 }
 gst_query_unref (query);

Fields
GstMiniObject miniObjectThe parent #GstMiniObject type
GstQueryType typethe #GstQueryType

#GstReferenceTimestampMeta can be used to attach alternative timestamps and possibly durations to a #GstBuffer. These are generally not according to the pipeline clock and could be e.g. the NTP timestamp when the media was captured.

The reference is stored as a #GstCaps in @reference. Examples of valid references would be

  • timestamp/x-drivername-stream: for timestamps that are locally

generated by some driver named drivername when generating the stream, e.g. based on a frame counter

  • timestamp/x-ntp, host=pool.ntp.org, port=123: for timestamps based on a

specific NTP server. Note that the host/port parameters might not always be given.

  • timestamp/x-ptp, version=IEEE1588-2008, domain=1: for timestamps based

on a given PTP clock.

  • timestamp/x-unix: for timestamps based on the UNIX epoch according to

the local clock.

Since 1.24 it can be serialized using [gst.meta.Meta.serialize] and [gst.meta.Meta.deserialize].

Fields
GstMeta parentthe parent #GstMeta structure
GstCaps * referenceidentifier for the timestamp reference.
GstClockTime timestamptimestamp
GstClockTime durationduration, or [gst.types.CLOCKTIMENONE]

One registry holds the metadata of a set of plugins.

<emphasis role="bold">Design:</emphasis>

The #GstRegistry object is a list of plugins and some functions for dealing with them. Each #GstPlugin is matched 1-1 with a file on disk, and may or may not be loaded at a given time.

The primary source, at all times, of plugin information is each plugin file itself. Thus, if an application wants information about a particular plugin, or wants to search for a feature that satisfies given criteria, the primary means of doing so is to load every plugin and look at the resulting information that is gathered in the default registry. Clearly, this is a time consuming process, so we cache information in the registry file. The format and location of the cache file is internal to gstreamer.

On startup, plugins are searched for in the plugin search path. The following locations are checked in this order:

  • location from --gst-plugin-path commandline option.
  • the GST_PLUGIN_PATH environment variable.
  • the GST_PLUGIN_SYSTEM_PATH environment variable.
  • default locations (if GST_PLUGIN_SYSTEM_PATH is not set).

Those default locations are: $XDG_DATA_HOME/gstreamer-$GST_API_VERSION/plugins/ and $prefix/libs/gstreamer-$GST_API_VERSION/.

$XDG_DATA_HOME defaults to

$HOME/.local/share.

The registry cache file is loaded from $XDG_CACHE_HOME/gstreamer-$GST_API_VERSION/registry-$ARCH.bin (where $XDG_CACHE_HOME defaults to $HOME/.cache) or the file listed in the GST_REGISTRY env var. One reason to change the registry location is for testing.

For each plugin that is found in the plugin search path, there could be 3 possibilities for cached information:

  • the cache may not contain information about a given file.
  • the cache may have stale information.
  • the cache may have current information.

In the first two cases, the plugin is loaded and the cache updated. In addition to these cases, the cache may have entries for plugins that are not relevant to the current process. These are marked as not available to the current process. If the cache is updated for whatever reason, it is marked dirty.

A dirty cache is written out at the end of initialization. Each entry is checked to make sure the information is minimally valid. If not, the entry is simply dropped.

Implementation notes:

The "cache" and "registry" are different concepts and can represent different sets of plugins. For various reasons, at init time, the cache is stored in the default registry, and plugins not relevant to the current process are marked with the [gst.types.PluginFlags.Cached] bit. These plugins are removed at the end of initialization.

Fields
GstObject object
Fields
GstObjectClass parentClass
structGstSample

A #GstSample is a small object containing data, a type, timing and extra arbitrary information.

This helper structure holds the relevant values for tracking the region of interest in a media file, called a segment.

The structure can be used for two purposes:

  • performing seeks (handling seek events)
  • tracking playback regions (handling newsegment events)

The segment is usually configured by the application with a seek event which is propagated upstream and eventually handled by an element that performs the seek.

The configured segment is then propagated back downstream with a newsegment event. This information is then used to clip media to the segment boundaries.

A segment structure is initialized with [gst.segment.Segment.init_], which takes a #GstFormat that will be used as the format of the segment values. The segment will be configured with a start value of 0 and a stop/duration of -1, which is undefined. The default rate and applied_rate is 1.0.

The public duration field contains the duration of the segment. When using the segment for seeking, the start and time members should normally be left to their default 0 value. The stop position is left to -1 unless explicitly configured to a different value after a seek event.

The current position in the segment should be set by changing the position member in the structure.

For elements that perform seeks, the current segment should be updated with the [gst.segment.Segment.doSeek] and the values from the seek event. This method will update all the segment fields. The position field will contain the new playback position. If the start_type was different from GST_SEEK_TYPE_NONE, playback continues from the position position, possibly with updated flags or rate.

For elements that want to use #GstSegment to track the playback region, update the segment fields with the information from the newsegment event. The [gst.segment.Segment.clip] method can be used to check and clip the media data to the segment boundaries.

For elements that want to synchronize to the pipeline clock, [gst.segment.Segment.toRunningTime] can be used to convert a timestamp to a value that can be used to synchronize to the clock. This function takes into account the base as well as any rate or applied_rate conversions.

For elements that need to perform operations on media data in stream_time, [gst.segment.Segment.toStreamTime] can be used to convert a timestamp and the segment info to stream time (which is always between 0 and the duration of the stream).

Fields
GstSegmentFlags flagsflags for this segment
double ratethe playback rate of the segment is set in response to a seek event and, without any seek, the value should be `1.0`. This value is used by elements that synchronize buffer [running times](addition...
double appliedRateThe applied rate is the rate that has been applied to the stream. The effective/resulting playback rate of a stream is `rate * appliedrate`. The applied rate can be set by source elements when a se...
GstFormat formatthe unit used for all of the segment's values.
ulong basethe running time (plus elapsed time, see offset) of the segment [start](GstSegment.start) ([stop](GstSegment.stop) if rate < 0.0).
ulong offsetthe offset expresses the elapsed time (in buffer timestamps) before a seek with its start (stop if rate < 0.0) seek type set to #GSTSEEKTYPE_NONE, the value is set to the position of the segment at...
ulong startthe start time of the segment (in buffer timestamps) [(PTS)](GstBuffer.pts), that is the timestamp of the first buffer to output inside the segment (last one during reverse playback). For example d...
ulong stopthe stop time of the segment (in buffer timestamps) [(PTS)](GstBuffer.pts), that is the timestamp of the last buffer to output inside the segment (first one during reverse playback). For example de...
ulong timethe stream time of the segment [start](GstSegment.start) ([stop](GstSegment.stop) if rate < 0.0).
ulong positionthe buffer timestamp position in the segment is supposed to be updated by elements such as sources, demuxers or parsers to track progress by setting it to the last pushed buffer' end time ([timesta...
ulong durationthe duration of the segment is the maximum absolute difference between #GstSegment.start and #GstSegment.stop if stop is not set, otherwise it should be the difference between those two values. Thi...
void *[4] GstReserved

The #GstSharedTaskPool object.

Fields
void *[4] GstReserved

The #GstSharedTaskPoolClass object.

Fields
GstTaskPoolClass parentClass
void *[4] GstReserved

Data structure to initialize #GstCaps from a string description usually used in conjunction with GST_STATIC_CAPS() and [gst.static_caps.StaticCaps.get] to instantiate a #GstCaps.

Fields
GstCaps * capsthe cached #GstCaps
const(char) * string_a string describing a caps
void *[4] GstReserved

Structure describing the #GstStaticPadTemplate.

Fields
const(char) * nameTemplatethe name of the template
GstPadDirection directionthe direction of the template
GstPadPresence presencethe presence of the template
GstStaticCaps staticCapsthe caps of the template.
structGstStream

A high-level object representing a single stream. It might be backed, or not, by an actual flow of data in a pipeline (#GstPad).

A #GstStream does not care about data changes (such as decoding, encoding, parsing,...) as long as the underlying data flow corresponds to the same high-level flow (ex: a certain audio track).

A #GstStream contains all the information pertinent to a stream, such as stream-id, tags, caps, type, ...

Elements can subclass a #GstStream for internal usage (to contain information pertinent to streams of data).

Fields
GstObject object
const(char) * streamIdThe Stream Identifier for this #GstStream
void *[4] GstReserved

GstStream class structure

Fields
GstObjectClass parentClassthe parent class structure
void *[4] GstReserved

A collection of #GstStream that are available.

A #GstStreamCollection will be provided by elements that can make those streams available. Applications can use the collection to show the user what streams are available by using %[gst.stream_collection.StreamCollection.getStream]

Once posted, a #GstStreamCollection is immutable. Updates are made by sending a new #GstStreamCollection message, which may or may not share some of the #GstStream objects from the collection it replaces. The receiver can check the sender of a stream collection message to know which collection is obsoleted.

Several elements in a pipeline can provide #GstStreamCollection.

Applications can activate streams from a collection by using the #GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element.

Fields
GstObject object
char * upstreamId
void *[4] GstReserved

GstStreamCollection class structure

Fields
GstObjectClass parentClassthe parent class structure
void function(GstStreamCollection * collection, GstStream * stream, GParamSpec * pspec) streamNotifydefault signal handler for the stream-notify signal
void *[4] GstReserved

A #GstStructure is a collection of key/value pairs. The keys are expressed as GQuarks and the values can be of any GType.

In addition to the key/value pairs, a #GstStructure also has a name. The name starts with a letter and can be filled by letters, numbers and any of "/-_.:".

#GstStructure is used by various GStreamer subsystems to store information in a flexible and extensible way. A #GstStructure does not have a refcount because it usually is part of a higher level object such as #GstCaps, #GstMessage, #GstEvent, #GstQuery. It provides a means to enforce mutability using the refcount of the parent with the [gst.structure.Structure.setParentRefcount] method.

A #GstStructure can be created with [gst.structure.Structure.newEmpty] or [gst.structure.Structure.new_], which both take a name and an optional set of key/value pairs along with the types of the values.

Field values can be changed with [gst.structure.Structure.setValue] or [gst.structure.Structure.set].

Field values can be retrieved with [gst.structure.Structure.getValue] or the more convenient gst_structure_get_*() functions.

Fields can be removed with [gst.structure.Structure.removeField] or [gst.structure.Structure.removeFields].

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings may be null however.

The serialization format

GstStructure serialization format serialize the GstStructure name, keys/GType/values in a comma separated list with the structure name as first field without value followed by separated key/value pairs in the form key=value, for example:

a-structure, key=value
The values type will be inferred if not explicitly specified with the (GTypeName)value syntax, for example the following struct will have one field called 'is-string' which has the string 'true' as a value: CODEBLOCK1 *Note*: without specifying (string), field-is-string type would have been inferred as boolean.

Note: we specified (string) as a type even if gchararray is the actual

GType name as for convenience some well known types have been aliased or abbreviated.

To avoid specifying the type, you can give some hints to the "type system". For example to specify a value as a double, you should add a decimal (ie. 1 is an [harfbuzz.types.int] while 1.0 is a double).

Note: when a structure is serialized with #gst_structure_to_string, all

values are explicitly typed.

Some types have special delimiters:

For example a-structure, array={1, 2, 3}

  • Ranges are inside brackets (`[` and `]`). For example a-structure, range=[1, 6, 2] 1 being the min value, 6 the maximum and 2 the step. To

specify a #GST_TYPE_INT64_RANGE you need to explicitly specify it like: a-structure, a-int64-range=(gint64) [1, 5]

`>`). For example a-structure, list=<1, 2, 3> ) Structures are delimited either by a null character \0 or a semicolon ; the latter allowing to store multiple structures in the same string (see #GstCaps). Quotes are used as "default" delimiters and can be used around any types that don't use other delimiters (for example a-struct, i=(int)"1"). They are use to allow adding spaces or special characters (such as delimiters, semicolumns, etc..) inside strings and you can use backslashes \ to escape characters inside them, for example: CODEBLOCK2 They also allow for nested structure, such as: CODEBLOCK3 Since 1.20, nested structures and caps can be specified using brackets ([ and ]`, for example:

a-struct, nested=[nested-struct, nested=true]

note: [gst.structure.Structure.toString_] won't use that syntax for backward

compatibility reason, [gst.structure.Structure.serializeFull] has been added for that purpose.

Fields
GType typethe GType of a structure
GQuark name

The GStreamer core provides a GstSystemClock based on the system time. Asynchronous callbacks are scheduled from an internal thread.

Clock implementors are encouraged to subclass this systemclock as it implements the async notification.

Subclasses can however override all of the important methods for sync and async notifications to implement their own callback methods or blocking wait operations.

Fields
GstClock clock
void *[4] GstReserved
Fields
GstClockClass parentClass
void *[4] GstReserved

List of tags and values used to describe media metadata.

Strings in structures must be ASCII or UTF-8 encoded. Other encodings are not allowed. Strings must not be empty or null.

Fields
GstMiniObject miniObjectthe parent type

Element interface that allows setting of media metadata.

Elements that support changing a stream's metadata will implement this interface. Examples of such elements are 'vorbisenc', 'theoraenc' and 'id3v2mux'.

If you just want to retrieve metadata in your application then all you need to do is watch for tag messages on your pipeline's bus. This interface is only for setting metadata, not for extracting it. To set tags from the application, find tagsetter elements and set tags using e.g. [gst.tag_setter.TagSetter.mergeTags] or [gst.tag_setter.TagSetter.addTags]. Also consider setting the #GstTagMergeMode that is used for tag events that arrive at the tagsetter element (default mode is to keep existing tags). The application should do that before the element goes to [gst.types.State.Paused].

Elements implementing the #GstTagSetter interface often have to merge any tags received from upstream and the tags set by the application via the interface. This can be done like this:

GstTagMergeMode merge_mode;
const GstTagList *application_tags;
const GstTagList *event_tags;
GstTagSetter *tagsetter;
GstTagList *result;

tagsetter = GST_TAG_SETTER (element);

merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter);
application_tags = gst_tag_setter_get_tag_list (tagsetter);
event_tags = (const GstTagList *) element->event_tags;

GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = %d", merge_mode);
GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags);
GST_LOG_OBJECT (tagsetter, "set   tags: %" GST_PTR_FORMAT, application_tags);

result = gst_tag_list_merge (application_tags, event_tags, merge_mode);

GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result);

#GstTagSetterInterface interface.

Fields
GTypeInterface gIfaceparent interface type.
structGstTask

#GstTask is used by #GstElement and #GstPad to provide the data passing threads in a #GstPipeline.

A #GstPad will typically start a #GstTask to push or pull data to/from the peer pads. Most source elements start a #GstTask to push data. In some cases a demuxer element can start a #GstTask to pull data from a peer element. This is typically done when the demuxer can perform random access on the upstream peer element for improved performance.

Although convenience functions exist on #GstPad to start/pause/stop tasks, it might sometimes be needed to create a #GstTask manually if it is not related to a #GstPad.

Before the #GstTask can be run, it needs a #GRecMutex that can be set with [gst.task.Task.setLock].

The task can be started, paused and stopped with [gst.task.Task.start], [gst.task.Task.pause] and [gst.task.Task.stop] respectively or with the [gst.task.Task.setState] function.

A #GstTask will repeatedly call the #GstTaskFunction with the user data that was provided when creating the task with [gst.task.Task.new_]. While calling the function it will acquire the provided lock. The provided lock is released when the task pauses or stops.

Stopping a task with [gst.task.Task.stop] will not immediately make sure the task is not running anymore. Use [gst.task.Task.join] to make sure the task is completely stopped and the thread is stopped.

After creating a #GstTask, use [gst.object.ObjectWrap.unref] to free its resources. This can only be done when the task is not running anymore.

Task functions can send a #GstMessage to send out-of-band data to the application. The application can receive messages from the #GstBus in its mainloop.

For debugging purposes, the task will configure its object name as the thread name on Linux. Please note that the object name should be configured before the task is started; changing the object name after the task has been started, has no effect on the thread name.

Fields
GstObject object
GstTaskState statethe state of the task
GCond condused to pause/resume the task
GRecMutex * lockThe lock taken when iterating the task function
GstTaskFunction functhe function executed by this task
void * userDatauser_data passed to the task function
GDestroyNotify notifyGDestroyNotify for @user_data
gboolean runninga flag indicating that the task is running
GThread * thread
void *[4] GstReserved
Fields
GstObjectClass parentClass
void *[4] GstReserved

This object provides an abstraction for creating threads. The default implementation uses a regular GThreadPool to start tasks.

Subclasses can be made to create custom threads.

Fields
GstObject object
void *[4] GstReserved

The #GstTaskPoolClass object.

Fields
GstObjectClass parentClassthe parent class structure
void function(GstTaskPool * pool, GError * * _err) prepareprepare the threadpool
void function(GstTaskPool * pool) cleanupmake sure all threads are stopped
void * function(GstTaskPool * pool, GstTaskPoolFunction func, void * userData, GError * * _err) pushstart a new thread
void function(GstTaskPool * pool, void * id) joinjoin a thread
void function(GstTaskPool * pool, void * id) disposeHandle
void *[3] GstReserved

Structure for storing a timestamp and a value.

Fields
GstClockTime timestamptimestamp of the value change
double valuethe corresponding value
structGstToc

#GstToc functions are used to create/free #GstToc and #GstTocEntry structures. Also they are used to convert #GstToc into #GstStructure and vice versa.

#GstToc lets you to inform other elements in pipeline or application that playing source has some kind of table of contents (TOC). These may be chapters, editions, angles or other types. For example: DVD chapters, Matroska chapters or cue sheet TOC. Such TOC will be useful for applications to display instead of just a playlist.

Using TOC is very easy. Firstly, create #GstToc structure which represents root contents of the source. You can also attach TOC-specific tags to it. Then fill it with #GstTocEntry entries by appending them to the #GstToc using [gst.toc.Toc.appendEntry], and appending subentries to a #GstTocEntry using [gst.toc_entry.TocEntry.appendSubEntry].

Note that root level of the TOC can contain only either editions or chapters. You should not mix them together at the same level. Otherwise you will get serialization /deserialization errors. Make sure that no one of the entries has negative start and stop values.

Use [gst.event.Event.newToc] to create a new TOC #GstEvent, and [gst.event.Event.parseToc] to parse received TOC event. Use [gst.event.Event.newTocSelect] to create a new TOC select #GstEvent, and [gst.event.Event.parseTocSelect] to parse received TOC select event. The same rule for the #GstMessage: [gst.message.Message.newToc] to create new TOC #GstMessage, and [gst.message.Message.parseToc] to parse received TOC message.

TOCs can have global scope or current scope. Global scope TOCs contain all entries that can possibly be selected using a toc select event, and are what an application is usually interested in. TOCs with current scope only contain the parts of the TOC relevant to the currently selected/playing stream; the current scope TOC is used by downstream elements such as muxers to write correct TOC entries when transcoding files, for example. When playing a DVD, the global TOC would contain a hierarchy of all titles, chapters and angles, for example, while the current TOC would only contain the chapters for the currently playing title if playback of a specific title was requested.

Applications and plugins should not rely on TOCs having a certain kind of structure, but should allow for different alternatives. For example, a simple CUE sheet embedded in a file may be presented as a flat list of track entries, or could have a top-level edition node (or some other alternative type entry) with track entries underneath that node; or even multiple top-level edition nodes (or some other alternative type entries) each with track entries underneath, in case the source file has extracted a track listing from different sources).

Element interface that allows setting of the TOC.

Elements that support some kind of chapters or editions (or tracks like in the FLAC cue sheet) will implement this interface.

If you just want to retrieve the TOC in your application then all you need to do is watch for TOC messages on your pipeline's bus (or you can perform TOC query). This interface is only for setting TOC data, not for extracting it. To set TOC from the application, find proper tocsetter element and set TOC using [gst.toc_setter.TocSetter.setToc].

Elements implementing the #GstTocSetter interface can extend existing TOC by getting extend UID for that (you can use [gst.toc.Toc.findEntry] to retrieve it) with any TOC entries received from downstream.

#GstTocSetterInterface interface.

Fields
GTypeInterface gIfaceparent interface type.
structGstTracer

Tracing modules will subclass #GstTracer and register through [gst.tracer.Tracer.register]. Modules can attach to various hook-types - see [gst.global.tracingRegisterHook]. When invoked they receive hook specific contextual data, which they must not modify.

Fields
GstObject parent
void *[4] GstReserved
Fields
GstObjectClass parentClass
void *[4] GstReserved

Use [gst.tracer_factory.TracerFactory.getList] to get a list of tracer factories known to GStreamer.

Tracing modules will create instances of this class to announce the data they will log and create a log formatter.

The following functions allow you to detect the media type of an unknown stream.

Fields
const(ubyte) * function(void * data, long offset, uint size) peekFuncMethod to peek data.
void function(void * data, uint probability, GstCaps * caps) suggestFuncMethod to suggest #GstCaps with a given probability.
void * dataThe data used by the caller of the typefinding function.
ulong function(void * data) getLengthFuncReturns the length of current data.
void *[4] GstReserved

These functions allow querying information about registered typefind functions. How to create and register these functions is described in the section <link linkend="gstreamer-Writing-typefind-functions"> "Writing typefind functions"</link>.

The following example shows how to write a very simple typefinder that identifies the given data. You can get quite a bit more complicated than that though.

typedef struct {
   guint8 *data;
   guint size;
   guint probability;
   GstCaps *data;
 } MyTypeFind;
 static void
 my_peek (gpointer data, gint64 offset, guint size)
 {
   MyTypeFind *find = (MyTypeFind *) data;
   if (offset >= 0 && offset + size <= find->size) {
     return find->data + offset;
   }
   return NULL;
 }
 static void
 my_suggest (gpointer data, guint probability, GstCaps *caps)
 {
   MyTypeFind *find = (MyTypeFind *) data;
   if (probability > find->probability) {
     find->probability = probability;
     gst_caps_replace (&find->caps, caps);
   }
 }
 static GstCaps *
 find_type (guint8 *data, guint size)
 {
   GList *walk, *type_list;
   MyTypeFind find = {data, size, 0, NULL};
   GstTypeFind gst_find = {my_peek, my_suggest, &find, };
   walk = type_list = gst_type_find_factory_get_list ();
   while (walk) {
     GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (walk->data);
     walk = g_list_next (walk)
     gst_type_find_factory_call_function (factory, &gst_find);
   }
   g_list_free (type_list);
   return find.caps;
 };

The #GstURIHandler is an interface that is implemented by Source and Sink #GstElement to unify handling of URI.

An application can use the following functions to quickly get an element that handles the given URI for reading or writing ([gst.element.Element.makeFromUri]).

Source and Sink plugins should implement this interface when possible.

Any #GstElement using this interface should implement these methods.

Fields
GTypeInterface parentThe parent interface type
GstURIType function(GType type) getTypeMethod to tell whether the element handles source or sink URI.
const(char *) * function(GType type) getProtocolsMethod to return the list of protocols handled by the element.
char * function(GstURIHandler * handler) getUriMethod to return the URI currently handled by the element.
gboolean function(GstURIHandler * handler, const(char) * uri, GError * * _err) setUriMethod to set a new URI.
structGstUri

A #GstUri object can be used to parse and split a URI string into its constituent parts. Two #GstUri objects can be joined to make a new #GstUri using the algorithm described in RFC3986.

A fundamental type that describes an ordered list of #GValue

A fundamental type that describes an unordered list of #GValue

VTable for the #GValue @type.

Fields
GType typea #GType
GstValueCompareFunc comparea #GstValueCompareFunc
GstValueSerializeFunc serializea #GstValueSerializeFunc
GstValueDeserializeFunc deserializea #GstValueDeserializeFunc
GstValueDeserializeWithPSpecFunc deserializeWithPspeca #GstValueDeserializeWithPSpecFunc
void *[3] GstReserved
aliasGstBufferForeachMetaFunc = gboolean function(GstBuffer * buffer, GstMeta * * meta, void * userData)
aliasGstBufferListFunc = gboolean function(GstBuffer * * buffer, uint idx, void * userData)
aliasGstBusFunc = gboolean function(GstBus * bus, GstMessage * message, void * userData)
aliasGstBusSyncHandler = GstBusSyncReply function(GstBus * bus, GstMessage * message, void * userData)
aliasGstCapsFilterMapFunc = gboolean function(GstCapsFeatures * features, GstStructure * structure, void * userData)
aliasGstCapsForeachFunc = gboolean function(GstCapsFeatures * features, GstStructure * structure, void * userData)
aliasGstCapsMapFunc = gboolean function(GstCapsFeatures * features, GstStructure * structure, void * userData)
aliasGstClockCallback = gboolean function(GstClock * clock, GstClockTime time, GstClockID id, void * userData)
aliasGstControlBindingConvert = void function(GstControlBinding * binding, double srcValue, GValue * destValue)
aliasGstControlSourceGetValue = gboolean function(GstControlSource * self, GstClockTime timestamp, double * value)
aliasGstControlSourceGetValueArray = gboolean function(GstControlSource * self, GstClockTime timestamp, GstClockTime interval, uint nValues, double * values)
aliasGstCustomMetaTransformFunction = gboolean function(GstBuffer * transbuf, GstCustomMeta * meta, GstBuffer * buffer, GQuark type, void * data, void * userData)
aliasGstDebugFuncPtr = void function()
aliasGstElementCallAsyncFunc = void function(GstElement * element, void * userData)
aliasGstElementForeachPadFunc = gboolean function(GstElement * element, GstPad * pad, void * userData)
aliasGstIteratorCopyFunction = void function(const(GstIterator) * it, GstIterator * copy)
aliasGstIteratorFoldFunction = gboolean function(const(GValue) * item, GValue * ret, void * userData)
aliasGstIteratorForeachFunction = void function(const(GValue) * item, void * userData)
aliasGstIteratorFreeFunction = void function(GstIterator * it)
aliasGstIteratorItemFunction = GstIteratorItem function(GstIterator * it, const(GValue) * item)
aliasGstIteratorResyncFunction = void function(GstIterator * it)
aliasGstLogFunction = void function(GstDebugCategory * category, GstDebugLevel level, const(char) * file, const(char) * function_, int line, GObject * object, GstDebugMessage * message, void * userData)
aliasGstMemoryCopyFunction = GstMemory * function(GstMemory * mem, ptrdiff_t offset, ptrdiff_t size)
aliasGstMemoryIsSpanFunction = gboolean function(GstMemory * mem1, GstMemory * mem2, size_t * offset)
aliasGstMemoryMapFullFunction = void * function(GstMemory * mem, GstMapInfo * info, size_t maxsize)
aliasGstMemoryMapFunction = void * function(GstMemory * mem, size_t maxsize, GstMapFlags flags)
aliasGstMemoryShareFunction = GstMemory * function(GstMemory * mem, ptrdiff_t offset, ptrdiff_t size)
aliasGstMemoryUnmapFullFunction = void function(GstMemory * mem, GstMapInfo * info)
aliasGstMemoryUnmapFunction = void function(GstMemory * mem)
aliasGstMetaClearFunction = void function(GstBuffer * buffer, GstMeta * meta)
aliasGstMetaDeserializeFunction = GstMeta * function(const(GstMetaInfo) * info, GstBuffer * buffer, const(ubyte) * data, size_t size, ubyte version_)
aliasGstMetaFreeFunction = void function(GstMeta * meta, GstBuffer * buffer)
aliasGstMetaInitFunction = gboolean function(GstMeta * meta, void * params, GstBuffer * buffer)
aliasGstMetaSerializeFunction = gboolean function(const(GstMeta) * meta, GstByteArrayInterface * data, ubyte * version_)
aliasGstMetaTransformFunction = gboolean function(GstBuffer * transbuf, GstMeta * meta, GstBuffer * buffer, GQuark type, void * data)
aliasGstMiniObjectCopyFunction = GstMiniObject * function(const(GstMiniObject) * obj)
aliasGstMiniObjectDisposeFunction = gboolean function(GstMiniObject * obj)
aliasGstMiniObjectFreeFunction = void function(GstMiniObject * obj)
aliasGstMiniObjectNotify = void function(void * userData, GstMiniObject * obj)
aliasGstPadActivateFunction = gboolean function(GstPad * pad, GstObject * parent)
aliasGstPadActivateModeFunction = gboolean function(GstPad * pad, GstObject * parent, GstPadMode mode, gboolean active)
aliasGstPadChainFunction = GstFlowReturn function(GstPad * pad, GstObject * parent, GstBuffer * buffer)
aliasGstPadChainListFunction = GstFlowReturn function(GstPad * pad, GstObject * parent, GstBufferList * list)
aliasGstPadEventFullFunction = GstFlowReturn function(GstPad * pad, GstObject * parent, GstEvent * event)
aliasGstPadEventFunction = gboolean function(GstPad * pad, GstObject * parent, GstEvent * event)
aliasGstPadForwardFunction = gboolean function(GstPad * pad, void * userData)
aliasGstPadGetRangeFunction = GstFlowReturn function(GstPad * pad, GstObject * parent, ulong offset, uint length, GstBuffer * * buffer)
aliasGstPadIterIntLinkFunction = GstIterator * function(GstPad * pad, GstObject * parent)
aliasGstPadLinkFunction = GstPadLinkReturn function(GstPad * pad, GstObject * parent, GstPad * peer)
aliasGstPadProbeCallback = GstPadProbeReturn function(GstPad * pad, GstPadProbeInfo * info, void * userData)
aliasGstPadQueryFunction = gboolean function(GstPad * pad, GstObject * parent, GstQuery * query)
aliasGstPadStickyEventsForeachFunction = gboolean function(GstPad * pad, GstEvent * * event, void * userData)
aliasGstPadUnlinkFunction = void function(GstPad * pad, GstObject * parent)
aliasGstPluginFeatureFilter = gboolean function(GstPluginFeature * feature, void * userData)
aliasGstPluginFilter = gboolean function(GstPlugin * plugin, void * userData)
aliasGstPluginInitFullFunc = gboolean function(GstPlugin * plugin, void * userData)
aliasGstPluginInitFunc = gboolean function(GstPlugin * plugin)
aliasGstPromiseChangeFunc = void function(GstPromise * promise, void * userData)
aliasGstStructureFilterMapFunc = gboolean function(GQuark fieldId, GValue * value, void * userData)
aliasGstStructureForeachFunc = gboolean function(GQuark fieldId, const(GValue) * value, void * userData)
aliasGstStructureMapFunc = gboolean function(GQuark fieldId, GValue * value, void * userData)
aliasGstTagForeachFunc = void function(const(GstTagList) * list, const(char) * tag, void * userData)
aliasGstTagMergeFunc = void function(GValue * dest, const(GValue) * src)
aliasGstTaskFunction = void function(void * userData)
aliasGstTaskPoolFunction = void function(void * userData)
aliasGstTaskThreadFunc = void function(GstTask * task, GThread * thread, void * userData)
aliasGstTypeFindFunction = void function(GstTypeFind * find, void * userData)
aliasGstValueCompareFunc = int function(const(GValue) * value1, const(GValue) * value2)
aliasGstValueDeserializeFunc = gboolean function(GValue * dest, const(char) * s)
aliasGstValueDeserializeWithPSpecFunc = gboolean function(GValue * dest, const(char) * s, GParamSpec * pspec)
aliasGstValueSerializeFunc = char * function(const(GValue) * value1)