ClutterGst.Player

g ClutterGst.Player ClutterGst.Player GObject.GInterface GObject.GInterface GObject.GInterface->ClutterGst.Player

Implementations:

ClutterGst.Camera, ClutterGst.Playback

Methods

get_audio_volume ()

get_frame ()

get_idle ()

get_pipeline ()

get_playing ()

get_video_sink ()

set_audio_volume (volume)

set_playing (playing)

Virtual Methods

do_eos ()

do_error (error)

do_get_audio_volume ()

do_get_frame ()

do_get_idle ()

do_get_pipeline ()

do_get_playing ()

do_get_video_sink ()

do_new_frame (frame)

do_ready ()

do_set_audio_volume (volume)

do_set_playing (playing)

do_size_change (width, height)

Properties

Name

Type

Flags

Short Description

audio-volume

float

r/w

The volume of the audio

idle

bool

r

Idle state of the player’s pipeline

playing

bool

r/w

Whether the player is playing

Signals

Name

Short Description

eos

The ::eos signal is emitted each time the media stream ends.

error

The ::error signal is emitted each time an error occurred.

new-frame

The ::new-frame signal is emitted each time a frame is received from the video sink.

ready

The ::ready signal is emitted each time the gstreamer pipeline becomes ready.

size-change

The ::size-change signal is emitted each time the new frame has different dimensions to the previous frame.

Fields

None

Class Details

class ClutterGst.Player
Bases:

GObject.GInterface

Structure:

ClutterGst.PlayerIface

ClutterGst.Player is an opaque structure whose members cannot be directly accessed

New in version 1.4.

get_audio_volume()
Returns:

The playback volume between 0.0 and 1.0

Return type:

float

Retrieves the playback volume of self.

New in version 3.0.

get_frame()
Returns:

the ClutterGst.Frame of the last frame.

Return type:

ClutterGst.Frame

Retrieves the ClutterGst.Frame of the last frame produced by self.

New in version 3.0.

get_idle()
Returns:

True if the pipline is in idle mode, False otherwise.

Return type:

bool

Get the idle state of the pipeline.

New in version 3.0.

get_pipeline()
Returns:

the Gst.Pipeline element used by the player

Return type:

Gst.Element

Retrieves the Gst.Pipeline used by the self, for direct use with GStreamer API.

New in version 3.0.

get_playing()
Returns:

True if playing, False if stopped.

Return type:

bool

Retrieves the playing status of self.

New in version 3.0.

get_video_sink()
Returns:

the ClutterGst.VideoSink element used by the player

Return type:

ClutterGst.VideoSink

Retrieves the ClutterGst.VideoSink used by the self.

New in version 3.0.

set_audio_volume(volume)
Parameters:

volume (float) – the volume as a double between 0.0 and 1.0

Sets the playback volume of self to volume.

New in version 3.0.

set_playing(playing)
Parameters:

playing (bool) – True to start playing

Starts or stops playing of self.

The implementation might be asynchronous, so the way to know whether the actual playing state of the self is to use the GObject.Object ::notify signal on the ClutterGst.Player :playing property and then retrieve the current state with ClutterGst.Player.get_playing(). ClutterGstVideoActor in clutter-gst is an example of such an asynchronous implementation.

New in version 3.0.

do_eos() virtual
do_error(error) virtual
Parameters:

error (GLib.Error) –

do_get_audio_volume() virtual
Returns:

The playback volume between 0.0 and 1.0

Return type:

float

Retrieves the playback volume of self.

New in version 3.0.

do_get_frame() virtual
Returns:

the ClutterGst.Frame of the last frame.

Return type:

ClutterGst.Frame

Retrieves the ClutterGst.Frame of the last frame produced by self.

New in version 3.0.

do_get_idle() virtual
Returns:

True if the pipline is in idle mode, False otherwise.

Return type:

bool

Get the idle state of the pipeline.

New in version 3.0.

do_get_pipeline() virtual
Returns:

the Gst.Pipeline element used by the player

Return type:

Gst.Element

Retrieves the Gst.Pipeline used by the self, for direct use with GStreamer API.

New in version 3.0.

do_get_playing() virtual
Returns:

True if playing, False if stopped.

Return type:

bool

Retrieves the playing status of self.

New in version 3.0.

do_get_video_sink() virtual
Returns:

the ClutterGst.VideoSink element used by the player

Return type:

ClutterGst.VideoSink

Retrieves the ClutterGst.VideoSink used by the self.

New in version 3.0.

do_new_frame(frame) virtual
Parameters:

frame (ClutterGst.Frame) –

do_ready() virtual
do_set_audio_volume(volume) virtual
Parameters:

volume (float) – the volume as a double between 0.0 and 1.0

Sets the playback volume of self to volume.

New in version 3.0.

do_set_playing(playing) virtual
Parameters:

playing (bool) – True to start playing

Starts or stops playing of self.

The implementation might be asynchronous, so the way to know whether the actual playing state of the self is to use the GObject.Object ::notify signal on the ClutterGst.Player :playing property and then retrieve the current state with ClutterGst.Player.get_playing(). ClutterGstVideoActor in clutter-gst is an example of such an asynchronous implementation.

New in version 3.0.

do_size_change(width, height) virtual
Parameters:
  • width (int) –

  • height (int) –

Signal Details

ClutterGst.Player.signals.eos(player)
Signal Name:

eos

Flags:

RUN_LAST

Parameters:

player (ClutterGst.Player) – The object which received the signal

The ::eos signal is emitted each time the media stream ends.

ClutterGst.Player.signals.error(player, error)
Signal Name:

error

Flags:

RUN_LAST

Parameters:

The ::error signal is emitted each time an error occurred.

ClutterGst.Player.signals.new_frame(player, frame)
Signal Name:

new-frame

Flags:

RUN_LAST

Parameters:

The ::new-frame signal is emitted each time a frame is received from the video sink.

ClutterGst.Player.signals.ready(player)
Signal Name:

ready

Flags:

RUN_LAST

Parameters:

player (ClutterGst.Player) – The object which received the signal

The ::ready signal is emitted each time the gstreamer pipeline becomes ready.

ClutterGst.Player.signals.size_change(player, width, height)
Signal Name:

size-change

Flags:

RUN_LAST

Parameters:
  • player (ClutterGst.Player) – The object which received the signal

  • width (int) – new width of the frames

  • height (int) – new height of the frames

The ::size-change signal is emitted each time the new frame has different dimensions to the previous frame.

Property Details

ClutterGst.Player.props.audio_volume
Name:

audio-volume

Type:

float

Default Value:

0.5

Flags:

READABLE, WRITABLE

The volume of the audio, as a normalized value between 0.0 and 1.0.

ClutterGst.Player.props.idle
Name:

idle

Type:

bool

Default Value:

True

Flags:

READABLE

Whether the ClutterGst.Player is in idle mode.

New in version 1.4.

ClutterGst.Player.props.playing
Name:

playing

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the ClutterGst.Player actor is playing.