![]() |
![]() |
![]() |
Swfdec Reference Manual | ![]() |
---|---|---|---|---|
SwfdecGtkPlayerSwfdecGtkPlayer — an improved SwfdecPlayer |
SwfdecGtkPlayer; SwfdecPlayer* swfdec_gtk_player_new (SwfdecAsDebugger *debugger); SwfdecPlayer* swfdec_gtk_player_new_from_uri (const char *uri); gboolean swfdec_gtk_player_get_playing (SwfdecGtkPlayer *player); void swfdec_gtk_player_set_playing (SwfdecGtkPlayer *player, gboolean playing); double swfdec_gtk_player_get_speed (SwfdecGtkPlayer *player); void swfdec_gtk_player_set_speed (SwfdecGtkPlayer *player, double speed); gboolean swfdec_gtk_player_get_audio_enabled (SwfdecGtkPlayer *player); void swfdec_gtk_player_set_audio_enabled (SwfdecGtkPlayer *player, gboolean enabled);
"audio-enabled" gboolean : Read / Write "playing" gboolean : Read / Write "speed" gdouble : Read / Write
The SwfdecGtkPlayer adds common functionality to the rather barebones
SwfdecPlayer class, such as automatic playback and audio handling. Note
that by default, the player will be paused, so you need to call
swfdec_gtk_player_set_playing()
on the new player.
see_also
: SwfdecPlayer
typedef struct _SwfdecGtkPlayer SwfdecGtkPlayer;
The structure for the Swfdec Gtk player contains no public fields.
SwfdecPlayer* swfdec_gtk_player_new (SwfdecAsDebugger *debugger);
Creates a new Swfdec Gtk player.
This function calls swfdec_init()
for you if it wasn't called before.
debugger : |
NULL or a SwfdecAsDebugger to debug this player
|
Returns : | The new player |
SwfdecPlayer* swfdec_gtk_player_new_from_uri (const char *uri);
Create a player to play back the given URI. If compiled with gnome-vfs
support, it will use gnome-vfs to resolve the given URI. Note that there
is no way to figure out if the referenced URI really references a file that
Swfdec can play back. If you need this, you should use SwfdecGtkLoader
directly and use its error property.
This function calls swfdec_init()
for you if it wasn't called before.
uri : |
URI to play |
Returns : | a new player. |
gboolean swfdec_gtk_player_get_playing (SwfdecGtkPlayer *player);
Queries if the player is playing.
player : |
a SwfdecGtkPlayer |
Returns : | TRUE if the player is playing
|
void swfdec_gtk_player_set_playing (SwfdecGtkPlayer *player, gboolean playing);
Sets if player
should be playing or not. If the player is playing, a timer
will be attached to the default main loop that periodically calls
swfdec_player_advance()
.
player : |
a SwfdecGtkPlayer |
playing : |
if the player should play or not |
double swfdec_gtk_player_get_speed (SwfdecGtkPlayer *player);
Queries the current playback speed. If the player is currently paused, it will report the speed that it would use if playing.
player : |
a SwfdecGtkPlayer |
Returns : | the current playback speed. |
void swfdec_gtk_player_set_speed (SwfdecGtkPlayer *player, double speed);
Sets the new playback speed. 1.0 means the default speed, bigger values make playback happen faster. Audio will only play back if the speed is 1.0. Note that if the player is not playing when calling this function, it will not automatically start.
player : |
a SwfdecGtkPlayer |
speed : |
the new playback speed |
gboolean swfdec_gtk_player_get_audio_enabled (SwfdecGtkPlayer *player);
Queries if audio playback for player
is enabled or not.
player : |
a SwfdecGtkPlayer |
Returns : | TRUE if audio playback is enabled
|
void swfdec_gtk_player_set_audio_enabled (SwfdecGtkPlayer *player, gboolean enabled);
Enables or disables automatic audio playback.
player : |
a SwfdecGtkPlayer |
enabled : |
TRUE to enable audio
|