![]() |
![]() |
![]() |
GStreamer 1.0 Core Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gst/gst.h> struct GstStream; struct GstStreamClass; enum GstStreamType; GstStream * gst_stream_new (const gchar *stream_id
,GstCaps *caps
,GstStreamType type
,GstStreamFlags flags
); GstCaps * gst_stream_get_caps (GstStream *stream
); GstStreamFlags gst_stream_get_stream_flags (GstStream *stream
); const gchar * gst_stream_get_stream_id (GstStream *stream
); GstStreamType gst_stream_get_stream_type (GstStream *stream
); GstTagList * gst_stream_get_tags (GstStream *stream
); void gst_stream_set_caps (GstStream *stream
,GstCaps *caps
); void gst_stream_set_stream_flags (GstStream *stream
,GstStreamFlags flags
); void gst_stream_set_stream_type (GstStream *stream
,GstStreamType stream_type
); void gst_stream_set_tags (GstStream *stream
,GstTagList *tags
); const gchar * gst_stream_type_get_name (GstStreamType stype
);
A GstStream is a high-level object defining a stream of data which is, or can be, present in a GstPipeline.
It is defined by a unique identifier, a "Stream ID". A GstStream does not automatically imply the stream is present within a pipeline or element.
Any element that can introduce new streams in a pipeline should create the
appropriate GstStream object, and can convey that object via the
GST_EVENT_STREAM_START
event and/or the GstStreamCollection.
Elements that do not modify the nature of the stream can add extra information on it (such as enrich the GstCaps, or GstTagList). This is typically done by parsing elements.
struct GstStream { GstObject object; const gchar *stream_id; };
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).
struct GstStreamClass { GstObjectClass parent_class; };
GstStream class structure
GstObjectClass |
the parent class structure |
typedef enum { GST_STREAM_TYPE_UNKNOWN = 1 << 0, GST_STREAM_TYPE_AUDIO = 1 << 1, GST_STREAM_TYPE_VIDEO = 1 << 2, GST_STREAM_TYPE_CONTAINER = 1 << 3, GST_STREAM_TYPE_TEXT = 1 << 4 } GstStreamType;
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.
The stream is of unknown (unclassified) type. | |
The stream is of audio data | |
The stream carries video data | |
The stream is a muxed container type | |
The stream contains subtitle / subpicture data. |
GstStream * gst_stream_new (const gchar *stream_id
,GstCaps *caps
,GstStreamType type
,GstStreamFlags flags
);
Create a new GstStream for the given stream_id
, caps
, type
and flags
|
the id for the new stream. If NULL ,
a new one will be automatically generated. [allow-none]
|
|
the GstCaps of the stream. [allow-none][transfer none] |
|
the GstStreamType of the stream |
|
the GstStreamFlags of the stream |
Returns : |
The new GstStream |
Since 1.10
GstCaps * gst_stream_get_caps (GstStream *stream
);
Retrieve the caps for stream
, if any
Since 1.10
GstStreamFlags gst_stream_get_stream_flags (GstStream *stream
);
Retrieve the current stream flags for stream
|
a GstStream |
Returns : |
The GstStreamFlags for stream
|
Since 1.10
const gchar * gst_stream_get_stream_id (GstStream *stream
);
Returns the stream ID of stream
.
|
a GstStream |
Returns : |
the stream ID of stream . Only valid
during the lifetime of stream . [transfer none][nullable]
|
Since 1.10
GstStreamType gst_stream_get_stream_type (GstStream *stream
);
Retrieve the stream type for stream
|
a GstStream |
Returns : |
The GstStreamType for stream
|
Since 1.10
GstTagList * gst_stream_get_tags (GstStream *stream
);
Retrieve the tags for stream
, if any
|
a GstStream |
Returns : |
The GstTagList for stream . [transfer full][nullable]
|
Since 1.10
void gst_stream_set_caps (GstStream *stream
,GstCaps *caps
);
Set the caps for the GstStream
Since 1.10
void gst_stream_set_stream_flags (GstStream *stream
,GstStreamFlags flags
);
Set the flags
for the stream
.
|
a GstStream |
|
the flags to set on stream
|
Since 1.10
void gst_stream_set_stream_type (GstStream *stream
,GstStreamType stream_type
);
Set the stream type of stream
|
a GstStream |
|
the type to set on stream
|
Since 1.10
void gst_stream_set_tags (GstStream *stream
,GstTagList *tags
);
Set the tags for the GstStream
|
a GstStream |
|
a GstTagList. [transfer none][allow-none] |
Since 1.10
const gchar * gst_stream_type_get_name (GstStreamType stype
);
Get a descriptive string for a given GstStreamType
|
a GstStreamType |
Returns : |
A string describing the stream type |
Since 1.10