gstreamer-base-0.10
Description:
Content:
Namespaces:
-
Gst
Classes:
-
Adapter - This class is for elements that receive buffers in an undesired
size. While for example raw video contains one image per buffer, the same is not true for a lot of other formats, especially those
that come directly from a file. So if you have undefined buffer sizes and require a specific size, this object is for you. An adapter
is created with Adapter. It can be freed again with
unref. into the adapter using
push and the data is then read back in chunks of the desired size using
peek. After the data is processed, it is freed using
flush. Other methods such as take
and take_buffer combine
peek and flush in one method and are potentially more convenient for some
use cases. For example, a sink pad's chain function that needs to pass data to a library in 512-byte chunks could be implemented like
this:
-
BaseParse - Subclasses can override any of the available virtual
methods or not, as needed. At minimum
check_valid_frame and parse_frame needs to be overridden.
-
BaseParseFrame - Frame (context) data passed to each frame parsing
virtual methods. In addition to providing the data to be checked for a valid frame or an already identified frame, it conveys
additional metadata or control information from and to the subclass w.r.t. the particular frame in question (rather than global
parameters). Some of these may apply to each parsing stage, others only to some a particular one. These parameters are effectively
zeroed at start of each frame's processing, i.e. parsing virtual method invocation sequence.
-
BaseSink - Subclasses can override any of the available virtual methods
or not, as needed. At the minimum, the
render method should be overridden to output/present buffers.
-
BaseSrc - Subclasses can override any of the available virtual methods or
not, as needed. At the minimum, the
create method should be overridden to produce buffers.
-
BaseTransform - Subclasses can override any of the available
virtual methods or not, as needed. At minimum either
transform or transform_ip need to be overridden. If the
element can overwrite the input data with the results (data is of the same type and quantity) it should provide transform_ip
.
-
BitReader -
BitReader provides a bit reader that can read any number of bits from a memory buffer.
It provides functions for reading any number of bits into 8, 16, 32 and 64 bit variables.
-
ByteReader -
ByteReader provides a byte reader that can read different integer and floating point
types from a memory buffer. It provides functions for reading signed/unsigned, little/big endian integers of 8, 16, 24, 32 and 64 bits
and functions for reading little/big endian floating points numbers of 32 and 64 bits. It also provides functions to read
NUL-terminated strings in various character encodings.
-
ByteWriter -
ByteWriter provides a byte writer and reader that can write/read different integer and
floating point types to/from a memory buffer. It provides functions for writing/reading signed/unsigned, little/big endian integers of
8, 16, 24, 32 and 64 bits and functions for reading little/big endian floating points numbers of 32 and 64 bits. It also provides
functions to write/read NUL-terminated strings in various character encodings.
-
CollectData - Structure used by the collect_pads.
-
CollectPads - Manages a set of pads that operate in collect mode.
This means that control is given to the manager of this object when all pads have data.
-
DataQueue -
DataQueue is an object that handles threadsafe queueing of objects. It also provides
size-related functionality. This object should be used for any
Element that wishes to provide some sort of queueing functionality.
-
DataQueueItem - Structure used by
DataQueue. You can supply a different structure, as long as the top of the structure is
identical to this structure.
-
DataQueueSize - Structure describing the size of a queue.
-
PushSrc - This class is mostly useful for elements that cannot do random
access, or at least very slowly. The source usually prefers to push out a fixed size buffer. Subclasses usually operate in a format
that is different from the default GST_FORMAT_BYTES format of BaseSrc. Classes extending
this base class will usually be scheduled in a push based mode. If the peer accepts to operate without offsets and within the limits
of the allowed block size, this class can operate in getrange based mode automatically. To make this possible, the subclass should
override the
::check_get_range method. The subclass should extend the methods from the baseclass in addition to the
::create method. Seeking, flushing, scheduling and sync is all handled by this base class. Last reviewed on 2006-07-04
(0.10.9)
Enums:
Constants:
Delegates:
-
public delegate void CollectDataDestroyNotify ()
-
public delegate weak Buffer CollectPadsClipFunction (CollectPads pads, CollectData data, Buffer buffer)
-
public delegate FlowReturn CollectPadsFunction (CollectPads pads)
-
public delegate bool DataQueueCheckFullFunction (DataQueue queue, uint visible, uint bytes, uint64 time, void* checkdata)
-
public delegate void DataQueueEmptyCallback (DataQueue queue, void* checkdata)
-
public delegate void DataQueueFullCallback (DataQueue queue, void* checkdata)
-
public delegate FlowReturn TypeFindHelperGetRangeFunction (Object obj, uint64 offset, uint length, out Buffer buffer)
Methods:
-
public weak Caps type_find_helper (Pad src, uint64 size)
Tries to find what type of data is flowing from the given source
Pad. Returns null if no
Caps matches the data stream.
-
public weak Caps type_find_helper_for_buffer (Object obj, Buffer buf, TypeFindProbability prob)
Tries to find what type of data is contained in the given
Buffer, the assumption being that the buffer represents the beginning
of the stream or file. All available typefinders will be called on the data in order of rank. If a typefinding function returns a
probability of MAXIMUM, typefinding is
stopped immediately and the found caps will be returned right away. Otherwise, all available typefind functions will the tried, and
the caps with the highest probability will be returned, or null if the content of the buffer could not be identified.
if no type could be found. The caller should free the caps returned with
unref.
-
public Caps type_find_helper_for_extension (Object obj, string extension)
Tries to find the best Caps associated
with extension. All available typefinders will be checked against the extension in order of rank. The caps of the first
typefinder that can handle extension will be returned. null if no type could be found. The caller should
free the caps returned with unref.
-
public weak Caps type_find_helper_get_range (Object obj, TypeFindHelperGetRangeFunction func, uint64 size, TypeFindProbability prob)
Utility function to do pull-based typefinding. Unlike
type_find_helper however, this function will use the specified function
func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful
mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped
data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for
the tag size, for example). Returns null if no Caps matches
the data stream.
-
public weak Caps type_find_helper_get_range_ext (Object obj, TypeFindHelperGetRangeFunction func, uint64 size, string extension, TypeFindProbability prob)
Utility function to do pull-based typefinding. Unlike
type_find_helper however, this function will use the specified function
func to obtain the data needed by the typefind functions, rather than operating on a given source pad. This is useful
mostly for elements like tag demuxers which strip off data at the beginning and/or end of a file and want to typefind the stripped
data stream before adding their own source pad (the specified callback can then call the upstream peer pad with offsets adjusted for
the tag size, for example). When extension is not NULL, this function will first try the typefind functions for the
given extension, which might speed up the typefinding in many cases. Returns null if no
Caps matches the data stream.