Clutter Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Properties | Signals |
ClutterMedia; struct ClutterMediaIface; void clutter_media_set_uri (ClutterMedia *media
,const gchar *uri
); gchar * clutter_media_get_uri (ClutterMedia *media
); void clutter_media_set_playing (ClutterMedia *media
,gboolean playing
); gboolean clutter_media_get_playing (ClutterMedia *media
); void clutter_media_set_progress (ClutterMedia *media
,gdouble progress
); gdouble clutter_media_get_progress (ClutterMedia *media
); void clutter_media_set_subtitle_uri (ClutterMedia *media
,const gchar *uri
); gchar * clutter_media_get_subtitle_uri (ClutterMedia *media
); void clutter_media_set_subtitle_font_name (ClutterMedia *media
,const char *font_name
); gchar * clutter_media_get_subtitle_font_name (ClutterMedia *media
); void clutter_media_set_audio_volume (ClutterMedia *media
,gdouble volume
); gdouble clutter_media_get_audio_volume (ClutterMedia *media
); gboolean clutter_media_get_can_seek (ClutterMedia *media
); gdouble clutter_media_get_buffer_fill (ClutterMedia *media
); gdouble clutter_media_get_duration (ClutterMedia *media
); void clutter_media_set_filename (ClutterMedia *media
,const gchar *filename
);
"audio-volume" gdouble : Read / Write "buffer-fill" gdouble : Read "can-seek" gboolean : Read "duration" gdouble : Read "playing" gboolean : Read / Write "progress" gdouble : Read / Write "subtitle-font-name" gchar* : Read / Write "subtitle-uri" gchar* : Read / Write "uri" gchar* : Read / Write
ClutterMedia 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.
ClutterMedia is available since Clutter 0.2
ClutterMedia is deprecated since Clutter 1.12
typedef struct _ClutterMedia ClutterMedia;
ClutterMedia is an opaque structure whose members cannot be directly accessed
Since 0.2
struct ClutterMediaIface { /* signals */ void (* eos) (ClutterMedia *media); void (* error) (ClutterMedia *media, const GError *error); };
Interface vtable for ClutterMedia implementations
Since 0.2
void clutter_media_set_uri (ClutterMedia *media
,const gchar *uri
);
clutter_media_set_uri
is deprecated and should not be used in newly-written code. 1.12
Sets the URI of media
to uri
.
|
a ClutterMedia |
|
the URI of the media stream |
Since 0.2
gchar * clutter_media_get_uri (ClutterMedia *media
);
clutter_media_get_uri
is deprecated and should not be used in newly-written code. 1.12
Retrieves the URI from media
.
|
a ClutterMedia |
Returns : |
the URI of the media stream. Use g_free()
to free the returned string |
Since 0.2
void clutter_media_set_playing (ClutterMedia *media
,gboolean playing
);
clutter_media_set_playing
is deprecated and should not be used in newly-written code. 1.12
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.
|
a ClutterMedia |
|
TRUE to start playing |
Since 0.2
gboolean clutter_media_get_playing (ClutterMedia *media
);
clutter_media_get_playing
is deprecated and should not be used in newly-written code. 1.12
Retrieves the playing status of media
.
|
A ClutterMedia object |
Returns : |
TRUE if playing, FALSE if stopped. |
Since 0.2
void clutter_media_set_progress (ClutterMedia *media
,gdouble progress
);
clutter_media_set_progress
is deprecated and should not be used in newly-written code. 1.12
Sets the playback progress of media
. The progress
is
a normalized value between 0.0 (begin) and 1.0 (end).
|
a ClutterMedia |
|
the progress of the playback, between 0.0 and 1.0 |
Since 1.0
gdouble clutter_media_get_progress (ClutterMedia *media
);
clutter_media_get_progress
is deprecated and should not be used in newly-written code. 1.12
Retrieves the playback progress of media
.
|
a ClutterMedia |
Returns : |
the playback progress, between 0.0 and 1.0 |
Since 1.0
void clutter_media_set_subtitle_uri (ClutterMedia *media
,const gchar *uri
);
clutter_media_set_subtitle_uri
is deprecated and should not be used in newly-written code. 1.12
Sets the location of a subtitle file to display while playing media
.
|
a ClutterMedia |
|
the URI of a subtitle file |
Since 1.2
gchar * clutter_media_get_subtitle_uri (ClutterMedia *media
);
clutter_media_get_subtitle_uri
is deprecated and should not be used in newly-written code. 1.12
Retrieves the URI of the subtitle file in use.
|
a ClutterMedia |
Returns : |
the URI of the subtitle file. Use g_free()
to free the returned string |
Since 1.2
void clutter_media_set_subtitle_font_name (ClutterMedia *media
,const char *font_name
);
clutter_media_set_subtitle_font_name
is deprecated and should not be used in newly-written code. 1.12
Sets the font used by the subtitle renderer. The font_name
string must be
either NULL
, which means that the default font name of the underlying
implementation will be used; or must follow the grammar recognized by
pango_font_description_from_string()
like:
1 |
clutter_media_set_subtitle_font_name (media, "Sans 24pt"); |
|
a ClutterMedia |
|
a font name, or NULL to set the default font name |
Since 1.2
gchar * clutter_media_get_subtitle_font_name
(ClutterMedia *media
);
clutter_media_get_subtitle_font_name
is deprecated and should not be used in newly-written code. 1.12
Retrieves the font name currently used.
|
a ClutterMedia |
Returns : |
a string containing the font name. Use g_free()
to free the returned string |
Since 1.2
void clutter_media_set_audio_volume (ClutterMedia *media
,gdouble volume
);
clutter_media_set_audio_volume
is deprecated and should not be used in newly-written code. 1.12
Sets the playback volume of media
to volume
.
|
a ClutterMedia |
|
the volume as a double between 0.0 and 1.0 |
Since 1.0
gdouble clutter_media_get_audio_volume (ClutterMedia *media
);
clutter_media_get_audio_volume
is deprecated and should not be used in newly-written code. 1.12
Retrieves the playback volume of media
.
|
a ClutterMedia |
Returns : |
The playback volume between 0.0 and 1.0 |
Since 1.0
gboolean clutter_media_get_can_seek (ClutterMedia *media
);
clutter_media_get_can_seek
is deprecated and should not be used in newly-written code. 1.12
Retrieves whether media
is seekable or not.
|
a ClutterMedia |
Returns : |
TRUE if media can seek, FALSE otherwise. |
Since 0.2
gdouble clutter_media_get_buffer_fill (ClutterMedia *media
);
clutter_media_get_buffer_fill
is deprecated and should not be used in newly-written code. 1.12
Retrieves the amount of the stream that is buffered.
|
a ClutterMedia |
Returns : |
the fill level, between 0.0 and 1.0 |
Since 1.0
gdouble clutter_media_get_duration (ClutterMedia *media
);
clutter_media_get_duration
is deprecated and should not be used in newly-written code. 1.12
Retrieves the duration of the media stream that media
represents.
|
a ClutterMedia |
Returns : |
the duration of the media stream, in seconds |
Since 0.2
void clutter_media_set_filename (ClutterMedia *media
,const gchar *filename
);
clutter_media_set_filename
is deprecated and should not be used in newly-written code. 1.12
Sets the source of media
using a file path.
|
a ClutterMedia |
|
A filename |
Since 0.2
"audio-volume"
property "audio-volume" gdouble : Read / Write
ClutterMedia:audio-volume
is deprecated and should not be used in newly-written code. 1.12
The volume of the audio, as a normalized value between 0.0 and 1.0.
Allowed values: [0,1]
Default value: 0.5
Since 1.0
"buffer-fill"
property "buffer-fill" gdouble : Read
ClutterMedia:buffer-fill
is deprecated and should not be used in newly-written code. 1.12
The fill level of the buffer for the current stream, as a value between 0.0 and 1.0.
Allowed values: [0,1]
Default value: 0
Since 1.0
"can-seek"
property "can-seek" gboolean : Read
ClutterMedia:can-seek
is deprecated and should not be used in newly-written code. 1.12
Whether the current stream is seekable.
Default value: FALSE
Since 0.2
"duration"
property "duration" gdouble : Read
ClutterMedia:duration
is deprecated and should not be used in newly-written code. 1.12
The duration of the current stream, in seconds
Allowed values: >= 0
Default value: 0
Since 0.2
"playing"
property "playing" gboolean : Read / Write
ClutterMedia:playing
is deprecated and should not be used in newly-written code. 1.12
Whether the ClutterMedia actor is playing.
Default value: FALSE
Since 0.2
"progress"
property "progress" gdouble : Read / Write
ClutterMedia:progress
is deprecated and should not be used in newly-written code. 1.12
The current progress of the playback, as a normalized value between 0.0 and 1.0.
Allowed values: [0,1]
Default value: 0
Since 1.0
"subtitle-font-name"
property "subtitle-font-name" gchar* : Read / Write
ClutterMedia:subtitle-font-name
is deprecated and should not be used in newly-written code. 1.12
The font used to display subtitles. The font description has to
follow the same grammar as the one recognized by
pango_font_description_from_string()
.
Default value: NULL
Since 1.2
"subtitle-uri"
property "subtitle-uri" gchar* : Read / Write
ClutterMedia:subtitle-uri
is deprecated and should not be used in newly-written code. 1.12
The location of a subtitle file, expressed as a valid URI.
Default value: NULL
Since 1.2
"eos"
signalvoid user_function (ClutterMedia *media,
gpointer user_data) : Run Last
ClutterMedia::eos
is deprecated and should not be used in newly-written code. 1.12
The ::eos signal is emitted each time the media stream ends.
|
the ClutterMedia instance that received the signal |
|
user data set when the signal handler was connected. |
Since 0.2
"error"
signalvoid user_function (ClutterMedia *media,
GError *error,
gpointer user_data) : Run Last
ClutterMedia::error
is deprecated and should not be used in newly-written code. 1.12
The ::error signal is emitted each time an error occurred.
|
the ClutterMedia instance that received the signal |
|
the GError |
|
user data set when the signal handler was connected. |
Since 0.2