GrlMediaBox

GrlMediaBox — A container for multiple medias

Synopsis

#include <grilo.h>

struct              GrlMediaBox;
struct              GrlMediaBoxClass;
GrlMedia *          grl_media_box_new                   (void);
gint                grl_media_box_get_childcount        (GrlMediaBox *box);
void                grl_media_box_set_childcount        (GrlMediaBox *box,
                                                         gint childcount);

Object Hierarchy

  GObject
   +----GrlData
         +----GrlMedia
               +----GrlMediaBox

Description

This high level class represents a container for multiple medias.

Usually, when you get a media, it is either an Image, a Video or a Music file, but when you create a hierarchy, for instance

ROOT -> <artist> -> <album> -> <media>

the medias are only the leaf nodes, but which kind of "media" is an album?

GrlMediaBox is used to represent this kind of nodes: it is a "box" which can be browsed to get the medias (or other boxes) under it.

In fact, you can only browse through media-boxes.

Details

struct GrlMediaBox

struct GrlMediaBox;

struct GrlMediaBoxClass

struct GrlMediaBoxClass {
  GrlMediaClass parent_class;
};

Grilo Media box Class

GrlMediaClass parent_class;

the parent class structure

grl_media_box_new ()

GrlMedia *          grl_media_box_new                   (void);

Creates a new data box object.

Returns :

a newly-allocated data box.

Since 0.1.4


grl_media_box_get_childcount ()

gint                grl_media_box_get_childcount        (GrlMediaBox *box);

Number of children of this box.

box :

the media box instance

Returns :

number of children, or GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN if unknown.

Since 0.1.4


grl_media_box_set_childcount ()

void                grl_media_box_set_childcount        (GrlMediaBox *box,
                                                         gint childcount);

Sets the number of children of this box. Use GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN if it is unknown.

box :

the media box instance

childcount :

number of children

Since 0.1.4

See Also

GrlMedia, GrlMediaVideo, GrlMediaAudio, GrlMediaImage