Class
ClapperPlayer
Description [src]
final class Clapper.Player : Clapper.ThreadedObject
{
/* No available fields */
}
The media player object used for playback.
ClapperPlayer
was written in an easy to use way, so no special GStreamer
experience is needed to get started with making various playback applications.
Scheduling media for playback is done using a ClapperQueue
upon which
player operates.
Player uses GStreamer
internally and handles playback on a separate thread, while
serializing all events/commands between player and the thread it was created upon
(usually main app thread). This makes it very easy to integrate with UI toolkits
that operate on a single thread like (but not limited to) GTK.
To listen for property changes, you can connect to property “notify” signal.
Instance methods
clapper_player_get_download_dir
Get path to a directory set for media downloads.
unstable since: 0.8
clapper_player_get_download_enabled
Get whether progressive download buffering is enabled.
unstable since: 0.8
clapper_player_get_subtitle_font_desc
Get the currently set font description used for subtitle stream rendering.
clapper_player_set_download_dir
Set a directory that player
will use to store downloads.
unstable since: 0.8
clapper_player_set_download_enabled
Set whether player should attempt progressive download buffering.
unstable since: 0.8
clapper_player_set_subtitle_font_desc
Set Pango font description to be used for subtitle stream rendering.
clapper_player_set_subtitle_offset
Set synchronisation offset between the subtitle stream and video.
Methods inherited from ClapperThreadedObject (1)
Properties
Clapper.Player:download-dir
A directory that player
will use to download network content
when ClapperPlayer:download-enabled
is set to TRUE
.
unstable since: 0.8
Clapper.Player:download-enabled
Whether progressive download buffering is enabled.
unstable since: 0.8
Properties inherited from GstObject (2)
Gst.Object:name
Gst.Object:parent
The parent of the object. Please note, that when changing the ‘parent’
property, we don’t emit GObject::notify
and GstObject::deep-notify
signals due to locking issues. In some cases one can use
GstBin::element-added
or GstBin::element-removed
signals on the parent to
achieve a similar effect.
Signals
Clapper.Player::download-complete
Media was fully downloaded to local cache directory. This signal will
be only emitted when progressive download buffering is enabled by
setting ClapperPlayer:download-enabled
property to TRUE
.
unstable since: 0.8
Clapper.Player::error
These are normal error messages. Upon emitting this signal, playback will stop due to the error.
Clapper.Player::missing-plugin
A GStreamer
plugin or one of its features needed for playback is missing.
Clapper.Player::seek-done
A seeking operation has finished. Player is now at playback position after seek.
Clapper.Player::warning
These are some usually more minor error messages that should be treated like warnings. Should not generally prevent/stop playback.
Signals inherited from GstObject (1)
GstObject::deep-notify
The deep notify signal is used to be notified of property changes. It is typically attached to the toplevel bin to receive notifications from all the elements contained in that bin.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.