LomoPlayer

LomoPlayer

Synopsis

                    LomoPlayer;
                    LomoPlayerVTable;
enum                LomoPlayerHookType;
                    LomoPlayerHookEvent;
gboolean            (*LomoPlayerHook)                   (LomoPlayer *self,
                                                         LomoPlayerHookEvent event,
                                                         gpointer ret,
                                                         gpointer data);
enum                LomoStateChangeReturn;
enum                LomoState;
enum                LomoFormat;
#define             lomo_init                           (argc,argv)
#define             lomo_get_option_group               ()
LomoPlayer*         lomo_player_new                     (gchar *option_name,
                                                         ...);
gboolean            lomo_player_get_auto_parse          (LomoPlayer *self);
void                lomo_player_set_auto_parse          (LomoPlayer *self,
                                                         gboolean auto_parse);
void                lomo_player_hook_add                (LomoPlayer *self,
                                                         LomoPlayerHook func,
                                                         gpointer data);
void                lomo_player_hook_remove             (LomoPlayer *self,
                                                         LomoPlayerHook func);
LomoStream *        lomo_player_get_stream              (LomoPlayer *self);
gboolean            lomo_player_play_uri                (LomoPlayer *self,
                                                         gchar *uri,
                                                         GError **error);
gboolean            lomo_player_play_stream             (LomoPlayer *self,
                                                         LomoStream *stream,
                                                         GError **error);
LomoStateChangeReturn  lomo_player_set_state            (LomoPlayer *self,
                                                         LomoState state,
                                                         GError **error);
#define             lomo_player_play                    (p,error)
#define             lomo_player_pause                   (p,error)
#define             lomo_player_stop                    (p,error)
LomoState           lomo_player_get_state               (LomoPlayer *self);
gint64              lomo_player_tell                    (LomoPlayer *self,
                                                         LomoFormat format);
#define             lomo_player_tell_time               (p)
#define             lomo_player_tell_percent            (p)
gboolean            lomo_player_seek                    (LomoPlayer *self,
                                                         LomoFormat format,
                                                         gint64 val);
#define             lomo_player_seek_time               (c,t)
#define             lomo_player_seek_percent            (c,p)
gint64              lomo_player_length                  (LomoPlayer *self,
                                                         LomoFormat format);
#define             lomo_player_length_time             (c)
#define             lomo_player_length_percent          (c)
gboolean            lomo_player_set_volume              (LomoPlayer *self,
                                                         gint val);
gint                lomo_player_get_volume              (LomoPlayer *self);
gboolean            lomo_player_set_mute                (LomoPlayer *self,
                                                         gboolean mute);
gboolean            lomo_player_get_mute                (LomoPlayer *self);
void                lomo_player_insert                  (LomoPlayer *self,
                                                         LomoStream *stream,
                                                         gint pos);
#define             lomo_player_append                  (p,s)
#define             lomo_player_insert_uri              (p,u,i)
#define             lomo_player_append_uri              (p,u)
void                lomo_player_insert_multi            (LomoPlayer *self,
                                                         GList *streams,
                                                         gint pos);
void                lomo_player_insert_uri_strv         (LomoPlayer *self,
                                                         gchar **uris,
                                                         gint pos);
void                lomo_player_insert_uri_multi        (LomoPlayer *self,
                                                         GList *uris,
                                                         gint pos);
#define             lomo_player_append_multi            (p,l)
#define             lomo_player_append_uri_strv         (p,v)
#define             lomo_player_append_uri_multi        (p,l)
gboolean            lomo_player_del                     (LomoPlayer *self,
                                                         gint pos);
GList *             lomo_player_get_playlist            (LomoPlayer *self);
#define             lomo_player_queue_stream            (self,stream)
gint                lomo_player_queue                   (LomoPlayer *self,
                                                         gint pos);
#define             lomo_player_dequeue_stream          (self,stream)
gboolean            lomo_player_dequeue                 (LomoPlayer *self,
                                                         gint queue_pos);
gint                lomo_player_queue_index             (LomoPlayer *self,
                                                         LomoStream *stream);
LomoStream *        lomo_player_queue_nth               (LomoPlayer *self,
                                                         guint queue_pos);
void                lomo_player_queue_clear             (LomoPlayer *self);
gint                lomo_player_get_prev                (LomoPlayer *self);
gint                lomo_player_get_next                (LomoPlayer *self);
LomoStream *        lomo_player_nth_stream              (LomoPlayer *self,
                                                         gint pos);
gint                lomo_player_index                   (LomoPlayer *self,
                                                         LomoStream *stream);
gboolean            lomo_player_go_nth                  (LomoPlayer *self,
                                                         gint pos,
                                                         GError **error);
#define             lomo_player_go_prev                 (p,e)
#define             lomo_player_go_next                 (p,e)
gint                lomo_player_get_current             (LomoPlayer *self);
#define             lomo_player_get_current_stream      (p)
guint               lomo_player_get_total               (LomoPlayer *self);
void                lomo_player_clear                   (LomoPlayer *self);
void                lomo_player_set_repeat              (LomoPlayer *self,
                                                         gboolean val);
gboolean            lomo_player_get_repeat              (LomoPlayer *self);
void                lomo_player_set_random              (LomoPlayer *self,
                                                         gboolean val);
gboolean            lomo_player_get_random              (LomoPlayer *self);
void                lomo_player_randomize               (LomoPlayer *self);
void                lomo_player_print_pl                (LomoPlayer *self);
void                lomo_player_print_random_pl         (LomoPlayer *self);

Object Hierarchy

  GObject
   +----LomoPlayer

Properties

  "auto-parse"               gboolean              : Read / Write / Construct

Signals

  "all-tags"                                       : Run Last
  "change"                                         : Run Last
  "clear"                                          : Run Last
  "dequeue"                                        : Run Last
  "eos"                                            : Run Last
  "error"                                          : Run Last
  "insert"                                         : Run Last
  "mute"                                           : Run Last
  "pause"                                          : Run Last
  "play"                                           : Run Last
  "pre-change"                                     : Run Last
  "queue"                                          : Run Last
  "queue-clear"                                    : Run Last
  "random"                                         : Run Last
  "remove"                                         : Run Last
  "repeat"                                         : Run Last
  "seek"                                           : Run Last
  "stop"                                           : Run Last
  "tag"                                            : Run Last
  "volume"                                         : Run Last

Description

Details

LomoPlayer

typedef struct _LomoPlayer LomoPlayer;

LomoPlayerVTable

typedef struct {
	GstElement* (*create_pipeline)  (const gchar *uri, GHashTable *opts);
	void        (*destroy_pipeline) (GstElement *pipeline);

	GstStateChangeReturn (*set_state) (GstElement *pipeline, GstState state);
	GstState             (*get_state) (GstElement *pipeline);

	gboolean (*set_position) (GstElement *pipeline, GstFormat  format, gint64  position);
	gboolean (*get_position) (GstElement *pipeline, GstFormat *format, gint64 *position);
	gboolean (*get_length)   (GstElement *pipeline, GstFormat *format, gint64 *duration);

	// 0 lowest, 100 highest (there is not a common range over all posible
	// sinks, so make it relative and let vfunc set it
	gboolean (*set_volume) (GstElement *pipeline, gint volume);
	gint     (*get_volume) (GstElement *pipeline);

	// Can be omited
	gboolean (*set_mute) (GstElement *pipeline, gboolean mute);
	gboolean (*get_mute) (GstElement *pipeline);
} LomoPlayerVTable;

LomoPlayerVTable is used to override default functions of LomoPlayer. You can left any of them empty (NULL) in which case default function is used.

create_pipeline ()

Function for create a new pipeline.

destroy_pipeline ()

Function for destroy a pipeline.

set_state ()

Function for set state to current pipeline

get_state ()

Function for get state from current pipeline

set_position ()

Function for set position on current pipeline

get_position ()

Function for get position from current pipeline

get_length ()

Function for get length for the stream currently in the pipeline

get_volume ()

Function for get volume from current pipeline

get_mute ()

Function for get mute from current pipeline

enum LomoPlayerHookType

typedef enum {
	LOMO_PLAYER_HOOK_PLAY,
	LOMO_PLAYER_HOOK_PAUSE,
	LOMO_PLAYER_HOOK_STOP,
	LOMO_PLAYER_HOOK_SEEK,
	LOMO_PLAYER_HOOK_VOLUME,
	LOMO_PLAYER_HOOK_MUTE,
	LOMO_PLAYER_HOOK_INSERT,
	LOMO_PLAYER_HOOK_REMOVE,
	LOMO_PLAYER_HOOK_QUEUE,
	LOMO_PLAYER_HOOK_DEQUEUE,
	LOMO_PLAYER_HOOK_QUEUE_CLEAR,
	LOMO_PLAYER_HOOK_CHANGE,
	LOMO_PLAYER_HOOK_CLEAR,
	LOMO_PLAYER_HOOK_REPEAT,
	LOMO_PLAYER_HOOK_RANDOM,
	LOMO_PLAYER_HOOK_EOS,
	LOMO_PLAYER_HOOK_ERROR,
	LOMO_PLAYER_HOOK_TAG,
	LOMO_PLAYER_HOOK_ALL_TAGS
} LomoPlayerHookType;

LomoPlayerHookEvent

typedef struct {
	LomoPlayerHookType type;
	gint old, new;      // seek
	gint volume;        // volume
	LomoStream *stream; // insert, remove, queue, dequeue, tag, all_tags
	gint pos;           // insert, remove
	gint queue_pos;     // queue, dequeue
	gint from, to;      // change
	LomoTag tag;        // tag
	gboolean value;     // random, repeat, mute
	GError *error;      // error
} LomoPlayerHookEvent;

LomoPlayerHook ()

gboolean            (*LomoPlayerHook)                   (LomoPlayer *self,
                                                         LomoPlayerHookEvent event,
                                                         gpointer ret,
                                                         gpointer data);

enum LomoStateChangeReturn

typedef enum {
	LOMO_STATE_CHANGE_SUCCESS     = GST_STATE_CHANGE_SUCCESS,
	LOMO_STATE_CHANGE_ASYNC       = GST_STATE_CHANGE_ASYNC,
	LOMO_STATE_CHANGE_NO_PREROLL  = GST_STATE_CHANGE_NO_PREROLL,
	LOMO_STATE_CHANGE_FAILURE     = GST_STATE_CHANGE_FAILURE,
} LomoStateChangeReturn;

enum LomoState

typedef enum {
	LOMO_STATE_INVALID = -1,
	LOMO_STATE_STOP    = 0,
	LOMO_STATE_PLAY    = 1,
	LOMO_STATE_PAUSE   = 2,
} LomoState;

enum LomoFormat

typedef enum {
	LOMO_FORMAT_INVALID = -1,
	LOMO_FORMAT_TIME    = 0,
	LOMO_FORMAT_PERCENT = 1,

	LOMO_FORMATS
} LomoFormat;

lomo_init()

#define lomo_init(argc,argv)    gst_init(argc,argv)

lomo_get_option_group()

#define lomo_get_option_group() gst_init_get_option_group()

lomo_player_new ()

LomoPlayer*         lomo_player_new                     (gchar *option_name,
                                                         ...);

Creates a new LomoPlayer with options

option_name :

First option name

... :

A NULL-terminated pairs of option-name,option-value

Returns :

the new created LomoPlayer

lomo_player_get_auto_parse ()

gboolean            lomo_player_get_auto_parse          (LomoPlayer *self);

Gets the auto-parse property value.

lomo :

a LomoPlayer

Returns :

The auto-parse property value.

lomo_player_set_auto_parse ()

void                lomo_player_set_auto_parse          (LomoPlayer *self,
                                                         gboolean auto_parse);

Sets the auto-parse property value.

lomo :

a LomoPlayer

auto_parse :

new value for auto-parse property

lomo_player_hook_add ()

void                lomo_player_hook_add                (LomoPlayer *self,
                                                         LomoPlayerHook func,
                                                         gpointer data);

Add a hook to the hook system

self :

a LomoPlayer

func :

a LomoPlayerHook function

data :

data to pass to func or NULL to ignore

lomo_player_hook_remove ()

void                lomo_player_hook_remove             (LomoPlayer *self,
                                                         LomoPlayerHook func);

Remove a hook from the hook system

self :

a LomoPlayer

func :

a LomoPlayerHook function

lomo_player_get_stream ()

LomoStream *        lomo_player_get_stream              (LomoPlayer *self);

Gets active stream

self :

a LomoPlayer

Returns :

the active LomoStream

lomo_player_play_uri ()

gboolean            lomo_player_play_uri                (LomoPlayer *self,
                                                         gchar *uri,
                                                         GError **error);

Play an URI clearing any previous playlist.

self :

a LomoPlayer

uri :

URI to play

error :

Return location for an error

Returns :

TRUE if successful, FALSE if an error is ocurred.

lomo_player_play_stream ()

gboolean            lomo_player_play_stream             (LomoPlayer *self,
                                                         LomoStream *stream,
                                                         GError **error);

Play a LomoStream clearing any previous playlist.

self :

a LomoPlayer

uri :

LomoStream to play

error :

Return location for an error

Returns :

TRUE if successful, FALSE if an error is ocurred.

lomo_player_set_state ()

LomoStateChangeReturn  lomo_player_set_state            (LomoPlayer *self,
                                                         LomoState state,
                                                         GError **error);

Changes the current state of self to state

self :

a LomoPlayer

state :

the LomoState to set

error :

location for an error

Returns :

a LomoStateChangeReturn representing success, failure or async change

lomo_player_play()

#define lomo_player_play(p,error)  lomo_player_set_state(p,LOMO_STATE_PLAY, error)

lomo_player_pause()

#define lomo_player_pause(p,error) lomo_player_set_state(p,LOMO_STATE_PAUSE,error)

lomo_player_stop()

#define lomo_player_stop(p,error)  lomo_player_set_state(p,LOMO_STATE_STOP, error)

lomo_player_get_state ()

LomoState           lomo_player_get_state               (LomoPlayer *self);

Gets the current state

self :

a LomoPlayer

Returns :

the current LomoState

lomo_player_tell ()

gint64              lomo_player_tell                    (LomoPlayer *self,
                                                         LomoFormat format);

Gets current position of the active LomoStream

self :

a LomoPlayer

format :

the LomoFormat to use, currently only LOMO_FORMAT_TIME is supported

Returns :

the position expresed in format format

lomo_player_tell_time()

#define lomo_player_tell_time(p)    lomo_player_tell(p,LOMO_FORMAT_TIME)

lomo_player_tell_percent()

#define lomo_player_tell_percent(p) lomo_player_tell(p,LOMO_FORMAT_PERCENT)

lomo_player_seek ()

gboolean            lomo_player_seek                    (LomoPlayer *self,
                                                         LomoFormat format,
                                                         gint64 val);

Sets the position of the active LomoStream

self :

a LomoPlayer

format :

the LomoFormat to use, currently only LOMO_FORMAT_TIME is

val :

Position to seek expresed in format

Returns :

TRUE if success, FALSE if an error ocurred

lomo_player_seek_time()

#define  lomo_player_seek_time(c,t)    lomo_player_seek(c,LOMO_FORMAT_TIME,t)

lomo_player_seek_percent()

#define  lomo_player_seek_percent(c,p) lomo_player_seek(c,LOMO_FORMAT_PERCENT,p) // Br0ken

lomo_player_length ()

gint64              lomo_player_length                  (LomoPlayer *self,
                                                         LomoFormat format);

Gets length of the active LomoStream

self :

a LomoPlayer

format :

the LomoFormat to use, currently only LOMO_FORMAT_TIME is

Returns :

length expresed in format format

lomo_player_length_time()

#define lomo_player_length_time(c)    lomo_player_length(c,LOMO_FORMAT_TIME)

lomo_player_length_percent()

#define lomo_player_length_percent(c) lomo_player_length(c,LOMO_FORMAT_PERCENT) // Br0ken

lomo_player_set_volume ()

gboolean            lomo_player_set_volume              (LomoPlayer *self,
                                                         gint val);

Sets volume, val must be between 0 and 100

self :

a LomoPlayer

val :

new value for volume

Returns :

TRUE on success, FALSE if an error ocurred

lomo_player_get_volume ()

gint                lomo_player_get_volume              (LomoPlayer *self);

Gets current volume (between 0 and 100)

self :

a LomoPlayer

Returns :

current volume

lomo_player_set_mute ()

gboolean            lomo_player_set_mute                (LomoPlayer *self,
                                                         gboolean mute);

Sets mute

self :

a LomoPlayer

val :

new value for mute

Returns :

TRUE on success, FALSE if an error ocurred

lomo_player_get_mute ()

gboolean            lomo_player_get_mute                (LomoPlayer *self);

Gets current mute value

self :

a LomoPlayer

Returns :

current mute value

lomo_player_insert ()

void                lomo_player_insert                  (LomoPlayer *self,
                                                         LomoStream *stream,
                                                         gint pos);

Inserts a LomoStream in the internal playlist

self :

a LomoPlayer

stream :

a LomoStream which will be owner by self

pos :

position to insert the element, If this is negative, or is larger than the number of elements in the list, the new element is added on to the end of the list.

lomo_player_append()

#define lomo_player_append(p,s)              lomo_player_insert(p,s,-1)

lomo_player_insert_uri()

#define lomo_player_insert_uri(p,u,i)        lomo_player_insert(p,lomo_stream_new(i), i)

lomo_player_append_uri()

#define lomo_player_append_uri(p,u)          lomo_player_insert(p,lomo_stream_new(u),-1)

lomo_player_insert_multi ()

void                lomo_player_insert_multi            (LomoPlayer *self,
                                                         GList *streams,
                                                         gint pos);

Inserts multiple streams in the internal playlist

self :

a LomoPlayer

streams :

a GList of LomoStream which will be owned by self

pos :

position to insert the elements, If this is negative, or is larger than the number of elements in the list, the new elements are added on to the end of the list.

lomo_player_insert_uri_strv ()

void                lomo_player_insert_uri_strv         (LomoPlayer *self,
                                                         gchar **uris,
                                                         gint pos);

Inserts multiple URIs in the internal playlist

self :

a LomoPlayer

uris :

a NULL-terminated array of URIs

pos :

position to insert the elements, If this is negative, or is larger than the number of elements in the list, the new elements are added on to the end of the list.

lomo_player_insert_uri_multi ()

void                lomo_player_insert_uri_multi        (LomoPlayer *self,
                                                         GList *uris,
                                                         gint pos);

Inserts multiple URIs in the internal playlist

self :

a LomoPlayer

uris :

a GList of gchar*

pos :

position to insert the elements, If this is negative, or is larger than the number of elements in the list, the new elements are added on to the end of the list.

lomo_player_append_multi()

#define lomo_player_append_multi(p,l)     lomo_player_insert_multi(p,l,-1)

lomo_player_append_uri_strv()

#define lomo_player_append_uri_strv(p,v)  lomo_player_insert_uri_strv(p,v,-1)

lomo_player_append_uri_multi()

#define lomo_player_append_uri_multi(p,l) lomo_player_insert_uri_multi(p,l,-1)

lomo_player_del ()

gboolean            lomo_player_del                     (LomoPlayer *self,
                                                         gint pos);

Removes a LomoStream from the internal playlist using and index This also implies a reference decrease on the element

self :

a LomoPlayer

position :

position of the LomoStream to remove

Returns :

TRUE is position was remove, FALSE otherwise

lomo_player_get_playlist ()

GList *             lomo_player_get_playlist            (LomoPlayer *self);

Gets current playlist

self :

a LomoPlayer

Returns :

a new GList of LomoStream. Should be freed with g_list_free when no longer needed.

lomo_player_queue_stream()

#define lomo_player_queue_stream(self,stream) lomo_player_queue(self,lomo_player_index(self,stream))

lomo_player_queue ()

gint                lomo_player_queue                   (LomoPlayer *self,
                                                         gint pos);

Queues the element for inmediate play after active element

self :

a LomoPlayer

pos :

position of the element to queue

Returns :

index of the elemement in the queue

lomo_player_dequeue_stream()

#define  lomo_player_dequeue_stream(self,stream) lomo_player_queue_index(self,stream)

lomo_player_dequeue ()

gboolean            lomo_player_dequeue                 (LomoPlayer *self,
                                                         gint queue_pos);

Removes the element indicated by queue_pos from the queue

self :

a LomoPlayer

queue_pos :

Index of the queue to dequeue

Returns :

TRUE if element was dequeue, FALSE if queue_pos was invalid

lomo_player_queue_index ()

gint                lomo_player_queue_index             (LomoPlayer *self,
                                                         LomoStream *stream);

Gets the position of the LomoStream in the queue (starting from 0).

self :

a LomoPlayer

stream :

a LomoStream to find in queue

Returns :

the index of the LomoStream in the queue, or -1 if the LomoStream is not found in the queue

lomo_player_queue_nth ()

LomoStream *        lomo_player_queue_nth               (LomoPlayer *self,
                                                         guint queue_pos);

Gets the LomoStream at the given position in the queue

self :

a LomoPlayer

queue_pos :

The queue index of the element, starting from 0

Returns :

the LomoStream, or NULL if the position is off the end of the queue

lomo_player_queue_clear ()

void                lomo_player_queue_clear             (LomoPlayer *self);

Removes all LomoStream queued

self :

a LomoPlayer

lomo_player_get_prev ()

gint                lomo_player_get_prev                (LomoPlayer *self);

Gets the position of the previous stream in the playlist following random and repeat behaviours

self :

a LomoPlayer

Returns :

the position of the previous stream, or -1 if none

lomo_player_get_next ()

gint                lomo_player_get_next                (LomoPlayer *self);

Gets the position of the next stream in the playlist following random and repeat behaviours

self :

a LomoPlayer

Returns :

the position of the next stream, or -1 if none

lomo_player_nth_stream ()

LomoStream *        lomo_player_nth_stream              (LomoPlayer *self,
                                                         gint pos);

Gets the LomoStream at the given position

self :

a LomoPlayer

pos :

the position of the LomoStream, starting from 0

Returns :

the LomoStream, or NULL if pos is off the list

lomo_player_index ()

gint                lomo_player_index                   (LomoPlayer *self,
                                                         LomoStream *stream);

Gets the position of the LomoStream in the playlist

self :

a LomoPlayer

stream :

the LomoStream to find

Returns :

the position of the LomoStream, or -1 if not found

lomo_player_go_nth ()

gboolean            lomo_player_go_nth                  (LomoPlayer *self,
                                                         gint pos,
                                                         GError **error);

Changes the active LomoStream from the playlist for the LomoStream respecting current volume, mute and state of the LomoPlayer

self :

a LomoPlayer

pos :

position for the new active LomoStream

error :

location for an error

Returns :

TRUE if success, FALSE if an error ocurred

lomo_player_go_prev()

#define  lomo_player_go_prev(p,e) lomo_player_go_nth(p,lomo_player_get_prev(p),e)

lomo_player_go_next()

#define  lomo_player_go_next(p,e) lomo_player_go_nth(p,lomo_player_get_next(p),e)

lomo_player_get_current ()

gint                lomo_player_get_current             (LomoPlayer *self);

Gets the active LomoStream

self :

a LomoPlayer

Returns :

position of the active LomoStream, or -1 if none

lomo_player_get_current_stream()

#define  lomo_player_get_current_stream(p) lomo_player_nth_stream(p, lomo_player_get_current(p))

lomo_player_get_total ()

guint               lomo_player_get_total               (LomoPlayer *self);

Gets the number of LomoStream elements which currently handles self

self :

a LomoPlayer

Returns :

number of LomoStream elements.

lomo_player_clear ()

void                lomo_player_clear                   (LomoPlayer *self);

Clear internal playlist. This also implies a reference decrease on each element.

self :

a LomoPlayer

lomo_player_set_repeat ()

void                lomo_player_set_repeat              (LomoPlayer *self,
                                                         gboolean val);

Sets the value of the repeat behaviour

self :

a LomoPlayer

val :

Value for repeat behaviour

lomo_player_get_repeat ()

gboolean            lomo_player_get_repeat              (LomoPlayer *self);

Gets current value of the repeat behaviour

self :

a LomoPlayer

Returns :

TRUE if repeat is applied, FALSE otherwise

lomo_player_set_random ()

void                lomo_player_set_random              (LomoPlayer *self,
                                                         gboolean val);

Sets the value of the random behaviour, if value is TRUE playlist will be randomized

Note

No signal is emitted in this process. You must re-query it to be up-to-date

self :

a LomoPlayer

val :

Value for random behaviour

lomo_player_get_random ()

gboolean            lomo_player_get_random              (LomoPlayer *self);

Gets current value of the random behaviour

self :

a LomoPlayer

Returns :

TRUE if repeat is applied, FALSE otherwise

lomo_player_randomize ()

void                lomo_player_randomize               (LomoPlayer *self);

Randomizes internal playlist.

Note

No signal is emitted in this process. You must re-query it to be up-to-date

self :

a LomoPlayer

lomo_player_print_pl ()

void                lomo_player_print_pl                (LomoPlayer *self);

Prints to stdout current playlist

self :

a LomoPlayer

lomo_player_print_random_pl ()

void                lomo_player_print_random_pl         (LomoPlayer *self);

Prints to stdout current playlist (using randomized order)

self :

a LomoPlayer

Property Details

The "auto-parse" property

  "auto-parse"               gboolean              : Read / Write / Construct

Control if LomoPlayer must parse automatically all inserted streams

Default value: TRUE

Signal Details

The "all-tags" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gpointer    user_data)      : Run Last

Emitted when all (or no more to be discoverd) tag are found for a LomoStream

lomo :

the object that received the signal

stream :

LomoStream which discoved all his tags

user_data :

user data set when the signal handler was connected.

The "change" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gint        from,
                                                        gint        to,
                                                        gpointer    user_data)      : Run Last

Emitted when the active element in the internal playlist changes

lomo :

the object that received the signal

from :

Active element before the change

to :

Active element after the change

user_data :

user data set when the signal handler was connected.

The "clear" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when the internal playlist is cleared

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "dequeue" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gint        position,
                                                        gpointer    user_data)      : Run Last

Emitted when a LomoStream is dequeue inside a LomoPlayer

lomo :

the object that received the signal

stream :

LomoStream object that was removed

position :

last position of the stream in the queue

user_data :

user data set when the signal handler was connected.

The "eos" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when current stream reaches end of stream, think about end of file for file descriptors.

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "error" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    error,
                                                        gpointer    arg2,
                                                        gpointer    user_data)      : Run Last

Emitted when some error was ocurred.

lomo :

the object that received the signal

error :

error ocurred

user_data :

user data set when the signal handler was connected.

The "insert" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gint        position,
                                                        gpointer    user_data)      : Run Last

Emitted when a LomoStream is inserted into LomoPlayer

lomo :

the object that received the signal

stream :

LomoStream object that was added

position :

position of the stream in the playlist

user_data :

user data set when the signal handler was connected.

The "mute" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gboolean    mute,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer mutes or unmutes

lomo :

the object that received the signal

mute :

Current value state of mute

user_data :

user data set when the signal handler was connected.

The "pause" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer changes his state to LOMO_STATE_PAUSE

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "play" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer changes his state to LOMO_STATE_PLAY

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "pre-change" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted before an change event

Note

This signal is deprecated, use LomoPlayerHook as a replacement

lomo :

the object that received the signal

from :

active stream at the current instant

to :

active stream after the change will be completed

user_data :

user data set when the signal handler was connected.

The "queue" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gint        position,
                                                        gpointer    user_data)      : Run Last

Emitted when a LomoStream is queued inside a LomoPlayer

lomo :

the object that received the signal

stream :

LomoStream object that was queued

position :

position of the stream in the queue

user_data :

user data set when the signal handler was connected.

The "queue-clear" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when the queue of a LomoStream is cleared

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "random" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gboolean    repeat,
                                                        gpointer    user_data)      : Run Last

Emitted when value of the random behaviour changes

lomo :

the object that received the signal

repeat :

value of random behaviour

user_data :

user data set when the signal handler was connected.

The "remove" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gint        position,
                                                        gpointer    user_data)      : Run Last

Emitted when a LomoStream is remove from LomoPlayer

lomo :

the object that received the signal

stream :

LomoStream object that was removed

position :

last position of the stream in the playlist

user_data :

user data set when the signal handler was connected.

The "repeat" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gboolean    repeat,
                                                        gpointer    user_data)      : Run Last

Emitted when value of the repeat behaviour changes

lomo :

the object that received the signal

repeat :

value of repeat behaviour

user_data :

user data set when the signal handler was connected.

The "seek" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gint64      from,
                                                        gint64      to,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer seeks in a stream

lomo :

the object that received the signal

from :

Position before the seek

to :

Position after the seek

user_data :

user data set when the signal handler was connected.

The "stop" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer changes his state to LOMO_STATE_STOP

lomo :

the object that received the signal

user_data :

user data set when the signal handler was connected.

The "tag" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gpointer    stream,
                                                        gint        tag,
                                                        gpointer    user_data)      : Run Last

Emitted when some tag is found in a stream.

lomo :

the object that received the signal

stream :

LomoStream that gives a new tag

tag :

Discoved tag

user_data :

user data set when the signal handler was connected.

The "volume" signal

void                user_function                      (LomoPlayer *lomo,
                                                        gint        volume,
                                                        gpointer    user_data)      : Run Last

Emitted when LomoPlayer changes his volume

lomo :

the object that received the signal

volume :

New value of volume (between 0 and 100)

user_data :

user data set when the signal handler was connected.