ParoleProviderPlayer

ParoleProviderPlayer — The interface of the player.

Synopsis

struct              ParoleProviderPlayerIface;
                    ParoleProviderPlayer;
enum                ParolePluginContainer;
enum                ParoleState;
void                parole_provider_player_pack         (ParoleProviderPlayer *player,
                                                         GtkWidget *widget,
                                                         const gchar *title,
                                                         ParolePluginContainer container);
GSimpleAction *     parole_provider_player_get_action   (ParoleProviderPlayer *player,
                                                         ParolePlayerAction action);
gboolean            parole_provider_player_set_fullscreen
                                                        (ParoleProviderPlayer *player,
                                                         gboolean fullscreen);
gboolean            parole_provider_player_get_fullscreen
                                                        (ParoleProviderPlayer *player);
void                parole_stream_set_image             (GObject *object,
                                                         GdkPixbuf *pixbuf);
GdkPixbuf *         parole_stream_get_image             (GObject *object);
ParoleState         parole_provider_player_get_state    (ParoleProviderPlayer *player);
gdouble             parole_provider_player_get_stream_position
                                                        (ParoleProviderPlayer *player);
gboolean            parole_provider_player_play_uri     (ParoleProviderPlayer *player,
                                                         const gchar *uri);
gboolean            parole_provider_player_pause        (ParoleProviderPlayer *player);
gboolean            parole_provider_player_resume       (ParoleProviderPlayer *player);
gboolean            parole_provider_player_stop         (ParoleProviderPlayer *player);
gboolean            parole_provider_player_play_next    (ParoleProviderPlayer *player);
gboolean            parole_provider_player_play_previous
                                                        (ParoleProviderPlayer *player);
gboolean            parole_provider_player_seek         (ParoleProviderPlayer *player,
                                                         gdouble pos);
void                parole_provider_player_open_media_chooser
                                                        (ParoleProviderPlayer *player);

Object Hierarchy

  GInterface
   +----ParoleProviderPlayerIface
  GEnum
   +----ParolePluginContainer
  GEnum
   +----ParoleState

Prerequisites

ParoleProviderPlayerIface requires GObject.

Signals

  "seeked"                                         : Run Last
  "state-changed"                                  : Run Last
  "tag-message"                                    : Run Last

Description

The player interface that the plugins should use in order to, issue playback commands to the Parole GStreamer backend or to get information about the current playback status.

Details

struct ParoleProviderPlayerIface

struct ParoleProviderPlayerIface;


ParoleProviderPlayer

typedef struct _ParoleProviderPlayer ParoleProviderPlayer;


enum ParolePluginContainer

typedef enum {
    PAROLE_PLUGIN_CONTAINER_PLAYLIST,
    PAROLE_PLUGIN_CONTAINER_MAIN_VIEW
} ParolePluginContainer;

PAROLE_PLUGIN_CONTAINER_PLAYLIST

PAROLE_PLUGIN_CONTAINER_MAIN_VIEW


enum ParoleState

typedef enum {
    PAROLE_STATE_STOPPED = 0,
    PAROLE_STATE_PLAYBACK_FINISHED,
    PAROLE_STATE_ABOUT_TO_FINISH,
    PAROLE_STATE_PAUSED,
    PAROLE_STATE_PLAYING
} ParoleState;

PAROLE_STATE_STOPPED

PAROLE_STATE_PLAYBACK_FINISHED

PAROLE_STATE_ABOUT_TO_FINISH

PAROLE_STATE_PAUSED

PAROLE_STATE_PLAYING


parole_provider_player_pack ()

void                parole_provider_player_pack         (ParoleProviderPlayer *player,
                                                         GtkWidget *widget,
                                                         const gchar *title,
                                                         ParolePluginContainer container);

Ask the player to pack a widget in the playlist notebook if PAROLE_PLUGIN_CONTAINER_PLAYLIST is specified or in the main window notebook if PAROLE_PLUGIN_CONTAINER_MAIN_VIEW is specified.

This function can be called once, the Player is responsible on removing the widget in case the plugin was unloaded.

player :

a ParoleProviderPlayer

widget :

a GtkWidget.

title :

title

container :

a ParolePluginContainer.

Since 0.2


parole_provider_player_get_action ()

GSimpleAction *     parole_provider_player_get_action   (ParoleProviderPlayer *player,
                                                         ParolePlayerAction action);

Get GSimpleAction from Parole.

player :

a ParoleProviderPlayer

action :

the ParolePlayerAction to retrieve

Returns :

the requested GSimpleAction.

Since 0.6


parole_provider_player_set_fullscreen ()

gboolean            parole_provider_player_set_fullscreen
                                                        (ParoleProviderPlayer *player,
                                                         gboolean fullscreen);

Set fullscreen status for Parole.

player :

a ParoleProviderPlayer

fullscreen :

TRUE for fullscreen, FALSE for unfullscreen

Returns :

TRUE if the fullscreen command succeeded, FALSE otherwise.

Since 0.6


parole_provider_player_get_fullscreen ()

gboolean            parole_provider_player_get_fullscreen
                                                        (ParoleProviderPlayer *player);

Get fullscreen status for Parole.

player :

a ParoleProviderPlayer

Returns :

TRUE if the player window is fullscreen, FALSE otherwise.

Since 0.6


parole_stream_set_image ()

void                parole_stream_set_image             (GObject *object,
                                                         GdkPixbuf *pixbuf);

Set the ParoleStream image to a new pixbuf.

object :

a ParoleStream object.

pixbuf :

a GdkPixbuf to set as the stream image.

Since 0.6


parole_stream_get_image ()

GdkPixbuf *         parole_stream_get_image             (GObject *object);


parole_provider_player_get_state ()

ParoleState         parole_provider_player_get_state    (ParoleProviderPlayer *player);

Get the current state of the player.

player :

a ParoleProviderPlayer

Returns :

a ParoleState.

Since 0.2


parole_provider_player_get_stream_position ()

gdouble             parole_provider_player_get_stream_position
                                                        (ParoleProviderPlayer *player);

Get stream position (microseconds) for Parole.

player :

a ParoleProviderPlayer

Returns :

a gdouble containing the current stream position in microseconds.

Since 0.6


parole_provider_player_play_uri ()

gboolean            parole_provider_player_play_uri     (ParoleProviderPlayer *player,
                                                         const gchar *uri);

Issue a play command on the backend for the given uri, note this function can be called only of the Parole current state is PAROLE_STATE_STOPPED.

Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, the state change is indicated asynchronously by "state-changed" signal.

player :

a ParoleProviderPlayer

uri :

uri

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.2


parole_provider_player_pause ()

gboolean            parole_provider_player_pause        (ParoleProviderPlayer *player);

Issue a pause command to the backend, this function can be called when the state of the player is PAROLE_STATE_PLAYING.

Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, the state change is indicated asynchronously by "state-changed" signal.

player :

a ParoleProviderPlayer

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.2


parole_provider_player_resume ()

gboolean            parole_provider_player_resume       (ParoleProviderPlayer *player);

Issue a resume command to the player, this function can be called when the current state of the player is PAROLE_STATE_PAUSED.

Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, the state change is indicated asynchronously by "state-changed" signal.

player :

a ParoleProviderPlayer

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.2


parole_provider_player_stop ()

gboolean            parole_provider_player_stop         (ParoleProviderPlayer *player);

Issue a stop command to the player.

Returning TRUE doesn't mean that the funtion succeeded to change the state of the player, the state change is indicated asynchronously by "state-changed" signal.

player :

a ParoleProviderPlayer

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.2


parole_provider_player_play_next ()

gboolean            parole_provider_player_play_next    (ParoleProviderPlayer *player);

Issue a play next command to the player.

player :

a ParoleProviderPlayer

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.6


parole_provider_player_play_previous ()

gboolean            parole_provider_player_play_previous
                                                        (ParoleProviderPlayer *player);

Issue a play previous command to the player.

player :

a ParoleProviderPlayer

Returns :

TRUE if the command is processed, FALSE otherwise.

Since 0.6


parole_provider_player_seek ()

gboolean            parole_provider_player_seek         (ParoleProviderPlayer *player,
                                                         gdouble pos);

Issue a seek command.

player :

a ParoleProviderPlayer

pos :

position to seek.

Returns :

TRUE if the seek command succeeded, FALSE otherwise.

Since 0.2


parole_provider_player_open_media_chooser ()

void                parole_provider_player_open_media_chooser
                                                        (ParoleProviderPlayer *player);

Ask Parole to open its media chooser dialog.

player :

a ParoleProviderPlayer

Since 0.2

Signal Details

The "seeked" signal

void                user_function                      (ParoleProviderPlayerIface *player,
                                                        gdouble                    value,
                                                        gpointer                   user_data)      : Run Last

Notifies when the stream has been manually advanced.

player :

the object which received the signal.

value :

the seeked position.

user_data :

user data set when the signal handler was connected.

Since 0.6


The "state-changed" signal

void                user_function                      (ParoleProviderPlayerIface *player,
                                                        ParoleStream              *stream,
                                                        ParoleState                state,
                                                        gpointer                   user_data)      : Run Last

Issued when the Parole state changed.

player :

the object which received the signal.

stream :

a ParoleStream.

state :

the new state.

user_data :

user data set when the signal handler was connected.

Since 0.2


The "tag-message" signal

void                user_function                      (ParoleProviderPlayerIface *player,
                                                        ParoleStream              *stream,
                                                        gpointer                   user_data)      : Run Last

Indicated that the stream tags were found and ready to be read.

player :

the object which received the signal.

stream :

a ParoleStream.

user_data :

user data set when the signal handler was connected.

Since 0.2