Next: , Previous: General, Up: Top


26 ClutterMedia

An interface for controlling playback of media data.

26.1 Overview

<clutter-media> is an interface for controlling playback of media data.

26.2 Usage

— Class: <clutter-media>

Derives from <ginterface>.

This class defines the following slots:

can-seek
TRUE if the current stream is seekable.
volume
The audio volume.
duration
The duration of the current stream in seconds.
buffer-percent
The percentage the current stream buffer is filled.
uri
The loaded URI.
playing
TRUE if playing.
position
The position in the current stream in seconds.
— Signal on <clutter-media>: eos

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

Since 0.2

— Signal on <clutter-media>: error (arg0 <gpointer>)

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

Since 0.2

— Function: clutter-media-set-uri (self <clutter-media>) (uri mchars)
— Method: set-uri

Sets the URI of media to uri.

media
<clutter-media> object
uri
URI
— Function: clutter-media-get-uri (self <clutter-media>)   (ret mchars)
— Method: get-uri

Retrieves the URI from media.

media
A <clutter-media> object
ret
The URI as a string.
— Function: clutter-media-set-playing (self <clutter-media>) (playing bool)
— Method: set-playing

Starts or stops media playing.

media
A <clutter-media> object
playing
TRUE to start playing, FALSE to stop.
— Function: clutter-media-get-playing (self <clutter-media>)   (ret bool)
— Method: get-playing

Retrieves the playing status of media.

media
A <clutter-media> object
ret
#t’ if playing, ‘#f’ if stopped.
— Function: clutter-media-set-position (self <clutter-media>) (position int)
— Method: set-position

Sets the playback position of media to position.

media
A <clutter-media> object
position
The desired position.
— Function: clutter-media-get-position (self <clutter-media>)   (ret int)
— Method: get-position

Retrieves the position of media.

media
A <clutter-media> object
ret
The playback position.
— Function: clutter-media-set-volume (self <clutter-media>) (volume double)
— Method: set-volume

Sets the playback volume of media to volume.

media
A <clutter-media> object
volume
The volume as a double between 0.0 and 1.0
— Function: clutter-media-get-volume (self <clutter-media>)   (ret double)
— Method: get-volume

Retrieves the playback volume of media.

media
A <clutter-media> object
ret
The playback volume between 0.0 and 1.0
— Function: clutter-media-get-can-seek (self <clutter-media>)   (ret bool)
— Method: get-can-seek

Retrieves whether media is seekable or not.

media
A <clutter-media> object
ret
#t’ if media can seek, ‘#f’ otherwise.
— Function: clutter-media-get-buffer-percent (self <clutter-media>)   (ret int)
— Method: get-buffer-percent

Retrieves the amount of the stream that is buffered.

media
A <clutter-media> object
ret
percentage value
— Function: clutter-media-get-duration (self <clutter-media>)   (ret int)
— Method: get-duration

Retrieves the duration of the media stream that media represents.

media
A <clutter-media> object
ret
The length of the media stream.
— Function: clutter-media-set-filename (self <clutter-media>) (filename mchars)
— Method: set-filename

Sets the filename of the media source.

media
A <clutter-media> object
filename
A filename to media file.