| Top |
| char * | current-content-type | Read |
| char * | current-display-name | Read |
| char * | current-mrl | Read |
| gint64 | current-time | Read |
| gboolean | fullscreen | Read |
| char * | main-page | Read |
| gboolean | playing | Read |
| gboolean | seekable | Read |
| gint64 | stream-length | Read |
| void | file-closed | Run Last |
| void | file-has-played | Run Last |
| void | file-opened | Run Last |
| char* | get-text-subtitle | Run Last |
| char* | get-user-agent | Run Last |
| void | metadata-updated | Run Last |
| typedef | Totem |
| TotemObject | |
| enum | TotemRemoteCommand |
| enum | TotemRemoteSetting |
| #define | TOTEM_GSETTINGS_SCHEMA |
TotemObject is the core object of Totem; a singleton which controls all Totem's main functions.
void totem_object_show_error (TotemObject *totem,const char *title,const char *reason);
Displays a non-blocking error dialog with the
given title
and reason
.
void
totem_object_play (TotemObject *totem);
Plays the current stream. If Totem is already playing, it continues to play. If the stream cannot be played, and error dialog is displayed.
void
totem_object_play_pause (TotemObject *totem);
Gets the current MRL from the playlist and attempts to play it. If the stream is already playing, playback is paused.
void
totem_object_stop (TotemObject *totem);
Stops playback, and sets the playlist back at the start.
void
totem_object_seek_next (TotemObject *totem);
If a DVD is being played, goes to the next chapter. If a normal stream is being played, plays the next entry in the playlist.
void
totem_object_seek_previous (TotemObject *totem);
If a DVD is being played, goes to the previous chapter. If a normal stream is being played, goes to the start of the stream if possible. If seeking is not possible, plays the previous entry in the playlist.
gboolean
totem_object_can_seek_next (TotemObject *totem);
Returns true if totem_object_seek_next() would have an effect.
gboolean
totem_object_can_seek_previous (TotemObject *totem);
Returns true if totem_object_seek_previous() would have an effect.
gboolean totem_object_remote_get_setting (TotemObject *totem,TotemRemoteSetting setting);
Returns the value of setting
for this instance of Totem.
void totem_object_remote_set_setting (TotemObject *totem,TotemRemoteSetting setting,gboolean value);
Sets setting
to value
on this instance of Totem.
void totem_object_seek_time (TotemObject *totem,gint64 msec,gboolean accurate);
Seeks to an absolute time in the stream, or displays an error dialog if that's not possible.
void totem_object_seek_relative (TotemObject *totem,gint64 offset,gboolean accurate);
Seeks to an offset
from the current position in the stream,
or displays an error dialog if that's not possible.
void totem_object_set_volume (TotemObject *totem,double volume);
Sets the volume, with 1.0 being the maximum, and 0.0 being the minimum level.
void totem_object_remote_command (TotemObject *totem,TotemRemoteCommand cmd,const char *url);
Executes the specified cmd
on this instance of Totem. If cmd
is an operation requiring an MRL, url
is required; it can be NULL
otherwise.
If Totem's fullscreened and the operation is executed correctly, the controls will appear as if the user had moved the mouse.
gboolean
totem_object_is_playing (TotemObject *totem);
Returns TRUE if Totem is playing a stream.
gboolean
totem_object_is_paused (TotemObject *totem);
Returns TRUE if playback is paused.
gboolean
totem_object_is_seekable (TotemObject *totem);
Returns TRUE if the current stream is seekable.
GtkWindow *
totem_object_get_main_window (TotemObject *totem);
Gets Totem's main window and increments its reference count.
char *
totem_object_get_current_mrl (TotemObject *totem);
Get the MRL of the current stream, or NULL if nothing's playing.
Free with g_free().
GtkWidget *
totem_object_get_video_widget (TotemObject *totem);
Gets Totem's video widget and increments its reference count.
void totem_object_set_current_subtitle (TotemObject *totem,const char *subtitle_uri);
Add the subtitle_uri
subtitle file to the playlist, setting it as the subtitle for the current
playlist entry.
guint
totem_object_get_playlist_length (TotemObject *totem);
Returns the length of the current playlist.
int
totem_object_get_playlist_pos (TotemObject *totem);
Returns the 0-based index of the current entry in the playlist. If
there is no current entry in the playlist, -1 is returned.
char * totem_object_get_title_at_playlist_pos (TotemObject *totem,guint playlist_index);
Gets the title of the playlist entry at index
.
double
totem_object_get_volume (TotemObject *totem);
Gets the current volume level, as a value between 0.0 and 1.0.
const gchar * const *
totem_object_get_supported_content_types
(void);
Get the full list of file content types which Totem supports playing.
a NULL-terminated array of the content types Totem supports.
[array zero-terminated=1][transfer none]
Since: 3.1.5
const gchar * const *
totem_object_get_supported_uri_schemes
(void);
Get the full list of URI schemes which Totem supports accessing.
a NULL-terminated array of the URI schemes Totem supports.
[array zero-terminated=1][transfer none]
Since: 3.1.5
float
totem_object_get_rate (TotemObject *totem);
Gets the current playback rate, with 1.0 being the normal playback rate.
gboolean totem_object_set_rate (TotemObject *totem,float rate);
Sets the playback rate, with 1.0 being the normal playback rate.
void totem_object_add_to_playlist (TotemObject *totem,const char *uri,const char *display_name,gboolean play);
Add uri
to the playlist and play it immediately.
void totem_object_add_to_view (TotemObject *totem,GFile *file,const char *title);
Adds a local media file to the main view.
void
totem_object_clear_playlist (TotemObject *totem);
Empties the current playlist.
void totem_object_empty_menu_section (TotemObject *totem,const char *id);
Empty the GMenu section pointed to by id
, and remove any
related actions. Note that menu items with specific target
will not have the associated action removed.
gint64
totem_object_get_current_time (TotemObject *totem);
Gets the current position's time in the stream as a gint64.
GMenu * totem_object_get_menu_section (TotemObject *totem,const char *id);
Get the GMenu of the given id
from the main Totem GtkBuilder file.
char *
totem_object_get_short_title (TotemObject *totem);
Gets the title of the current entry in the playlist.
gboolean
totem_object_is_fullscreen (TotemObject *totem);
Returns TRUE if Totem is fullscreened.
void
totem_object_next_angle (TotemObject *totem);
Switches to the next angle, if watching a DVD. If not watching a DVD, this is a no-op.
void
totem_object_pause (TotemObject *totem);
Pauses the current stream. If Totem is already paused, it continues to be paused.
typedef struct _TotemObject Totem;
The Totem object is a handy synonym for TotemObject, and the two can be used interchangably.
typedef struct _TotemObject TotemObject;
All the fields in the TotemObject structure are private and should never be accessed directly.
Represents a command which can be sent to a running Totem instance remotely.
|
unknown command |
||
|
play the current stream |
||
|
pause the current stream |
||
|
stop playing the current stream |
||
|
toggle play/pause on the current stream |
||
|
play the next playlist item |
||
|
play the previous playlist item |
||
|
seek forwards in the current stream |
||
|
seek backwards in the current stream |
||
|
increase the volume |
||
|
decrease the volume |
||
|
toggle fullscreen mode |
||
|
quit the instance of Totem |
||
|
enqueue a new playlist item |
||
|
replace an item in the playlist |
||
|
show the Totem instance |
||
|
go up (DVD controls) |
||
|
go down (DVD controls) |
||
|
go left (DVD controls) |
||
|
go right (DVD controls) |
||
|
select the current item (DVD controls) |
||
|
go to the DVD menu |
||
|
increase the zoom level |
||
|
decrease the zoom level |
||
|
eject the current disc |
||
|
play a DVD in a drive |
||
|
toggle mute |
||
|
toggle the aspect ratio |
“current-content-type” property “current-content-type” char *
The content-type of the current stream.
Owner: TotemObject
Flags: Read
Default value: NULL
“current-display-name” property “current-display-name” char *
The display name of the current stream.
Owner: TotemObject
Flags: Read
Default value: NULL
“current-mrl” property “current-mrl” char *
The MRL of the current stream.
Owner: TotemObject
Flags: Read
Default value: NULL
“current-time” property“current-time” gint64
The player's position (time) in the current stream, in milliseconds.
Owner: TotemObject
Flags: Read
Default value: 0
“fullscreen” property“fullscreen” gboolean
If TRUE, Totem is in fullscreen mode.
Owner: TotemObject
Flags: Read
Default value: FALSE
“main-page” property “main-page” char *
The name of the current main page (usually "grilo", or "player").
Owner: TotemObject
Flags: Read
Default value: NULL
“playing” property“playing” gboolean
If TRUE, Totem is playing an audio or video file.
Owner: TotemObject
Flags: Read
Default value: FALSE
“seekable” property“seekable” gboolean
If TRUE, the current stream is seekable.
Owner: TotemObject
Flags: Read
Default value: FALSE
“stream-length” property“stream-length” gint64
The length of the current stream, in milliseconds.
Owner: TotemObject
Flags: Read
Default value: 0
“file-closed” signalvoid user_function (TotemObject *totem, gpointer user_data)
The “file-closed” signal is emitted when Totem closes a stream.
totem |
the TotemObject which received the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“file-has-played” signalvoid user_function (TotemObject *totem, char *mrl, gpointer user_data)
The “file-has-played” signal is emitted when a new stream has started playing in Totem.
totem |
the TotemObject which received the signal |
|
mrl |
the MRL of the opened stream |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“file-opened” signalvoid user_function (TotemObject *totem, char *mrl, gpointer user_data)
The “file-opened” signal is emitted when a new stream is opened by Totem.
totem |
the TotemObject which received the signal |
|
mrl |
the MRL of the opened stream |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“get-text-subtitle” signalchar* user_function (TotemObject *totem, char *mrl, gpointer user_data)
The “get-text-subtitle” signal is emitted before opening a stream, so that plugins have the opportunity to detect or download text subtitles for the stream if necessary.
totem |
the TotemObject which received the signal |
|
mrl |
the MRL of the opened stream |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“get-user-agent” signalchar* user_function (TotemObject *totem, char *mrl, gpointer user_data)
The “get-user-agent” signal is emitted before opening a stream, so that plugins have the opportunity to return the user-agent to be set.
totem |
the TotemObject which received the signal |
|
mrl |
the MRL of the opened stream |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
“metadata-updated” signalvoid user_function (TotemObject *totem, char *artist, char *title, char *album, guint track_number, gpointer user_data)
The “metadata-updated” signal is emitted when the metadata of a stream is updated, typically when it's being loaded.
totem |
the TotemObject which received the signal |
|
artist |
the name of the artist, or |
|
title |
the stream title, or |
|
album |
the name of the stream's album, or |
|
track_number |
the stream's track number |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last