Gst.StreamCollection

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.StreamCollection Gst.StreamCollection Gst.Object->Gst.StreamCollection

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (upstream_id)

add_stream (stream)

get_size ()

get_stream (index)

get_upstream_id ()

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

do_stream_notify (stream, pspec)

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

upstream-id

str

r/w/c

The stream ID of the parent stream

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Short Description

stream-notify

The stream notify signal is used to be notified of property changes to streams within the collection.

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

object

Gst.Object

r

upstream_id

str

r

Class Details

class Gst.StreamCollection(**kwargs)
Bases:

Gst.Object

Abstract:

No

Structure:

Gst.StreamCollectionClass

A collection of Gst.Stream that are available.

A Gst.StreamCollection 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.StreamCollection.get_stream()

Once posted, a Gst.StreamCollection is immutable. Updates are made by sending a new Gst.StreamCollection message, which may or may not share some of the Gst.Stream 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 Gst.StreamCollection.

Applications can activate streams from a collection by using the Gst.EventType.SELECT_STREAMS event on a pipeline, bin or element.

New in version 1.10.

classmethod new(upstream_id)[source]
Parameters:

upstream_id (str or None) – The stream id of the parent stream

Returns:

The new Gst.StreamCollection.

Return type:

Gst.StreamCollection

Create a new Gst.StreamCollection.

New in version 1.10.

add_stream(stream)[source]
Parameters:

stream (Gst.Stream) – the Gst.Stream to add

Returns:

True if the stream was properly added, else False

Return type:

bool

Add the given stream to the self.

New in version 1.10.

get_size()[source]
Returns:

The number of streams that self contains

Return type:

int

Get the number of streams this collection contains

New in version 1.10.

get_stream(index)[source]
Parameters:

index (int) – Index of the stream to retrieve

Returns:

A Gst.Stream

Return type:

Gst.Stream or None

Retrieve the Gst.Stream with index index from the collection.

The caller should not modify the returned Gst.Stream

New in version 1.10.

get_upstream_id()[source]
Returns:

The upstream id

Return type:

str or None

Returns the upstream id of the self.

New in version 1.10.

do_stream_notify(stream, pspec) virtual
Parameters:

default signal handler for the stream-notify signal

Signal Details

Gst.StreamCollection.signals.stream_notify(stream_collection, prop_stream, prop)
Signal Name:

stream-notify

Flags:

RUN_FIRST, NO_RECURSE, DETAILED, NO_HOOKS

Parameters:

The stream notify signal is used to be notified of property changes to streams within the collection.

Property Details

Gst.StreamCollection.props.upstream_id
Name:

upstream-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

stream-id