GrlMediaBox

GrlMediaBox — A container for multiple medias

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GrlData
        ╰── GrlMedia
            ╰── GrlMediaBox

Includes

#include <grilo.h>

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.

Functions

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.

Parameters

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.

Parameters

box

the media box instance

 

childcount

number of children

 

Since 0.1.4

Types and Values

struct GrlMediaBox

struct GrlMediaBox;

struct GrlMediaBoxClass

struct GrlMediaBoxClass {
  GrlMediaClass parent_class;
};

Grilo Media box Class

Members

GrlMediaClass parent_class;

the parent class structure

 

See Also

GrlMedia, GrlMediaVideo, GrlMediaAudio, GrlMediaImage