Clutter.Media

g Clutter.Media Clutter.Media GObject.GInterface GObject.GInterface GObject.GInterface->Clutter.Media

Implementations:

None

Methods

get_audio_volume ()

get_buffer_fill ()

get_can_seek ()

get_duration ()

get_playing ()

get_progress ()

get_subtitle_font_name ()

get_subtitle_uri ()

get_uri ()

set_audio_volume (volume)

set_filename (filename)

set_playing (playing)

set_progress (progress)

set_subtitle_font_name (font_name)

set_subtitle_uri (uri)

set_uri (uri)

Virtual Methods

do_eos ()

do_error (error)

Properties

Name

Type

Flags

Short Description

audio-volume

float

d/r/w

The volume of the audio deprecated

buffer-fill

float

d/r

The fill level of the buffer deprecated

can-seek

bool

d/r

Whether the current stream is seekable deprecated

duration

float

r

The duration of the stream, in seconds deprecated

playing

bool

d/r/w

Whether the actor is playing deprecated

progress

float

d/r/w

Current progress of the playback deprecated

subtitle-font-name

str

d/r/w

The font used to display subtitles deprecated

subtitle-uri

str

d/r/w

URI of a subtitle file deprecated

uri

str

d/r/w

URI of a media file deprecated

Signals

Name

Short Description

eos

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

error

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

Fields

None

Class Details

class Clutter.Media
Bases:

GObject.GInterface

Structure:

Clutter.MediaIface

Clutter.Media is an opaque structure whose members cannot be directly accessed

New in version 0.2.

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 1.0.

Deprecated since version 1.12.

get_buffer_fill()
Returns:

the fill level, between 0.0 and 1.0

Return type:

float

Retrieves the amount of the stream that is buffered.

New in version 1.0.

Deprecated since version 1.12.

get_can_seek()
Returns:

True if self can seek, False otherwise.

Return type:

bool

Retrieves whether self is seekable or not.

New in version 0.2.

Deprecated since version 1.12.

get_duration()
Returns:

the duration of the media stream, in seconds

Return type:

float

Retrieves the duration of the media stream that self represents.

New in version 0.2.

Deprecated since version 1.12.

get_playing()
Returns:

True if playing, False if stopped.

Return type:

bool

Retrieves the playing status of self.

New in version 0.2.

Deprecated since version 1.12.

get_progress()
Returns:

the playback progress, between 0.0 and 1.0

Return type:

float

Retrieves the playback progress of self.

New in version 1.0.

Deprecated since version 1.12.

get_subtitle_font_name()
Returns:

a string containing the font name. Use GLib.free() to free the returned string

Return type:

str

Retrieves the font name currently used.

New in version 1.2.

Deprecated since version 1.12.

get_subtitle_uri()
Returns:

the URI of the subtitle file. Use GLib.free() to free the returned string

Return type:

str

Retrieves the URI of the subtitle file in use.

New in version 1.2.

Deprecated since version 1.12.

get_uri()
Returns:

the URI of the media stream. Use GLib.free() to free the returned string

Return type:

str

Retrieves the URI from self.

New in version 0.2.

Deprecated since version 1.12.

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 1.0.

Deprecated since version 1.12.

set_filename(filename)
Parameters:

filename (str) – A filename

Sets the source of self using a file path.

New in version 0.2.

Deprecated since version 1.12.

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 Clutter.Media :playing property and then retrieve the current state with Clutter.Media.get_playing(). ClutterGstVideoTexture in clutter-gst is an example of such an asynchronous implementation.

New in version 0.2.

Deprecated since version 1.12.

set_progress(progress)
Parameters:

progress (float) – the progress of the playback, between 0.0 and 1.0

Sets the playback progress of self. The progress is a normalized value between 0.0 (begin) and 1.0 (end).

New in version 1.0.

Deprecated since version 1.12.

set_subtitle_font_name(font_name)
Parameters:

font_name (str) – a font name, or None to set the default font name

Sets the font used by the subtitle renderer. The font_name string must be either None, which means that the default font name of the underlying implementation will be used; or must follow the grammar recognized by Pango.FontDescription.from_string() like:

clutter_media_set_subtitle_font_name (media, "Sans 24pt");

New in version 1.2.

Deprecated since version 1.12.

set_subtitle_uri(uri)
Parameters:

uri (str) – the URI of a subtitle file

Sets the location of a subtitle file to display while playing self.

New in version 1.2.

Deprecated since version 1.12.

set_uri(uri)
Parameters:

uri (str) – the URI of the media stream

Sets the URI of self to uri.

New in version 0.2.

Deprecated since version 1.12.

do_eos() virtual
do_error(error) virtual
Parameters:

error (GLib.Error) –

Signal Details

Clutter.Media.signals.eos(media)
Signal Name:

eos

Flags:

RUN_LAST

Parameters:

media (Clutter.Media) – The object which received the signal

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

New in version 0.2.

Deprecated since version 1.12.

Clutter.Media.signals.error(media, error)
Signal Name:

error

Flags:

RUN_LAST

Parameters:

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

New in version 0.2.

Deprecated since version 1.12.

Property Details

Clutter.Media.props.audio_volume
Name:

audio-volume

Type:

float

Default Value:

0.5

Flags:

DEPRECATED, READABLE, WRITABLE

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

New in version 1.0.

Deprecated since version 1.12.

Clutter.Media.props.buffer_fill
Name:

buffer-fill

Type:

float

Default Value:

0.0

Flags:

DEPRECATED, READABLE

The fill level of the buffer for the current stream, as a value between 0.0 and 1.0.

New in version 1.0.

Deprecated since version 1.12.

Clutter.Media.props.can_seek
Name:

can-seek

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE

Whether the current stream is seekable.

New in version 0.2.

Deprecated since version 1.12.

Clutter.Media.props.duration
Name:

duration

Type:

float

Default Value:

0.0

Flags:

READABLE

The duration of the current stream, in seconds

New in version 0.2.

Deprecated since version 1.12.

Clutter.Media.props.playing
Name:

playing

Type:

bool

Default Value:

False

Flags:

DEPRECATED, READABLE, WRITABLE

Whether the Clutter.Media actor is playing.

New in version 0.2.

Deprecated since version 1.12.

Clutter.Media.props.progress
Name:

progress

Type:

float

Default Value:

0.0

Flags:

DEPRECATED, READABLE, WRITABLE

The current progress of the playback, as a normalized value between 0.0 and 1.0.

New in version 1.0.

Deprecated since version 1.12.

Clutter.Media.props.subtitle_font_name
Name:

subtitle-font-name

Type:

str

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE

The font used to display subtitles. The font description has to follow the same grammar as the one recognized by Pango.FontDescription.from_string().

New in version 1.2.

Deprecated since version 1.12.

Clutter.Media.props.subtitle_uri
Name:

subtitle-uri

Type:

str

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE

The location of a subtitle file, expressed as a valid URI.

New in version 1.2.

Deprecated since version 1.12.

Clutter.Media.props.uri
Name:

uri

Type:

str

Default Value:

None

Flags:

DEPRECATED, READABLE, WRITABLE

The location of a media file, expressed as a valid URI.

New in version 0.2.

Deprecated since version 1.12.