RCLibAlbum

RCLibAlbum — The album image processor

Synopsis

#include <rclib-album.h>

struct              RCLibAlbum;
struct              RCLibAlbumClass;
enum                RCLibAlbumType;
void                rclib_album_exit                    ();
gboolean            rclib_album_get_album_data          (RCLibAlbumType *type,
                                                         gpointer *data);
GObject *           rclib_album_get_instance            ();
void                rclib_album_init                    ();
gboolean            rclib_album_save_file               (const gchar *filename);
gulong              rclib_album_signal_connect          (const gchar *name,
                                                         GCallback callback,
                                                         gpointer data);
void                rclib_album_signal_disconnect       (gulong handler_id);

Object Hierarchy

  GObject
   +----RCLibAlbum

Signals

  "album-found"                                    : Run Last
  "album-none"                                     : Run First

Description

The RCLibAlbum is a class which processes the album image. It can read album image from image files, or get the data from the metadata, and then send signals so that anyone who connected to the class can get the data.

Details

struct RCLibAlbum

struct RCLibAlbum;

The album processor. The contents of the RCLibAlbum structure are private and should only be accessed via the provided API.


struct RCLibAlbumClass

struct RCLibAlbumClass {
};

RCLibAlbum class.


enum RCLibAlbumType

typedef enum {
    RCLIB_ALBUM_TYPE_FILENAME,
    RCLIB_ALBUM_TYPE_BUFFER
} RCLibAlbumType;

The enum type for the album data type.

RCLIB_ALBUM_TYPE_FILENAME

the data is a filename (string)

RCLIB_ALBUM_TYPE_BUFFER

the data is in GstBuffer type

rclib_album_exit ()

void                rclib_album_exit                    ();

Unload the album process instance.


rclib_album_get_album_data ()

gboolean            rclib_album_get_album_data          (RCLibAlbumType *type,
                                                         gpointer *data);

Get the album data.

type :

the album data type. [out][allow-none]

data :

the album data. [out][allow-none]

Returns :

Whether the album data is set.

rclib_album_get_instance ()

GObject *           rclib_album_get_instance            ();

Get the running RCLibAlbum instance.

Returns :

The running instance. [transfer none]

rclib_album_init ()

void                rclib_album_init                    ();

Initialize the album process instance.


rclib_album_save_file ()

gboolean            rclib_album_save_file               (const gchar *filename);

Save the album image to a new image file.

filename :

the filename for the new album image

Returns :

Whether the operation is successful.

rclib_album_signal_connect ()

gulong              rclib_album_signal_connect          (const gchar *name,
                                                         GCallback callback,
                                                         gpointer data);

Connect the GCallback function to the given signal for the running instance of RCLibAlbum object.

name :

the name of the signal

callback :

the the GCallback to connect. [scope call]

data :

the user data

Returns :

The handler ID.

rclib_album_signal_disconnect ()

void                rclib_album_signal_disconnect       (gulong handler_id);

Disconnects a handler from the running RCLibAlbum instance so it will not be called during any future or currently ongoing emissions of the signal it has been connected to. The handler_id becomes invalid and may be reused.

handler_id :

handler id of the handler to be disconnected

Signal Details

The "album-found" signal

gboolean            user_function                      (RCLibAlbum *album,
                                                        guint       type,
                                                        gpointer    album_data,
                                                        gpointer    user_data)       : Run Last

The ::album-found signal is emitted when the album file or data is found.

album :

the RCLibAlbum that received the signal

type :

the data type

album_data :

the album data (filename or GstBuffer)

user_data :

user data set when the signal handler was connected.

Returns :

Whether the album data can be used, if not, the album data will not be saved in the player.

The "album-none" signal

void                user_function                      (RCLibAlbum *album,
                                                        gpointer    user_data)      : Run First

The ::album-found signal is emitted if no album image file or data is found.

album :

the RCLibAlbum that received the signal

user_data :

user data set when the signal handler was connected.