@girs/node-gst-1.0
Version:
Node.js TypeScript type definitions for Gst-1.0, generated from library version 1.23.0
2,016 lines (2,011 loc) • 1.05 MB
text/typescript
/*
* Type Definitions for node-gtk (https://github.com/romgrk/node-gtk)
*
* These type definitions are automatically generated, do not edit them by hand.
* If you found a bug fix it in ts-for-gir itself or create a bug report on https://github.com/gjsify/ts-for-gir
*/
import './node-gst-1.0-import.d.ts';
/**
* Gst-1.0
*/
import type GObject from '@girs/node-gobject-2.0';
import type GLib from '@girs/node-glib-2.0';
import type GModule from '@girs/node-gmodule-2.0';
/**
* The different types of buffering methods.
*/
export enum BufferingMode {
/**
* a small amount of data is buffered
*/
STREAM,
/**
* the stream is being downloaded
*/
DOWNLOAD,
/**
* the stream is being downloaded in a ringbuffer
*/
TIMESHIFT,
/**
* the stream is a live stream
*/
LIVE,
}
/**
* The result values for a GstBusSyncHandler.
*/
export enum BusSyncReply {
/**
* drop the message
*/
DROP,
/**
* pass the message to the async queue
*/
PASS,
/**
* pass message to async queue, continue if message is handled
*/
ASYNC,
}
/**
* Modes of caps intersection
*
* %GST_CAPS_INTERSECT_ZIG_ZAG 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_CAPS_INTERSECT_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.
*/
export enum CapsIntersectMode {
/**
* Zig-zags over both caps.
*/
ZIG_ZAG,
/**
* Keeps the first caps order.
*/
FIRST,
}
/**
* The type of the clock entry
*/
export enum ClockEntryType {
/**
* a single shot timeout
*/
SINGLE,
/**
* a periodic timeout request
*/
PERIODIC,
}
/**
* The return value of a clock operation.
*/
export enum ClockReturn {
/**
* The operation succeeded.
*/
OK,
/**
* The operation was scheduled too late.
*/
EARLY,
/**
* The clockID was unscheduled
*/
UNSCHEDULED,
/**
* The ClockID is busy
*/
BUSY,
/**
* A bad time was provided to a function.
*/
BADTIME,
/**
* An error occurred
*/
ERROR,
/**
* Operation is not supported
*/
UNSUPPORTED,
/**
* The ClockID is done waiting
*/
DONE,
}
/**
* The different kind of clocks.
*/
export enum ClockType {
/**
* time since Epoch
*/
REALTIME,
/**
* monotonic time since some unspecified starting
* point
*/
MONOTONIC,
/**
* some other time source is used (Since: 1.0.5)
*/
OTHER,
/**
* time since Epoch, but using International Atomic Time
* as reference (Since: 1.18)
*/
TAI,
}
/**
* Core errors are errors inside the core GStreamer library.
*/
export enum CoreError {
/**
* a general error which doesn't fit in any other
* category. Make sure you add a custom message to the error call.
*/
FAILED,
/**
* do not use this except as a placeholder for
* deciding where to go while developing code.
*/
TOO_LAZY,
/**
* use this when you do not want to implement
* this functionality yet.
*/
NOT_IMPLEMENTED,
/**
* used for state change errors.
*/
STATE_CHANGE,
/**
* used for pad-related errors.
*/
PAD,
/**
* used for thread-related errors.
*/
THREAD,
/**
* used for negotiation-related errors.
*/
NEGOTIATION,
/**
* used for event-related errors.
*/
EVENT,
/**
* used for seek-related errors.
*/
SEEK,
/**
* used for caps-related errors.
*/
CAPS,
/**
* used for negotiation-related errors.
*/
TAG,
/**
* used if a plugin is missing.
*/
MISSING_PLUGIN,
/**
* used for clock related errors.
*/
CLOCK,
/**
* used if functionality has been disabled at
* compile time.
*/
DISABLED,
/**
* the number of core error types.
*/
NUM_ERRORS,
}
export enum DebugColorMode {
/**
* Do not use colors in logs.
*/
OFF,
/**
* Paint logs in a platform-specific way.
*/
ON,
/**
* Paint logs with UNIX terminal color codes
* no matter what platform GStreamer is running on.
*/
UNIX,
}
/**
* 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.
*/
export enum DebugLevel {
/**
* No debugging level specified or desired. Used to deactivate
* debugging output.
*/
NONE,
/**
* Error messages are to be used only when an error occurred
* that stops the application from keeping working correctly.
* An examples is gst_element_error, which outputs a message with this priority.
* It does not mean that the application is terminating as with g_error.
*/
ERROR,
/**
* Warning 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 broken input
* data ("Can't synchronize to stream.")
*/
WARNING,
/**
* Fixme 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 purpose
* of this message is to make it easier to spot incomplete/unfinished pieces
* of code when reading the debug log.
*/
FIXME,
/**
* Informational 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 the stream or when an mp3 plugin detects
* the format to be used. ("This file has mono sound.")
*/
INFO,
/**
* Debugging 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 or
* buffer processed or event handled).
* An example would be notifications about state changes or receiving/sending
* of events.
*/
DEBUG,
/**
* Log 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 processing data.
* Use this log level to log recurring information in chain functions and
* loop functions, for example.
*/
LOG,
/**
* Tracing-related messages.
* Examples for this are referencing/dereferencing of objects.
*/
TRACE,
/**
* memory 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.
*/
MEMDUMP,
/**
* The number of defined debugging levels.
*/
COUNT,
}
/**
* #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.
*/
export enum EventType {
/**
* unknown event.
*/
UNKNOWN,
/**
* Start a flush operation. This event clears all data
* from the pipeline and unblock all streaming threads.
*/
FLUSH_START,
/**
* Stop a flush operation. This event resets the
* running-time of the pipeline.
*/
FLUSH_STOP,
/**
* Event 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.
*/
STREAM_START,
/**
* #GstCaps event. Notify the pad of a new media type.
*/
CAPS,
/**
* A 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.
*/
SEGMENT,
/**
* A new #GstStreamCollection is available (Since: 1.10)
*/
STREAM_COLLECTION,
/**
* A new set of metadata tags has been found in the stream.
*/
TAG,
/**
* Notification of buffering requirements. Currently not
* used yet.
*/
BUFFERSIZE,
/**
* An event that sinks turn into a message. Used to
* send messages that should be emitted in sync with
* rendering.
*/
SINK_MESSAGE,
/**
* Indicates 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)
*/
STREAM_GROUP_DONE,
/**
* End-Of-Stream. No more data is to be expected to follow
* without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT
* event.
*/
EOS,
/**
* An event which indicates that a new table of contents (TOC)
* was found or updated.
*/
TOC,
/**
* An event which indicates that new or updated
* encryption information has been found in the stream.
*/
PROTECTION,
/**
* Marks the end of a segment playback.
*/
SEGMENT_DONE,
/**
* Marks a gap in the datastream.
*/
GAP,
/**
* Notify downstream that a playback rate override
* should be applied as soon as possible. (Since: 1.18)
*/
INSTANT_RATE_CHANGE,
/**
* A quality message. Used to indicate to upstream elements
* that the downstream elements should adjust their processing
* rate.
*/
QOS,
/**
* A request for a new playback position and rate.
*/
SEEK,
/**
* Navigation events are usually used for communicating
* user requests, such as mouse or keyboard movements,
* to upstream elements.
*/
NAVIGATION,
/**
* Notification of new latency adjustment. Sinks will use
* the latency information to adjust their synchronisation.
*/
LATENCY,
/**
* A request for stepping through the media. Sinks will usually
* execute the step operation.
*/
STEP,
/**
* A request for upstream renegotiating caps and reconfiguring.
*/
RECONFIGURE,
/**
* A request for a new playback position based on TOC
* entry's UID.
*/
TOC_SELECT,
/**
* A request to select one or more streams (Since: 1.10)
*/
SELECT_STREAMS,
/**
* Sent 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)
*/
INSTANT_RATE_SYNC_TIME,
/**
* Upstream custom event
*/
CUSTOM_UPSTREAM,
/**
* Downstream custom event that travels in the
* data flow.
*/
CUSTOM_DOWNSTREAM,
/**
* Custom out-of-band downstream event.
*/
CUSTOM_DOWNSTREAM_OOB,
/**
* Custom sticky downstream event.
*/
CUSTOM_DOWNSTREAM_STICKY,
/**
* Custom upstream or downstream event.
* In-band when travelling downstream.
*/
CUSTOM_BOTH,
/**
* Custom upstream or downstream out-of-band event.
*/
CUSTOM_BOTH_OOB,
}
/**
* The result of passing data to a pad.
*
* Note that the custom return values should not be exposed outside of the
* element scope.
*/
export enum FlowReturn {
/**
* Pre-defined custom success code.
*/
CUSTOM_SUCCESS_2,
/**
* Pre-defined custom success code (define your
* custom success code to this to avoid compiler
* warnings).
*/
CUSTOM_SUCCESS_1,
/**
* Elements can use values starting from
* this (and higher) to define custom success
* codes.
*/
CUSTOM_SUCCESS,
/**
* Data passing was ok.
*/
OK,
/**
* Pad is not linked.
*/
NOT_LINKED,
/**
* Pad is flushing.
*/
FLUSHING,
/**
* Pad is EOS.
*/
EOS,
/**
* Pad is not negotiated.
*/
NOT_NEGOTIATED,
/**
* Some (fatal) error occurred. Element generating
* this error should post an error message using
* GST_ELEMENT_ERROR() with more details.
*/
ERROR,
/**
* This operation is not supported.
*/
NOT_SUPPORTED,
/**
* Elements can use values starting from
* this (and lower) to define custom error codes.
*/
CUSTOM_ERROR,
/**
* Pre-defined custom error code (define your
* custom error code to this to avoid compiler
* warnings).
*/
CUSTOM_ERROR_1,
/**
* Pre-defined custom error code.
*/
CUSTOM_ERROR_2,
}
/**
* Standard predefined formats
*/
export enum Format {
/**
* undefined format
*/
UNDEFINED,
/**
* the 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 `GST_FORMAT_TIME` if you don't have a good
* reason to query for samples/frames)
*/
DEFAULT,
/**
* bytes
*/
BYTES,
/**
* time in nanoseconds
*/
TIME,
/**
* buffers (few, if any, elements implement this as of
* May 2009)
*/
BUFFERS,
/**
* percentage of stream (few, if any, elements implement
* this as of May 2009)
*/
PERCENT,
}
/**
* The result of a #GstIteratorItemFunction.
*/
export enum IteratorItem {
/**
* Skip this item
*/
SKIP,
/**
* Return item
*/
PASS,
/**
* Stop after this item.
*/
END,
}
/**
* The result of gst_iterator_next().
*/
export enum IteratorResult {
/**
* No more items in the iterator
*/
DONE,
/**
* An item was retrieved
*/
OK,
/**
* Datastructure changed while iterating
*/
RESYNC,
/**
* An error happened
*/
ERROR,
}
/**
* Library errors are for errors from the library being used by elements
* (initializing, finalizing, settings, ...)
*/
export enum LibraryError {
/**
* a general error which doesn't fit in any other
* category. Make sure you add a custom message to the error call.
*/
FAILED,
/**
* do not use this except as a placeholder for
* deciding where to go while developing code.
*/
TOO_LAZY,
/**
* used when the library could not be opened.
*/
INIT,
/**
* used when the library could not be closed.
*/
SHUTDOWN,
/**
* used when the library doesn't accept settings.
*/
SETTINGS,
/**
* used when the library generated an encoding error.
*/
ENCODE,
/**
* the number of library error types.
*/
NUM_ERRORS,
}
/**
* The direction of a pad.
*/
export enum PadDirection {
/**
* direction is unknown.
*/
UNKNOWN,
/**
* the pad is a source pad.
*/
SRC,
/**
* the pad is a sink pad.
*/
SINK,
}
/**
* Result values from gst_pad_link and friends.
*/
export enum PadLinkReturn {
/**
* link succeeded
*/
OK,
/**
* pads have no common grandparent
*/
WRONG_HIERARCHY,
/**
* pad was already linked
*/
WAS_LINKED,
/**
* pads have wrong direction
*/
WRONG_DIRECTION,
/**
* pads do not have common format
*/
NOFORMAT,
/**
* pads cannot cooperate in scheduling
*/
NOSCHED,
/**
* refused for some reason
*/
REFUSED,
}
/**
* 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.
*/
export enum PadMode {
/**
* Pad will not handle dataflow
*/
NONE,
/**
* Pad handles dataflow in downstream push mode
*/
PUSH,
/**
* Pad handles dataflow in upstream pull mode
*/
PULL,
}
/**
* Indicates when this pad will become available.
*/
export enum PadPresence {
/**
* the pad is always available
*/
ALWAYS,
/**
* the pad will become available depending on the media stream
*/
SOMETIMES,
/**
* the pad is only available on request with
* gst_element_request_pad().
*/
REQUEST,
}
/**
* Different return values for the #GstPadProbeCallback.
*/
export enum PadProbeReturn {
/**
* drop 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 called for this item and %GST_FLOW_OK or %TRUE is returned to the
* caller.
*/
DROP,
/**
* normal 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 probe type applies ('block' for blocking probes,
* and 'pass' for non-blocking probes).
*/
OK,
/**
* remove this probe, passing the data. For blocking probes
* this will cause data flow to unblock, unless there are also other
* blocking probes installed.
*/
REMOVE,
/**
* pass 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.
*/
PASS,
/**
* Data has been handled in the probe and will not be
* forwarded further. For events and buffers this is the same behaviour as
* %GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer
* or event yourself). For queries it will also return %TRUE to the caller.
* The probe can also modify the #GstFlowReturn value by using the
* #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor.
* Note that the resulting query must contain valid entries.
* Since: 1.6
*/
HANDLED,
}
/**
* The different parsing errors that can occur.
*/
export enum ParseError {
/**
* A syntax error occurred.
*/
SYNTAX,
/**
* The description contained an unknown element
*/
NO_SUCH_ELEMENT,
/**
* An element did not have a specified property
*/
NO_SUCH_PROPERTY,
/**
* There was an error linking two pads.
*/
LINK,
/**
* There was an error setting a property
*/
COULD_NOT_SET_PROPERTY,
/**
* An empty bin was specified.
*/
EMPTY_BIN,
/**
* An empty description was specified
*/
EMPTY,
/**
* A delayed link did not get resolved.
*/
DELAYED_LINK,
}
/**
* The plugin loading errors
*/
export enum PluginError {
/**
* The plugin could not be loaded
*/
MODULE,
/**
* The plugin has unresolved dependencies
*/
DEPENDENCIES,
/**
* The plugin has already be loaded from a different file
*/
NAME_MISMATCH,
}
/**
* The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the
* application of the status of asynchronous tasks.
*/
export enum ProgressType {
/**
* A new task started.
*/
START,
/**
* A task completed and a new one continues.
*/
CONTINUE,
/**
* A task completed.
*/
COMPLETE,
/**
* A task was canceled.
*/
CANCELED,
/**
* A task caused an error. An error message is also
* posted on the bus.
*/
ERROR,
}
/**
* The result of a #GstPromise
*/
export enum PromiseResult {
/**
* Initial state. Waiting for transition to any
* other state.
*/
PENDING,
/**
* Interrupted by the consumer as it doesn't
* want the value anymore.
*/
INTERRUPTED,
/**
* A producer marked a reply
*/
REPLIED,
/**
* The promise expired (the carrying object
* lost all refs) and the promise will never be fulfilled.
*/
EXPIRED,
}
/**
* The different types of QoS events that can be given to the
* gst_event_new_qos() method.
*/
export enum QOSType {
/**
* The 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 is also used when buffers arrive early or in time.
*/
OVERFLOW,
/**
* The QoS event type that is produced when upstream
* elements are producing data too slowly and need to speed up their
* production rate.
*/
UNDERFLOW,
/**
* The QoS event type that is produced when the
* application enabled throttling to limit the data rate.
*/
THROTTLE,
}
/**
* Standard predefined Query types
*/
export enum QueryType {
/**
* unknown query type
*/
UNKNOWN,
/**
* current position in stream
*/
POSITION,
/**
* total duration of the stream
*/
DURATION,
/**
* latency of stream
*/
LATENCY,
/**
* current jitter of stream
*/
JITTER,
/**
* current rate of the stream
*/
RATE,
/**
* seeking capabilities
*/
SEEKING,
/**
* segment start/stop positions
*/
SEGMENT,
/**
* convert values between formats
*/
CONVERT,
/**
* query supported formats for convert
*/
FORMATS,
/**
* query available media for efficient seeking.
*/
BUFFERING,
/**
* a custom application or element defined query.
*/
CUSTOM,
/**
* query the URI of the source or sink.
*/
URI,
/**
* the buffer allocation properties
*/
ALLOCATION,
/**
* the scheduling properties
*/
SCHEDULING,
/**
* the accept caps query
*/
ACCEPT_CAPS,
/**
* the caps query
*/
CAPS,
/**
* wait till all serialized data is consumed downstream
*/
DRAIN,
/**
* query the pipeline-local context from
* downstream or upstream (since 1.2)
*/
CONTEXT,
/**
* the bitrate query (since 1.16)
*/
BITRATE,
/**
* Query stream selection capability.
*/
SELECTABLE,
}
/**
* Element priority ranks. Defines the order in which the autoplugger (or
* similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri())
* 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`.
*/
export enum Rank {
/**
* will be chosen last or not at all
*/
NONE,
/**
* unlikely to be chosen
*/
MARGINAL,
/**
* likely to be chosen
*/
SECONDARY,
/**
* will be chosen first
*/
PRIMARY,
}
/**
* 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.
*/
export enum ResourceError {
/**
* a general error which doesn't fit in any other
* category. Make sure you add a custom message to the error call.
*/
FAILED,
/**
* do not use this except as a placeholder for
* deciding where to go while developing code.
*/
TOO_LAZY,
/**
* used when the resource could not be found.
*/
NOT_FOUND,
/**
* used when resource is busy.
*/
BUSY,
/**
* used when resource fails to open for reading.
*/
OPEN_READ,
/**
* used when resource fails to open for writing.
*/
OPEN_WRITE,
/**
* used when resource cannot be opened for
* both reading and writing, or either (but unspecified which).
*/
OPEN_READ_WRITE,
/**
* used when the resource can't be closed.
*/
CLOSE,
/**
* used when the resource can't be read from.
*/
READ,
/**
* used when the resource can't be written to.
*/
WRITE,
/**
* used when a seek on the resource fails.
*/
SEEK,
/**
* used when a synchronize on the resource fails.
*/
SYNC,
/**
* used when settings can't be manipulated on.
*/
SETTINGS,
/**
* used when the resource has no space left.
*/
NO_SPACE_LEFT,
/**
* used when the resource can't be opened
* due to missing authorization.
* (Since: 1.2.4)
*/
NOT_AUTHORIZED,
/**
* the number of resource error types.
*/
NUM_ERRORS,
}
/**
* The different search modes.
*/
export enum SearchMode {
/**
* Only search for exact matches.
*/
EXACT,
/**
* Search for an exact match or the element just before.
*/
BEFORE,
/**
* Search for an exact match or the element just after.
*/
AFTER,
}
/**
* The different types of seek events. When constructing a seek event with
* gst_event_new_seek() or when doing gst_segment_do_seek ().
*/
export enum SeekType {
/**
* no change in position is required
*/
NONE,
/**
* absolute position is requested
*/
SET,
/**
* relative position to duration is requested
*/
END,
}
/**
* The possible states an element can be in. States can be changed using
* gst_element_set_state() and checked using gst_element_get_state().
*/
export enum State {
/**
* no pending state.
*/
VOID_PENDING,
/**
* the NULL state or initial state of an element.
*/
NULL,
/**
* the element is ready to go to PAUSED.
*/
READY,
/**
* the element is PAUSED, it is ready to accept and
* process data. Sink elements however only accept one
* buffer and then block.
*/
PAUSED,
/**
* the element is PLAYING, the #GstClock is running and
* the data is flowing.
*/
PLAYING,
}
/**
* These are the different state changes an element goes through.
* %GST_STATE_NULL ⇒ %GST_STATE_PLAYING is called an upwards state change
* and %GST_STATE_PLAYING ⇒ %GST_STATE_NULL a downwards state change.
*/
export enum StateChange {
/**
* state 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 opens the device (in case feature need to be probed).
*/
NULL_TO_READY,
/**
* state 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_STATE_CHANGE_ASYNC and complete
* the state change when they have enough information. It is a requirement
* for sinks to return %GST_STATE_CHANGE_ASYNC and complete the state change
* when they receive the first buffer or %GST_EVENT_EOS (preroll).
* Sinks also block the dataflow when in PAUSED.
* * A pipeline resets the running_time to 0.
* * Live sources return %GST_STATE_CHANGE_NO_PREROLL and don't generate data.
*/
READY_TO_PAUSED,
/**
* state 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 that it is only allowed to
* synchronize on the #GstClock in the PLAYING state.
* * The pipeline uses the #GstClock and the running_time to calculate the
* base_time. The base_time is distributed to all children when performing
* the state change.
* * Sink elements stop blocking on the preroll buffer or event and start
* rendering the data.
* * Sinks can post %GST_MESSAGE_EOS in the PLAYING state. It is not allowed
* to post %GST_MESSAGE_EOS when not in the PLAYING state.
* * While streaming in PAUSED or PLAYING elements can create and remove
* sometimes pads.
* * Live sources start generating data and return %GST_STATE_CHANGE_SUCCESS.
*/
PAUSED_TO_PLAYING,
/**
* state change from PLAYING to PAUSED.
* * Most elements ignore this state change.
* * The pipeline calculates the running_time based on the last selected
* #GstClock and the base_time. It stores this information to continue
* playback when going back to the PLAYING state.
* * Sinks unblock any #GstClock wait calls.
* * When a sink does not have a pending buffer to play, it returns
* #GST_STATE_CHANGE_ASYNC from this state change and completes the state
* change when it receives a new buffer or an %GST_EVENT_EOS.
* * Any queued %GST_MESSAGE_EOS items are removed since they will be reposted
* when going back to the PLAYING state. The EOS messages are queued in
* #GstBin containers.
* * Live sources stop generating data and return %GST_STATE_CHANGE_NO_PREROLL.
*/
PLAYING_TO_PAUSED,
/**
* state 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_FLOW_FLUSHING.
* * The element pads are deactivated so that streaming becomes impossible and
* all streaming threads are stopped.
* * The sink forgets all negotiated formats
* * Elements remove all sometimes pads
*/
PAUSED_TO_READY,
/**
* state change from READY to NULL.
* * Elements close devices
* * Elements reset any internal state.
*/
READY_TO_NULL,
/**
* state change from NULL to NULL. (Since: 1.14)
*/
NULL_TO_NULL,
/**
* state 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)
*/
READY_TO_READY,
/**
* state 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: 1.14)
*/
PAUSED_TO_PAUSED,
/**
* state change from PLAYING to PLAYING. (Since: 1.14)
*/
PLAYING_TO_PLAYING,
}
/**
* The possible return values from a state change function such as
* gst_element_set_state(). Only `GST_STATE_CHANGE_FAILURE` is a real failure.
*/
export enum StateChangeReturn {
/**
* the state change failed
*/
FAILURE,
/**
* the state change succeeded
*/
SUCCESS,
/**
* the state change will happen asynchronously
*/
ASYNC,
/**
* the state change succeeded but the element
* cannot produce data in %GST_STATE_PAUSED.
* This typically happens with live sources.
*/
NO_PREROLL,
}
/**
* Stream errors are for anything related to the stream being processed:
* format errors, media type errors, ...
* They're typically used by decoders, demuxers, converters, ...
*/
export enum StreamError {
/**
* a general error which doesn't fit in any other
* category. Make sure you add a custom message to the error call.
*/
FAILED,
/**
* do not use this except as a placeholder for
* deciding where to go while developing code.
*/
TOO_LAZY,
/**
* use this when you do not want to implement
* this functionality yet.
*/
NOT_IMPLEMENTED,
/**
* used when the element doesn't know the
* stream's type.
*/
TYPE_NOT_FOUND,
/**
* used when the element doesn't handle this type
* of stream.
*/
WRONG_TYPE,
/**
* used when there's no codec to handle the
* stream's type.
*/
CODEC_NOT_FOUND,
/**
* used when decoding fails.
*/
DECODE,
/**
* used when encoding fails.
*/
ENCODE,
/**
* used when demuxing fails.
*/
DEMUX,
/**
* used when muxing fails.
*/
MUX,
/**
* used when the stream is of the wrong format
* (for example, wrong caps).
*/
FORMAT,
/**
* used when the stream is encrypted and can't be
* decrypted because this is not supported by the element.
*/
DECRYPT,
/**
* used when the stream is encrypted and
* can't be decrypted because no suitable key is available.
*/
DECRYPT_NOKEY,
/**
* the number of stream error types.
*/
NUM_ERRORS,
}
/**
* The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the
* application of new streaming threads and their status.
*/
export enum StreamStatusType {
/**
* A new thread need to be created.
*/
CREATE,
/**
* a thread entered its loop function
*/
ENTER,
/**
* a thread left its loop function
*/
LEAVE,
/**
* a thread is destroyed
*/
DESTROY,
/**
* a thread is started
*/
START,
/**
* a thread is paused
*/
PAUSE,
/**
* a thread is stopped
*/
STOP,
}
/**
* The type of a %GST_MESSAGE_STRUCTURE_CHANGE.
*/
export enum StructureChangeType {
/**
* Pad linking is starting or done.
*/
LINK,
/**
* Pad unlinking is starting or done.
*/
UNLINK,
}
/**
* Extra tag flags used when registering tags.
*/
export enum TagFlag {
/**
* undefined flag
*/
UNDEFINED,
/**
* tag is meta data
*/
META,
/**
* tag is encoded
*/
ENCODED,
/**
* tag is decoded
*/
DECODED,
/**
* number of tag flags
*/
COUNT,
}
/**
* 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_merge_tags() / gst_tag_setter_add_tags() or a
* %GST_EVENT_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 mode | A + B | A + !B | !A + B | !A + !B |
* | ----------- | ----- | ------ | ------ | ------- |
* | REPLACE_ALL | B | ø | B | ø |
* | REPLACE | B | A | B | ø |
* | APPEND | A, B | A | B | ø |
* | PREPEND | B, A | A | B | ø |
* | KEEP | A | A | B | ø |
* | KEEP_ALL | A | A | ø | ø |
*/
export enum TagMergeMode {
/**
* undefined merge mode
*/
UNDEFINED,
/**
* replace all tags (clear list and append)
*/
REPLACE_ALL,
/**
* replace tags
*/
REPLACE,
/**
* append tags
*/
APPEND,
/**
* prepend tags
*/
PREPEND,
/**
* keep existing tags
*/
KEEP,
/**
* keep all existing tags
*/
KEEP_ALL,
/**
* the number of merge modes
*/
COUNT,
}
/**
* GstTagScope specifies if a taglist applies to the complete
* medium or only to one single stream.
*/
export enum TagScope {
/**
* tags specific to this single stream
*/
STREAM,
/**
* global tags for the complete medium
*/
GLOBAL,
}
/**
* The different states a task can be in
*/
export enum TaskState {
/**
* the task is started and running
*/
STARTED,
/**
* the task is stopped
*/
STOPPED,
/**
* the task is paused
*/
PAUSED,
}
/**
* The different types of TOC entries (see #GstTocEntry).
*
* There are two types of TOC entries: alternatives or parts in a sequence.
*/
export enum TocEntryType {
/**
* entry is an angle (i.e. an alternative)
*/
ANGLE,
/**
* entry is a version (i.e. alternative)
*/
VERSION,
/**
* entry is an edition (i.e. alternative)
*/
EDITION,
/**
* invalid entry type value
*/
INVALID,
/**
* entry is a title (i.e. a part of a sequence)
*/
TITLE,
/**
* entry is a track (i.e. a part of a sequence)
*/
TRACK,
/**
* entry is a chapter (i.e. a part of a sequence)
*/
CHAPTER,
}
/**
* How a #GstTocEntry should be repeated. By default, entries are played a
* single time.
*/
export enum TocLoopType {
/**
* single forward playback
*/
NONE,
/**
* repeat forward
*/
FORWARD,
/**
* repeat backward
*/
REVERSE,
/**
* repeat forward and backward
*/
PING_PONG,
}
/**
* The scope of a TOC.
*/
export enum TocScope {
/**
* global TOC representing all selectable options
* (this is what applications are usually interested in)
*/
GLOBAL,
/**
* TOC 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 of the global TOC, e.g. just the chapters of
* the current title, or the chapters selected for playback from the
* current title)
*/
CURRENT,
}
/**
* 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_TRACER_VALUE_SCOPE_PAD, then each of the log
* events may contain values for different #GstPads.
*/
export enum TracerValueScope {
/**
* the value is related to the process
*/
PROCESS,
/**
* the value is related to a thread
*/
THREAD,
/**
* the value is related to an #GstElement
*/
ELEMENT,
/**
* the value is related to a #GstPad
*/
PAD,
}
/**
* The probability of the typefind function. Higher values have more certainty
* in doing a reliable typefind.
*/
export enum TypeFindProbability {
/**
* type undetected.
*/
NONE,
/**
* unlikely typefind.
*/
MINIMUM,
/**
* possible type detected.
*/
POSSIBLE,
/**
* likely a type was detected.
*/
LIKELY,
/**
* nearly certain that a type was detected.
*/
NEARLY_CERTAIN,
/**
* very certain a type was detected.
*/
MAXIMUM,
}
/**
* Different URI-related errors that can occur.
*/
export enum URIError {
/**
* The protocol is not supported
*/
UNSUPPORTED_PROTOCOL,
/**
* There was a problem with the URI
*/
BAD_URI,
/**
* Could not set or change the URI because the
* URI handler was in a state where that is not possible or not permitted
*/
BAD_STATE,
/**
* There was a problem with the entity that
* the URI references
*/
BAD_REFERENCE,
}
/**
* The different types of URI direction.
*/
export enum URIType {
/**
* The URI direction is unknown
*/
UNKNOWN,
/**
* The URI is a consumer.
*/
SINK,
/**
* The URI is a producer.
*/
SRC,
}
/**
* Flags for allocators.
* @bitfield
*/
export enum AllocatorFlags {
/**
* The allocator has a custom alloc function.
*/
CUSTOM_ALLOC,
/**
* first flag that can be used for custom purposes
*/
LAST,
}
/**
* 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().
* @bitfield
*/
export enum BinFlags {
/**
* Don't resync a state change when elements are added or linked in the bin
*/
NO_RESYNC,
/**
* Indicates whether the bin can handle elements that add/remove source pads
* at any point in time without first posting a no-more-pads signal.
*/
STREAMS_AWARE,
/**
* The last enum in the series of flags for bins. Derived classes can use this
* as first value in a list of flags.
*/
LAST,
}
/**
* A set of flags that can be provided to the gst_buffer_copy_into()
* function to specify which items should be copied.
* @bitfield
*/
export enum BufferCopyFlags {
/**
* copy nothing
*/
NONE,
/**
* flag indicating that buffer flags should be copied
*/
FLAGS,
/**
* flag indicating that buffer pts, dts,
* duration, offset and offset_end should be copied
*/
TIMESTAMPS,
/**
* flag indicating that buffer meta should be
* copied
*/
META,
/**
* flag indicating that buffer memory should be reffed
* and appended to already existing memory. Unless the memory is marked as
* NO_SHARE, no actual copy of the memory is made but it is simply reffed.
* Add `GST_BUFFER_COPY_DEEP` to force a real copy.
*/
MEMORY,
/**
* flag indicating that buffer memory should be
* merged
*/
MERGE,
/**
* flag indicating that memory should always be copied instead of reffed
*/
DEEP,
}
/**
* A set of buffer flags used to describe properties of a #GstBuffer.
* @bitfield
*/
export enum BufferFlags {
/**
* the buffer is live data and should be discarded in
* the PAUSED state.
*/
LIVE,
/**
* the 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.
*/
DECODE_ONLY,
/**
* the buffer marks a data discontinuity in the stream.
* This typically occurs after a seek or a dropped buffer
* from a live or network source.
*/
DISCONT,
/**
* the buffer timestamps might have a discontinuity
* and this buffer is a good point to resynchronize.
*/
RESYNC,
/**
* the buffer data is corrupted.
*/
CORRUPTED,
/**
* the 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 packet header.
*/
MARKER,
/**
* the buffer contains header information that is
* needed to decode the following data.
*/
HEADER,
/**
* the 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).
*/
GAP,
/**
* the buffer can be dropped without breaking the
* stream, for example to reduce bandwidth.
*/
DROPPABLE,
/**
* this unit cannot be decoded independently.
*/
DELTA_UNIT,
/**
* this flag is set when memory of the buffer
* is added/removed
*/
TAG_MEMORY,
/**
* Elements which write to disk or permanent storage should ensure the data
* is synced after writing the contents of this buffer.
*/
SYNC_AFTER,
/**
* This buffer is important and should not be dropped.
*
* This can be used to mark important buffers, e.g. to flag RTP packets
* carrying keyframes or codec setup data for RTP Forward Error Correction
* purposes, or to prevent still video frames from being dropped by elements
* due to QoS.
*/
NON_DROPPABLE,
/**
* additional media specific flags can be added starting from
* this flag.
*/
LAST,
}
/**
* Additional flags to control the allocation of a buffer
* @bitfield
*/
export enum BufferPoolAcquireFlags {
/**
* no flags
*/
NONE,
/**
* buffer is keyframe
*/
KEY_UNIT,
/**
* when the bufferpool is empty, acquire_buffer
* will by default block until a buffer is released into the pool again. Setting
* this flag makes acquire_buffer return #GST_FLOW_EOS instead of blocking.
*/
DONTWAIT,
/**
* buffer is discont
*/
DISCONT,
/**
* last flag, subclasses can use private flags
* starting from this value.
*/
LAST,
}
/**
* The standard flags that a bus may have.
* @bitfield
*/
export enum BusFlags {
/**
* The bus is currently dropping all messages
*/
FLUSHING,
/**
* offset to define more flags
*/
FLAG_LAST,
}
/**
* Extra flags for a caps.
* @bitfield
*/
export enum CapsFlags {
/**
* Caps has no specific content, but can contain
* anything.
*/
ANY,
}
/**
* The capabilities of this clock
* @bitfield
*/
export enum ClockFlags {
/**
* clock can do a single sync timeout request
*/
CAN_DO_SINGLE_SYNC,
/**
* clock can do a single async timeout request
*/
CAN_DO_SINGLE_ASYNC,
/**
* clock can do sync periodic timeout requests
*/
CAN_DO_PERIODIC_SYNC,
/**
* clock can do async periodic timeout callbacks
*/
CAN_DO_PERIODIC_ASYNC,
/**
* clock's resolution can be changed
*/
CAN_SET_RESOLUTION,
/**
* clock can be slaved to a master clock
*/
CAN_SET_MASTER,
/**
* clock needs to be synced before it can be used
*/
NEEDS_STARTUP_SYNC,
/**
* subclasses can add additional flags starting from this flag
*/
LAST,
}
/**
* These are some terminal style flags you can use when creating your
* debugging categories to make them stand out in debugging output.
* @bitfield
*/
export enum DebugColorFlags {
/**
* Use black as foreground color.
*/
FG_BLACK,
/**
* Use red as foreground color.
*/
FG_RED,
/**
* Use green as foreground color.
*/
FG_GREEN,
/**
* Use yellow as foreground color.
*/
FG_YELLOW,
/**
* Use blue as foreground color.
*/
FG_BLUE,
/**
* Use magenta as foreground color.
*/
FG_MAGENTA,
/**
* Use cyan as foreground color.
*/
FG_CYAN,
/**
* Use white as foreground color.
*/
FG_WHITE,
/**
* Use black as background color.
*/
BG_BLACK,
/**
* Use red as background color.
*/
BG_RED,
/**
* Use green as background color.
*/
BG_GREEN,
/**
* Use yellow as background color.
*/
BG_YELLOW,
/**
* Use blue as background color.
*/
BG_BLUE,
/**
* Use magenta