ClutterGst.Playback¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Index of the current audio stream |
||
r |
List of the audio streams of the media |
||
r |
The fill level of the buffer |
||
r |
Whether the current stream is seekable |
||
r |
The duration of the stream, in seconds |
||
r |
If currently seeking |
||
r/w |
Current progress of the playback |
||
r/w |
Flags to use when seeking |
||
r/w |
The font used to display subtitles |
||
r/w |
Index of the current subtitles track |
||
r |
List of the subtitles tracks of the media |
||
r/w |
URI of a subtitle file |
||
r/w |
URI of a media file |
||
r/w |
User Agent used with network protocols |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
The |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class ClutterGst.Playback(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Implementation of
ClutterGst.Playback
that displays media streams using GStreamer.The
ClutterGst.Playback
structure contains only private data and should not be accessed directly.- classmethod new()¶
- Return type:
- get_audio_stream()¶
- Returns:
the index of the current audio stream, -1 if the media has no audio stream
- Return type:
Get the current audio stream. The number returned in the index of the audio stream playing in the list returned by
ClutterGst.Playback.get_audio_streams
().New in version 1.4.
- get_audio_streams()¶
- Returns:
a list of strings describing the available audio streams
- Return type:
[
str
]
Get the list of audio streams of the current media.
New in version 1.4.
- get_buffer_duration()¶
- Returns:
The buffer duration
- Return type:
Retrieves the buffer duration when buffering network streams.
- get_buffer_fill()¶
- Returns:
the fill level, between 0.0 and 1.0
- Return type:
Retrieves the amount of the stream that is buffered.
- get_buffer_size()¶
- Returns:
The buffer size
- Return type:
Retrieves the buffer size when buffering network streams.
- get_buffering_mode()¶
- Returns:
- Return type:
New in version 1.4.
- get_duration()¶
- Returns:
the duration of the media stream, in seconds
- Return type:
Retrieves the duration of the media stream that self represents.
- get_in_seek()¶
-
Whether the player is seeking.
New in version 1.6.
- get_position()¶
- Returns:
the position in the media stream, in seconds
- Return type:
Retrieves the position in the media stream that self represents.
- get_progress()¶
- Returns:
the playback progress, between 0.0 and 1.0
- Return type:
Retrieves the playback progress of self.
- get_seek_flags()¶
- Returns:
a combination of
ClutterGst.SeekFlags
- Return type:
Get the current value of the seek-flags property.
New in version 1.4.
- get_subtitle_font_name()¶
- Returns:
a string containing the font name. Use
GLib.free
() to free the returned string- Return type:
Retrieves the font name currently used.
- get_subtitle_track()¶
- Returns:
the index of the current subtitlest track, -1 if the media has no subtitles track or if the subtitles have been turned off
- Return type:
Get the current subtitles track. The number returned is the index of the subtiles track in the list returned by
ClutterGst.Playback.get_subtitle_tracks
().New in version 1.4.
- get_subtitle_tracks()¶
- Returns:
a list of strings describing the available subtitles tracks
- Return type:
[
str
]
Get the list of subtitles tracks of the current media.
New in version 1.4.
- get_subtitle_uri()¶
-
Retrieves the URI of the subtitle file in use.
- get_uri()¶
-
Retrieves the URI from self.
- get_user_agent()¶
-
Retrieves the user agent used when streaming.
New in version 1.4.
- is_live_media()¶
-
Whether the player is using a live media.
- set_audio_stream(index_)¶
- Parameters:
index (
int
) – the index of the audio stream
Set the audio stream to play. index_ is the index of the stream in the list returned by
ClutterGst.Playback.get_audio_streams
().New in version 1.4.
- set_buffer_duration(duration)¶
- Parameters:
duration (
int
) – The new duration
Sets the buffer duration to be used when buffering network streams.
- set_buffer_size(size)¶
- Parameters:
size (
int
) – The new size
Sets the buffer size to be used when buffering network streams.
- set_buffering_mode(mode)¶
- Parameters:
mode (
ClutterGst.BufferingMode
) – aClutterGst.BufferingMode
New in version 1.4.
- set_filename(filename)¶
- Parameters:
filename (
str
) – A filename
Sets the source of self using a file path.
- 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).
- set_seek_flags(flags)¶
- Parameters:
flags (
ClutterGst.SeekFlags
) – a combination ofClutterGst.SeekFlags
Seeking can be done with several trade-offs. Clutter-gst defaults to
ClutterGst.SeekFlags.NONE
.New in version 1.4.
- set_subtitle_font_name(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 byPango.FontDescription.from_string
() like:clutter_gst_playback_set_subtitle_font_name (player, "Sans 24pt");
- set_subtitle_track(index_)¶
- Parameters:
index (
int
) – the index of the subtitles track
Set the subtitles track to play. index_ is the index of the stream in the list returned by
ClutterGst.Playback.get_subtitle_tracks
().If index_ is -1, the subtitles are turned off.
New in version 1.4.
- 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.
- set_user_agent(user_agent)¶
- Parameters:
user_agent (
str
) – the 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.
New in version 1.4.
Signal Details¶
- ClutterGst.Playback.signals.should_buffer(playback, query)¶
- Signal Name:
should-buffer
- Flags:
- Parameters:
playback (
ClutterGst.Playback
) – The object which received the signalquery (
Gst.Query
) – A gst buffering query of format bytes
- Return type:
The
::should-buffer
signal is emitted every time the base class needs to decide whether it should continue buffering in download-buffering mode.New in version 1.4.
Property Details¶
- ClutterGst.Playback.props.audio_stream¶
-
Index of the current audio stream.
New in version 1.4.
- ClutterGst.Playback.props.audio_streams¶
-
List of audio streams available on the current media.
New in version 1.4.
- ClutterGst.Playback.props.buffer_fill¶
-
The fill level of the buffer for the current stream, as a value between 0.0 and 1.0.
- ClutterGst.Playback.props.can_seek¶
-
Whether the current stream is seekable.
- ClutterGst.Playback.props.duration¶
-
The duration of the current stream, in seconds
- ClutterGst.Playback.props.in_seek¶
-
Whether or not the stream is being seeked.
New in version 1.6.
- ClutterGst.Playback.props.progress¶
-
The current progress of the playback, as a normalized value between 0.0 and 1.0.
- ClutterGst.Playback.props.seek_flags¶
- Name:
seek-flags
- Type:
- Default Value:
- Flags:
Flags to use when seeking.
New in version 1.4.
- ClutterGst.Playback.props.subtitle_font_name¶
-
The font used to display subtitles. The font description has to follow the same grammar as the one recognized by
Pango.FontDescription.from_string
().
- ClutterGst.Playback.props.subtitle_track¶
-
Current subtitle track being displayed.
New in version 1.4.
- ClutterGst.Playback.props.subtitle_tracks¶
-
List of subtitle tracks available.
New in version 1.4.
- ClutterGst.Playback.props.subtitle_uri¶
-
The location of a subtitle file, expressed as a valid URI.
- ClutterGst.Playback.props.uri¶
-
The location of a media file, expressed as a valid URI.