Top |
ClutterGstPlaybackClutterGstPlayback — A ClutterGstPlayback to play media streams |
gint | audio-stream | Read / Write |
gpointer | audio-streams | Read |
gdouble | buffer-fill | Read |
gboolean | can-seek | Read |
gdouble | duration | Read |
gboolean | in-seek | Read |
gdouble | progress | Read / Write |
ClutterGstSeekFlags | seek-flags | Read / Write |
gchar * | subtitle-font-name | Read / Write |
gint | subtitle-track | Read / Write |
gpointer | subtitle-tracks | Read |
gchar * | subtitle-uri | Read / Write |
gchar * | uri | Read / Write |
gchar * | user-agent | Read / Write |
gint
clutter_gst_playback_get_audio_stream (ClutterGstPlayback *self
);
Get the current audio stream. The number returned in the index of the
audio stream playing in the list returned by
clutter_gst_playback_get_audio_streams()
.
Since: 1.4
GList *
clutter_gst_playback_get_audio_streams
(ClutterGstPlayback *self
);
Get the list of audio streams of the current media.
a list of strings describing the available audio streams.
[transfer none][element-type utf8]
Since: 1.4
gint64
clutter_gst_playback_get_buffer_duration
(ClutterGstPlayback *self
);
Retrieves the buffer duration when buffering network streams.
gdouble
clutter_gst_playback_get_buffer_fill (ClutterGstPlayback *self
);
Retrieves the amount of the stream that is buffered.
ClutterGstBufferingMode
clutter_gst_playback_get_buffering_mode
(ClutterGstPlayback *self
);
Since: 1.4
gint
clutter_gst_playback_get_buffer_size (ClutterGstPlayback *self
);
Retrieves the buffer size when buffering network streams.
gdouble
clutter_gst_playback_get_duration (ClutterGstPlayback *self
);
Retrieves the duration of the media stream that self
represents.
gboolean
clutter_gst_playback_get_in_seek (ClutterGstPlayback *self
);
Whether the player is seeking.
Since: 1.6
gdouble
clutter_gst_playback_get_position (ClutterGstPlayback *self
);
Retrieves the position in the media stream that self
represents.
gdouble
clutter_gst_playback_get_progress (ClutterGstPlayback *self
);
Retrieves the playback progress of self
.
ClutterGstSeekFlags
clutter_gst_playback_get_seek_flags (ClutterGstPlayback *self
);
Get the current value of the seek-flags property.
Since: 1.4
gchar *
clutter_gst_playback_get_subtitle_font_name
(ClutterGstPlayback *self
);
Retrieves the font name currently used.
gint
clutter_gst_playback_get_subtitle_track
(ClutterGstPlayback *self
);
Get the current subtitles track. The number returned is the index of the
subtiles track in the list returned by
clutter_gst_playback_get_subtitle_tracks()
.
the index of the current subtitlest track, -1 if the media has no subtitles track or if the subtitles have been turned off
Since: 1.4
GList *
clutter_gst_playback_get_subtitle_tracks
(ClutterGstPlayback *self
);
Get the list of subtitles tracks of the current media.
a list of strings describing the available subtitles tracks.
[transfer none][element-type utf8]
Since: 1.4
gchar *
clutter_gst_playback_get_subtitle_uri (ClutterGstPlayback *self
);
Retrieves the URI of the subtitle file in use.
gchar *
clutter_gst_playback_get_uri (ClutterGstPlayback *self
);
Retrieves the URI from self
.
gchar *
clutter_gst_playback_get_user_agent (ClutterGstPlayback *self
);
Retrieves the user agent used when streaming.
Since: 1.4
gboolean
clutter_gst_playback_is_live_media (ClutterGstPlayback *self
);
Whether the player is using a live media.
void clutter_gst_playback_set_audio_stream (ClutterGstPlayback *self
,gint index_
);
Set the audio stream to play. index_
is the index of the stream
in the list returned by clutter_gst_playback_get_audio_streams()
.
Since: 1.4
void clutter_gst_playback_set_buffer_duration (ClutterGstPlayback *self
,gint64 duration
);
Sets the buffer duration to be used when buffering network streams.
void clutter_gst_playback_set_buffering_mode (ClutterGstPlayback *self
,ClutterGstBufferingMode mode
);
Since: 1.4
void clutter_gst_playback_set_buffer_size (ClutterGstPlayback *self
,gint size
);
Sets the buffer size to be used when buffering network streams.
void clutter_gst_playback_set_filename (ClutterGstPlayback *self
,const gchar *filename
);
Sets the source of self
using a file path.
void clutter_gst_playback_set_progress (ClutterGstPlayback *self
,gdouble progress
);
Sets the playback progress of self
. The progress
is
a normalized value between 0.0 (begin) and 1.0 (end).
void clutter_gst_playback_set_seek_flags (ClutterGstPlayback *self
,ClutterGstSeekFlags flags
);
Seeking can be done with several trade-offs. Clutter-gst defaults
to CLUTTER_GST_SEEK_FLAG_NONE
.
Since: 1.4
void clutter_gst_playback_set_subtitle_font_name (ClutterGstPlayback *self
,const char *font_name
);
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:
clutter_gst_playback_set_subtitle_font_name (player, "Sans 24pt");
void clutter_gst_playback_set_subtitle_track (ClutterGstPlayback *self
,gint index_
);
Set the subtitles track to play. index_
is the index of the stream
in the list returned by clutter_gst_playback_get_subtitle_tracks()
.
If index_
is -1, the subtitles are turned off.
Since: 1.4
void clutter_gst_playback_set_subtitle_uri (ClutterGstPlayback *self
,const gchar *uri
);
Sets the location of a subtitle file to display while playing self
.
void clutter_gst_playback_set_uri (ClutterGstPlayback *self
,const gchar *uri
);
Sets the URI of self
to uri
.
void clutter_gst_playback_set_user_agent (ClutterGstPlayback *self
,const gchar *user_agent
);
Sets the user agent to use when streaming.
When streaming content, you might want to set a custom user agent, eg. to promote your software, make it appear in statistics or because the server requires a special user agent you want to impersonate.
Since: 1.4
struct ClutterGstPlayback;
Implementation of ClutterGstPlayback that displays media streams using GStreamer.
The ClutterGstPlayback structure contains only private data and should not be accessed directly.
struct ClutterGstPlaybackClass { /* signals */ gboolean (* should_buffer) (ClutterGstPlayback *self, GstQuery *query); };
Base class for ClutterGstPlayback.
“audio-stream”
property “audio-stream” gint
Index of the current audio stream.
Flags: Read / Write
Allowed values: >= -1
Default value: -1
Since: 1.4
“audio-streams”
property “audio-streams” gpointer
List of audio streams available on the current media.
Flags: Read
Since: 1.4
“buffer-fill”
property “buffer-fill” gdouble
The fill level of the buffer for the current stream, as a value between 0.0 and 1.0.
Flags: Read
Allowed values: [0,1]
Default value: 0
“can-seek”
property “can-seek” gboolean
Whether the current stream is seekable.
Flags: Read
Default value: FALSE
“duration”
property “duration” gdouble
The duration of the current stream, in seconds
Flags: Read
Allowed values: >= 0
Default value: 0
“in-seek”
property “in-seek” gboolean
Whether or not the stream is being seeked.
Flags: Read
Default value: FALSE
Since: 1.6
“progress”
property “progress” gdouble
The current progress of the playback, as a normalized value between 0.0 and 1.0.
Flags: Read / Write
Allowed values: [0,1]
Default value: 0
“seek-flags”
property“seek-flags” ClutterGstSeekFlags
Flags to use when seeking.
Flags: Read / Write
Since: 1.4
“subtitle-font-name”
property “subtitle-font-name” gchar *
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()
.
Flags: Read / Write
Default value: NULL
“subtitle-track”
property “subtitle-track” gint
Current subtitle track being displayed.
Flags: Read / Write
Allowed values: >= -1
Default value: -1
Since: 1.4
“subtitle-tracks”
property “subtitle-tracks” gpointer
List of subtitle tracks available.
Flags: Read
Since: 1.4
“subtitle-uri”
property “subtitle-uri” gchar *
The location of a subtitle file, expressed as a valid URI.
Flags: Read / Write
Default value: NULL
“uri”
property “uri” gchar *
The location of a media file, expressed as a valid URI.
Flags: Read / Write
Default value: NULL
“user-agent”
property “user-agent” gchar *
The User Agent used by ClutterGstPlayback with network protocols.
Flags: Read / Write
Default value: NULL
Since: 1.4
“should-buffer”
signalgboolean user_function (ClutterGstPlayback *player, GstQuery *query, gpointer user_data)
The ::should-buffer signal is emitted every time the base class needs to decide whether it should continue buffering in download-buffering mode.
player |
the ClutterGstPlayback instance that received the signal |
|
query |
A gst buffering query of format bytes |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.4