GrlMedia

GrlMedia — A multimedia data transfer object

Synopsis

#include <grilo.h>

struct              GrlMedia;
struct              GrlMediaClass;
enum                GrlMediaSerializeType;
GrlMedia *          grl_media_new                       (void);
void                grl_media_add_author                (GrlMedia *media,
                                                         const gchar *author);
void                grl_media_add_external_player       (GrlMedia *media,
                                                         const gchar *player);
void                grl_media_add_external_url          (GrlMedia *media,
                                                         const gchar *url);
void                grl_media_add_keyword               (GrlMedia *media,
                                                         const gchar *keyword);
void                grl_media_add_region_data           (GrlMedia *media,
                                                         const gchar *region,
                                                         const GDateTime *publication_date,
                                                         const gchar *certificate);
void                grl_media_add_thumbnail             (GrlMedia *media,
                                                         const gchar *thumbnail);
void                grl_media_add_thumbnail_binary      (GrlMedia *media,
                                                         const guint8 *thumbnail,
                                                         gsize size);
void                grl_media_add_url_data              (GrlMedia *media,
                                                         const gchar *url,
                                                         const gchar *mime);
const gchar *       grl_media_get_author                (GrlMedia *media);
const gchar *       grl_media_get_author_nth            (GrlMedia *media,
                                                         guint index);
const gchar *       grl_media_get_certificate           (GrlMedia *media);
GDateTime *         grl_media_get_creation_date         (GrlMedia *media);
const gchar *       grl_media_get_description           (GrlMedia *media);
gint                grl_media_get_duration              (GrlMedia *media);
const gchar *       grl_media_get_external_url          (GrlMedia *media);
const gchar *       grl_media_get_external_url_nth      (GrlMedia *media,
                                                         guint index);
const gchar *       grl_media_get_id                    (GrlMedia *media);
const gchar *       grl_media_get_keyword               (GrlMedia *media);
const gchar *       grl_media_get_keyword_nth           (GrlMedia *media,
                                                         guint index);
const gchar *       grl_media_get_last_played           (GrlMedia *media);
gint                grl_media_get_last_position         (GrlMedia *media);
const gchar *       grl_media_get_license               (GrlMedia *media);
const gchar *       grl_media_get_mime                  (GrlMedia *media);
GDateTime *         grl_media_get_modification_date     (GrlMedia *media);
gint                grl_media_get_play_count            (GrlMedia *media);
const gchar *       grl_media_get_player                (GrlMedia *media);
const gchar *       grl_media_get_player_nth            (GrlMedia *media,
                                                         guint index);
GDateTime *         grl_media_get_publication_date      (GrlMedia *media);
gfloat              grl_media_get_rating                (GrlMedia *media);
const gchar *       grl_media_get_region                (GrlMedia *media);
const gchar *       grl_media_get_region_data           (GrlMedia *media,
                                                         const GDateTime **publication_date,
                                                         const gchar **certificate);
const gchar *       grl_media_get_region_data_nth       (GrlMedia *media,
                                                         guint index,
                                                         const GDateTime **publication_date,
                                                         const gchar **certificate);
const gchar *       grl_media_get_site                  (GrlMedia *media);
const gchar *       grl_media_get_source                (GrlMedia *media);
gfloat              grl_media_get_start_time            (GrlMedia *media);
const gchar *       grl_media_get_studio                (GrlMedia *media);
const gchar *       grl_media_get_thumbnail             (GrlMedia *media);
const guint8 *      grl_media_get_thumbnail_binary      (GrlMedia *media,
                                                         gsize *size);
const guint8 *      grl_media_get_thumbnail_binary_nth  (GrlMedia *media,
                                                         gsize *size,
                                                         guint index);
const gchar *       grl_media_get_thumbnail_nth         (GrlMedia *media,
                                                         guint index);
const gchar *       grl_media_get_title                 (GrlMedia *media);
const gchar *       grl_media_get_url                   (GrlMedia *media);
const gchar *       grl_media_get_url_data              (GrlMedia *media,
                                                         gchar **mime);
const gchar *       grl_media_get_url_data_nth          (GrlMedia *media,
                                                         guint index,
                                                         gchar **mime);
gchar *             grl_media_serialize                 (GrlMedia *media);
gchar *             grl_media_serialize_extended        (GrlMedia *media,
                                                         GrlMediaSerializeType serial_type,
                                                         ...);
void                grl_media_set_author                (GrlMedia *media,
                                                         const gchar *author);
void                grl_media_set_certificate           (GrlMedia *media,
                                                         const gchar *certificate);
void                grl_media_set_creation_date         (GrlMedia *media,
                                                         const GDateTime *creation_date);
void                grl_media_set_description           (GrlMedia *media,
                                                         const gchar *description);
void                grl_media_set_duration              (GrlMedia *media,
                                                         gint duration);
void                grl_media_set_external_player       (GrlMedia *media,
                                                         const gchar *player);
void                grl_media_set_external_url          (GrlMedia *media,
                                                         const gchar *url);
void                grl_media_set_id                    (GrlMedia *media,
                                                         const gchar *id);
void                grl_media_set_keyword               (GrlMedia *media,
                                                         const gchar *keyword);
void                grl_media_set_last_played           (GrlMedia *media,
                                                         const gchar *last_played);
void                grl_media_set_last_position         (GrlMedia *media,
                                                         gint last_position);
void                grl_media_set_license               (GrlMedia *media,
                                                         const gchar *license);
void                grl_media_set_mime                  (GrlMedia *media,
                                                         const gchar *mime);
void                grl_media_set_modification_date     (GrlMedia *media,
                                                         const GDateTime *modification_date);
void                grl_media_set_play_count            (GrlMedia *media,
                                                         gint play_count);
void                grl_media_set_publication_date      (GrlMedia *media,
                                                         const GDateTime *date);
void                grl_media_set_rating                (GrlMedia *media,
                                                         gfloat rating,
                                                         gfloat max);
void                grl_media_set_region                (GrlMedia *media,
                                                         const gchar *region);
void                grl_media_set_region_data           (GrlMedia *media,
                                                         const gchar *region,
                                                         const GDateTime *publication_date,
                                                         const gchar *certificate);
void                grl_media_set_site                  (GrlMedia *media,
                                                         const gchar *site);
void                grl_media_set_source                (GrlMedia *media,
                                                         const gchar *source);
void                grl_media_set_studio                (GrlMedia *media,
                                                         const gchar *studio);
void                grl_media_set_thumbnail             (GrlMedia *media,
                                                         const gchar *thumbnail);
void                grl_media_set_thumbnail_binary      (GrlMedia *media,
                                                         const guint8 *thumbnail,
                                                         gsize size);
void                grl_media_set_title                 (GrlMedia *media,
                                                         const gchar *title);
void                grl_media_set_url                   (GrlMedia *media,
                                                         const gchar *url);
void                grl_media_set_url_data              (GrlMedia *media,
                                                         const gchar *url,
                                                         const gchar *mime);
GrlMedia *          grl_media_unserialize               (const gchar *serial);

Object Hierarchy

  GObject
   +----GrlData
         +----GrlMedia
               +----GrlMediaBox
               +----GrlMediaAudio
               +----GrlMediaVideo
               +----GrlMediaImage

Description

This high level class represents a multimedia item. It has methods to set and get properties like author, title, description, and so on.

Details

struct GrlMedia

struct GrlMedia;

struct GrlMediaClass

struct GrlMediaClass {
  GrlDataClass parent_class;
};

Grilo Media Class

GrlDataClass parent_class;

the parent class structure

enum GrlMediaSerializeType

typedef enum {
  GRL_MEDIA_SERIALIZE_BASIC,
  GRL_MEDIA_SERIALIZE_PARTIAL,
  GRL_MEDIA_SERIALIZE_FULL
} GrlMediaSerializeType;

GrlMedia serialize type

GRL_MEDIA_SERIALIZE_BASIC

Basic mode

GRL_MEDIA_SERIALIZE_PARTIAL

Partial mode

GRL_MEDIA_SERIALIZE_FULL

Full mode

Since 0.2.3


grl_media_new ()

GrlMedia *          grl_media_new                       (void);

Creates a new data media object.

Returns :

a newly-allocated data media.

Since 0.1.4


grl_media_add_author ()

void                grl_media_add_author                (GrlMedia *media,
                                                         const gchar *author);

Adds a new author to media.

media :

a GrlMedia

author :

an author for media

Since 0.1.10


grl_media_add_external_player ()

void                grl_media_add_external_player       (GrlMedia *media,
                                                         const gchar *player);

Adds a new external player to media.

media :

a GrlMedia

player :

an external player for media

Since 0.1.10


grl_media_add_external_url ()

void                grl_media_add_external_url          (GrlMedia *media,
                                                         const gchar *url);

Adds a new external url to media.

media :

a GrlMedia

url :

an external url for media

Since 0.1.10


grl_media_add_keyword ()

void                grl_media_add_keyword               (GrlMedia *media,
                                                         const gchar *keyword);

Adds the keyword describing the media.

media :

a GrlMedia

keyword :

a keyword describing the media

Since 0.2.3


grl_media_add_region_data ()

void                grl_media_add_region_data           (GrlMedia *media,
                                                         const gchar *region,
                                                         const GDateTime *publication_date,
                                                         const gchar *certificate);

Adds regional publication and certification information for region.

media :

a GrlMedia

region :

the region's ISO-3166-1 code

publication_date :

the publication date

certificate :

the age certification

Since 0.2.3


grl_media_add_thumbnail ()

void                grl_media_add_thumbnail             (GrlMedia *media,
                                                         const gchar *thumbnail);

Adds a new thumbnail to media.

media :

a GrlMedia

thumbnail :

a thumbnail for media

Since 0.1.10


grl_media_add_thumbnail_binary ()

void                grl_media_add_thumbnail_binary      (GrlMedia *media,
                                                         const guint8 *thumbnail,
                                                         gsize size);

Adds a new thumbnail to media.

media :

a GrlMedia

thumbnail :

a buffer containing the thumbnail for media

size :

size of buffer

Since 0.1.10


grl_media_add_url_data ()

void                grl_media_add_url_data              (GrlMedia *media,
                                                         const gchar *url,
                                                         const gchar *mime);

Adds a new media's URL with its mime-type.

media :

a GrlMedia

url :

a media's URL

mime :

th url mime type

Since 0.1.10


grl_media_get_author ()

const gchar *       grl_media_get_author                (GrlMedia *media);

media :

the media object

Returns :

the media's author

Since 0.1.4


grl_media_get_author_nth ()

const gchar *       grl_media_get_author_nth            (GrlMedia *media,
                                                         guint index);

media :

the media object

index :

element to retrieve

Returns :

the n-th media's author.

Since 0.1.10


grl_media_get_certificate ()

const gchar *       grl_media_get_certificate           (GrlMedia *media);

Returns the media's first age certificate. This should usually be the media's most relevant age certificate. Use grl_media_get_region_data_nth() to get other age certificates.

media :

the media object

Returns :

the media's age certification

Since 0.1.6


grl_media_get_creation_date ()

GDateTime *         grl_media_get_creation_date         (GrlMedia *media);

media :

the media

Returns :

date when media was created (owned by media). [transfer none]

Since 0.2.0


grl_media_get_description ()

const gchar *       grl_media_get_description           (GrlMedia *media);

media :

the media object

Returns :

the media's description

Since 0.1.4


grl_media_get_duration ()

gint                grl_media_get_duration              (GrlMedia *media);

media :

the media object

Returns :

the media's duration

Since 0.1.4


grl_media_get_external_url ()

const gchar *       grl_media_get_external_url          (GrlMedia *media);

media :

the media object

Returns :

URL of an external location where the user play the media.

Since 0.1.6


grl_media_get_external_url_nth ()

const gchar *       grl_media_get_external_url_nth      (GrlMedia *media,
                                                         guint index);

media :

the media object

index :

element to retrieve

Returns :

the n-th media's external location where the user can play it.

Since 0.1.10


grl_media_get_id ()

const gchar *       grl_media_get_id                    (GrlMedia *media);

media :

the media object

Returns :

the media's identifier

Since 0.1.4


grl_media_get_keyword ()

const gchar *       grl_media_get_keyword               (GrlMedia *media);

media :

a GrlMedia

Returns :

the keyword describing the media (owned by media). [transfer none]

Since 0.2.3


grl_media_get_keyword_nth ()

const gchar *       grl_media_get_keyword_nth           (GrlMedia *media,
                                                         guint index);

media :

a GrlMedia

index :

element to retrieve

Returns :

the keyword describing the media (owned by media). [transfer none]

Since 0.2.3


grl_media_get_last_played ()

const gchar *       grl_media_get_last_played           (GrlMedia *media);

media :

the media object

Returns :

the media's last played time

Since 0.1.4


grl_media_get_last_position ()

gint                grl_media_get_last_position         (GrlMedia *media);

media :

the media object

Returns :

the media's last_played position (in seconds)

Since 0.1.4


grl_media_get_license ()

const gchar *       grl_media_get_license               (GrlMedia *media);

media :

the media object

Returns :

the license the media is under

Since 0.1.6


grl_media_get_mime ()

const gchar *       grl_media_get_mime                  (GrlMedia *media);

media :

the media object

Returns :

the media's mime-type

Since 0.1.4


grl_media_get_modification_date ()

GDateTime *         grl_media_get_modification_date     (GrlMedia *media);

media :

the media

Returns :

date when the media was last modified (owned by media). [transfer none]

Since 0.2.0


grl_media_get_play_count ()

gint                grl_media_get_play_count            (GrlMedia *media);

media :

the media object

Returns :

the media's play count

Since 0.1.4


grl_media_get_player ()

const gchar *       grl_media_get_player                (GrlMedia *media);

media :

the media object

Returns :

URL of an external player object for this media

Since 0.1.6


grl_media_get_player_nth ()

const gchar *       grl_media_get_player_nth            (GrlMedia *media,
                                                         guint index);

media :

the media object

index :

element to retrieve

Returns :

the n-th media's external player object.

Since 0.1.10


grl_media_get_publication_date ()

GDateTime *         grl_media_get_publication_date      (GrlMedia *media);

media :

the media object

Returns :

the publication date of media (owned by media). [transfer none]

Since 0.2.0


grl_media_get_rating ()

gfloat              grl_media_get_rating                (GrlMedia *media);

media :

the media object

Returns :

the media's rating

Since 0.1.5


grl_media_get_region ()

const gchar *       grl_media_get_region                (GrlMedia *media);

media :

the media object

Returns :

the ISO-3166-1 of the region where the media was published (owned by media). [transfer none]

Since 0.2.3


grl_media_get_region_data ()

const gchar *       grl_media_get_region_data           (GrlMedia *media,
                                                         const GDateTime **publication_date,
                                                         const gchar **certificate);

Returns the media's age certificate and publication date for the first region. This should usually be the media's most relevant region. Use grl_media_get_region_data_nth() to get the age certificate and publication date for other regions.

media :

the media object

publication_date :

the publication date, or NULL to ignore. [out][transfer none]

certificate :

the age certification, or NULL to ignore. [out][transfer none]

Returns :

the ISO-3166-1 of the region where the media was published (owned by media). [transfer none]

Since 0.2.3


grl_media_get_region_data_nth ()

const gchar *       grl_media_get_region_data_nth       (GrlMedia *media,
                                                         guint index,
                                                         const GDateTime **publication_date,
                                                         const gchar **certificate);

Returns the media's age certificate and publication date for one region. Use grl_data_length() with GRL_METADATA_KEY_REGION to discover how many regions are available. For instance:

1
2
3
4
5
6
7
8
9
10
guint count = grl_data_length (GRL_DATA (media), GRL_METADATA_KEY_REGION);
guint i;
for (i = 0; i < count; ++i) {
  const GDateTime* publication_date = NULL;
  const gchar* certificate = NULL;
  const gchar* region =
    grl_media_get_region_data_nth (media, i,
      &publication_date, &certificate);
  ...
}

media :

the media object

index :

element to retrieve

publication_date :

the publication date, or NULL to ignore. [out][transfer none]

certificate :

the age certification, or NULL to ignore. [out][transfer none]

Returns :

the ISO-3166-1 of the region where the media was published (owned by media). [transfer none]

Since 0.2.3


grl_media_get_site ()

const gchar *       grl_media_get_site                  (GrlMedia *media);

media :

the media object

Returns :

the media's site

Since 0.1.4


grl_media_get_source ()

const gchar *       grl_media_get_source                (GrlMedia *media);

media :

the media object source

Returns :

the media's source

Since 0.1.4


grl_media_get_start_time ()

gfloat              grl_media_get_start_time            (GrlMedia *media);

media :

the media object

Returns :

the start time of the logical media resource inside the file containing it, in seconds.

Since 0.1.19


grl_media_get_studio ()

const gchar *       grl_media_get_studio                (GrlMedia *media);

media :

the media object

Returns :

the studio the media is from

Since 0.1.6


grl_media_get_thumbnail ()

const gchar *       grl_media_get_thumbnail             (GrlMedia *media);

media :

the media object

Returns :

the media's thumbnail URL

Since 0.1.4


grl_media_get_thumbnail_binary ()

const guint8 *      grl_media_get_thumbnail_binary      (GrlMedia *media,
                                                         gsize *size);

media :

the media object

size :

pointer to storing the thumbnail buffer size

Returns :

the media's thumbnail data and set size to the thumbnail buffer size

Since 0.1.9


grl_media_get_thumbnail_binary_nth ()

const guint8 *      grl_media_get_thumbnail_binary_nth  (GrlMedia *media,
                                                         gsize *size,
                                                         guint index);

media :

the media object

size :

pointer to store the thumbnail buffer size

index :

element to retrieve

Returns :

the n-th media's thumbnail binary and sets size to the thumbnail buffer size.

Since 0.1.10


grl_media_get_thumbnail_nth ()

const gchar *       grl_media_get_thumbnail_nth         (GrlMedia *media,
                                                         guint index);

media :

the media object

index :

element to retrieve

Returns :

the n-th media's thumbnail.

Since 0.1.10


grl_media_get_title ()

const gchar *       grl_media_get_title                 (GrlMedia *media);

media :

the media object

Returns :

the media's title

Since 0.1.4


grl_media_get_url ()

const gchar *       grl_media_get_url                   (GrlMedia *media);

media :

the media object

Returns :

the media's URL

Since 0.1.4


grl_media_get_url_data ()

const gchar *       grl_media_get_url_data              (GrlMedia *media,
                                                         gchar **mime);

media :

the media object

mime :

the mime-type, or NULL to ignore. [out][transfer none]

Returns :

the media's URL and its mime-type.

Since 0.1.10


grl_media_get_url_data_nth ()

const gchar *       grl_media_get_url_data_nth          (GrlMedia *media,
                                                         guint index,
                                                         gchar **mime);

media :

the media object

index :

element to retrieve

mime :

the mime-type, or NULL to ignore. [out][transfer none]

Returns :

the n-th media's URL and its mime-type.

Since 0.1.10


grl_media_serialize ()

gchar *             grl_media_serialize                 (GrlMedia *media);

Serializes a GrlMedia into a string. It does a basic serialization.

See grl_media_serialize_extended() to get more serialization approaches.

media :

a GrlMedia

Returns :

serialized media

Since 0.1.6


grl_media_serialize_extended ()

gchar *             grl_media_serialize_extended        (GrlMedia *media,
                                                         GrlMediaSerializeType serial_type,
                                                         ...);

Serializes a GrlMedia into a string.

See grl_media_unserialize() to recover back the GrlMedia from the string.

If serialization type is GRL_MEDIA_SERIALIZE_PARTIAL then it requires a GList with the properties to consider in serialization (id and source are always considered).

media :

a GrlMedia

serial_type :

type of serialization

... :

media keys to serialize

Returns :

serialized media

Since 0.1.6


grl_media_set_author ()

void                grl_media_set_author                (GrlMedia *media,
                                                         const gchar *author);

Set the media's author

media :

the media

author :

the media's author

Since 0.1.4


grl_media_set_certificate ()

void                grl_media_set_certificate           (GrlMedia *media,
                                                         const gchar *certificate);

Set the media's first age certification. This should usually be the media's most relevant age certificate. Use grl_media_set_region_data() to set other age certificates.

media :

the media

certificate :

The age certificate of the media

Since 0.1.6


grl_media_set_creation_date ()

void                grl_media_set_creation_date         (GrlMedia *media,
                                                         const GDateTime *creation_date);

Set the creation_date of the media

media :

the media

creation_date :

date when media was created

Since 0.2.0


grl_media_set_description ()

void                grl_media_set_description           (GrlMedia *media,
                                                         const gchar *description);

Set the media's description

media :

the media

description :

the description

Since 0.1.4


grl_media_set_duration ()

void                grl_media_set_duration              (GrlMedia *media,
                                                         gint duration);

Set the media's duration

media :

the media

duration :

the duration

Since 0.1.4


grl_media_set_external_player ()

void                grl_media_set_external_player       (GrlMedia *media,
                                                         const gchar *player);

Set the location of a player for the media (usually a flash player)

media :

the media

player :

location of an external player for this media

Since 0.1.6


grl_media_set_external_url ()

void                grl_media_set_external_url          (GrlMedia *media,
                                                         const gchar *url);

Set an external location where users can play the media

media :

the media

url :

external location where this media can be played.

Since 0.1.6


grl_media_set_id ()

void                grl_media_set_id                    (GrlMedia *media,
                                                         const gchar *id);

Set the media identifier

media :

the media

id :

the identifier of the media

Since 0.1.4


grl_media_set_keyword ()

void                grl_media_set_keyword               (GrlMedia *media,
                                                         const gchar *keyword);

Sets the keyword describing the media.

media :

a GrlMedia

keyword :

a keyword describing the media

Since 0.2.3


grl_media_set_last_played ()

void                grl_media_set_last_played           (GrlMedia *media,
                                                         const gchar *last_played);

Set the media last played date

media :

the media

last_played :

date when the media was last played

Since 0.1.4


grl_media_set_last_position ()

void                grl_media_set_last_position         (GrlMedia *media,
                                                         gint last_position);

Set the media last played position

media :

the media

last_position :

second at which the media playback was interrupted

Since 0.1.4


grl_media_set_license ()

void                grl_media_set_license               (GrlMedia *media,
                                                         const gchar *license);

Set the media license

media :

the media

license :

The license of the media

Since 0.1.6


grl_media_set_mime ()

void                grl_media_set_mime                  (GrlMedia *media,
                                                         const gchar *mime);

Set the media's mime-type

media :

the media

mime :

the mime type

Since 0.1.4


grl_media_set_modification_date ()

void                grl_media_set_modification_date     (GrlMedia *media,
                                                         const GDateTime *modification_date);

Set the modification date of the media

media :

the media

modification_date :

date when the media was last modified

Since 0.2.0


grl_media_set_play_count ()

void                grl_media_set_play_count            (GrlMedia *media,
                                                         gint play_count);

Set the media play count

media :

the media

play_count :

the play count

Since 0.1.4


grl_media_set_publication_date ()

void                grl_media_set_publication_date      (GrlMedia *media,
                                                         const GDateTime *date);

Set the publication date of media.

media :

the media

date :

the date

Since 0.2.0


grl_media_set_rating ()

void                grl_media_set_rating                (GrlMedia *media,
                                                         gfloat rating,
                                                         gfloat max);

This method receives a rating and its scale and normalizes it on a scale from 0...5 to match the usual five-star rating.

media :

a media

rating :

a rating value

max :

maximum rating value

Since 0.1.5


grl_media_set_region ()

void                grl_media_set_region                (GrlMedia *media,
                                                         const gchar *region);

Sets the region where media was published.

media :

a GrlMedia

region :

the region's ISO-3166-1 code

Since 0.2.3


grl_media_set_region_data ()

void                grl_media_set_region_data           (GrlMedia *media,
                                                         const gchar *region,
                                                         const GDateTime *publication_date,
                                                         const gchar *certificate);

Sets regional publication and certification information for region.

media :

a GrlMedia

region :

the region's ISO-3166-1 code

publication_date :

the publication date

certificate :

the age certification

Since 0.2.3


grl_media_set_site ()

void                grl_media_set_site                  (GrlMedia *media,
                                                         const gchar *site);

Set the media's site. A site is a website about the media such as a studio's promotional website for a movie.

media :

the media

site :

the site

Since 0.1.4


grl_media_set_source ()

void                grl_media_set_source                (GrlMedia *media,
                                                         const gchar *source);

Set the media's source

media :

the media

source :

the source

Since 0.1.4


grl_media_set_studio ()

void                grl_media_set_studio                (GrlMedia *media,
                                                         const gchar *studio);

Set the media studio

media :

the media

studio :

The studio the media is from

Since 0.1.6


grl_media_set_thumbnail ()

void                grl_media_set_thumbnail             (GrlMedia *media,
                                                         const gchar *thumbnail);

Set the media's thumbnail URL

media :

the media

thumbnail :

the thumbnail URL

Since 0.1.4


grl_media_set_thumbnail_binary ()

void                grl_media_set_thumbnail_binary      (GrlMedia *media,
                                                         const guint8 *thumbnail,
                                                         gsize size);

Set the media's binary thumbnail

media :

the media

thumbnail :

thumbnail buffer

size :

thumbnail buffer size

Since 0.1.9


grl_media_set_title ()

void                grl_media_set_title                 (GrlMedia *media,
                                                         const gchar *title);

Set the media's title

media :

the media

title :

the title

Since 0.1.4


grl_media_set_url ()

void                grl_media_set_url                   (GrlMedia *media,
                                                         const gchar *url);

Set the media's URL

media :

the media

url :

the media's URL

Since 0.1.4


grl_media_set_url_data ()

void                grl_media_set_url_data              (GrlMedia *media,
                                                         const gchar *url,
                                                         const gchar *mime);

Set the media's URL and its mime-type.

media :

a GrlMedia

url :

the media's URL

mime :

the url mime type

Since 0.1.10


grl_media_unserialize ()

GrlMedia *          grl_media_unserialize               (const gchar *serial);

Unserializes a GrlMedia.

serial :

a serialized media

Returns :

the GrlMedia from the serial. [transfer full]

Since 0.1.6

See Also

GrlData, GrlMediaBox, GrlMediaVideo, GrlMediaAudio, GrlMediaImage