Next: , Previous: General, Up: Top


45 ClutterMedia

An interface for controlling playback of media data

45.1 Overview

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

Clutter core does not provide an implementation of this interface, but other integration libraries like Clutter-GStreamer implement it to offer a uniform API for applications.

<clutter-media> is available since Clutter 0.2

45.2 Usage

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

Sets the URI of media to uri.

media
a <clutter-media>
uri
the URI of the media stream

Since 0.2

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

Retrieves the URI from media.

media
a <clutter-media>
ret
the URI of the media stream. Use g-free to free the returned string

Since 0.2

— Function: clutter-media-set-playing (self <clutter-media>) (playing bool)
— Method: set-playing

Starts or stops playing of media. The implementation might be asynchronous, so the way to know whether the actual playing state of the media is to use the <"notify"> signal on the <"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.

media
a <clutter-media>
playing
#t’ to start playing

Since 0.2

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

Since 0.2

— Function: clutter-media-set-progress (self <clutter-media>) (progress double)
— Method: set-progress

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

media
a <clutter-media>
progress
the progress of the playback, between 0.0 and 1.0

Since 1.0

— Function: clutter-media-get-progress (self <clutter-media>) ⇒  (ret double)
— Method: get-progress

Retrieves the playback progress of media.

media
a <clutter-media>
ret
the playback progress, between 0.0 and 1.0

Since 1.0

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

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

media
a <clutter-media>
uri
the URI of a subtitle file

Since 1.2

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

Retrieves the URI of the subtitle file in use.

media
a <clutter-media>
ret
the URI of the subtitle file. Use g-free to free the returned string

Since 1.2

— Function: clutter-media-set-audio-volume (self <clutter-media>) (volume double)
— Method: set-audio-volume

Sets the playback volume of media to volume.

media
a <clutter-media>
volume
the volume as a double between 0.0 and 1.0

Since 1.0

— Function: clutter-media-get-audio-volume (self <clutter-media>) ⇒  (ret double)
— Method: get-audio-volume

Retrieves the playback volume of media.

media
a <clutter-media>
ret
The playback volume between 0.0 and 1.0

Since 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>
ret
#t’ if media can seek, ‘#f’ otherwise.

Since 0.2

— Function: clutter-media-get-buffer-fill (self <clutter-media>) ⇒  (ret double)
— Method: get-buffer-fill

Retrieves the amount of the stream that is buffered.

media
a <clutter-media>
ret
the fill level, between 0.0 and 1.0

Since 1.0

— Function: clutter-media-get-duration (self <clutter-media>) ⇒  (ret double)
— Method: get-duration

Retrieves the duration of the media stream that media represents.

media
a <clutter-media>
ret
the duration of the media stream, in seconds

Since 0.2

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

Sets the source of media using a file path.

media
a <clutter-media>
filename
A filename

Since 0.2