libgpod Reference Manual | ||||
---|---|---|---|---|
Itdb_Chapter; Itdb_Chapterdata; Itdb_Chapter* itdb_chapter_new (void); Itdb_Chapter* itdb_chapter_duplicate (Itdb_Chapter *chapter); void itdb_chapter_free (Itdb_Chapter *chapter); Itdb_Chapterdata* itdb_chapterdata_new (void); gboolean itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata, gint32 startpos, gchar *chaptertitle); Itdb_Chapterdata* itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata); void itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter); void itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata); void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata);
Chapters allow for a large file to be divided into sections. The start and stop points in the track are defined here, as well as the title for each chapter.
typedef struct { guint32 startpos; gchar *chaptertitle; /* reserved for future use */ gint32 reserved_int1; gint32 reserved_int2; gpointer reserved1; gpointer reserved2; } Itdb_Chapter;
Structure representing an iTunesDB Chapter
guint32 |
The start position of the chapter in ms. The first chapter begins at 1. |
gchar * |
The chapter title in UTF8 |
gint32 |
Reserved for future use |
gint32 |
Reserved for future use |
gpointer |
Reserved for future use |
gpointer |
Reserved for future use |
Since 0.7.0
typedef struct { GList *chapters; guint32 unk024; guint32 unk028; guint32 unk032; /* reserved for future use */ gint32 reserved_int1; gint32 reserved_int2; gpointer reserved1; gpointer reserved2; } Itdb_Chapterdata;
Structure representing iTunesDB Chapter data
GList * |
A list of chapters (Itdb_Chapter) |
guint32 |
Unknown |
guint32 |
Unknown |
guint32 |
Unknown |
gint32 |
Reserved for future use |
gint32 |
Reserved for future use |
gpointer |
Reserved for future use |
gpointer |
Reserved for future use |
Since 0.7.0
Itdb_Chapter* itdb_chapter_new (void);
Creates a new Itdb_Chapter
Returns : |
newly allocated Itdb_Chapter to be freed with itdb_chapter_free()
after use
|
Since 0.7.0
Itdb_Chapter* itdb_chapter_duplicate (Itdb_Chapter *chapter);
Duplicates the data contained in chapter
|
an Itdb_Chapter |
Returns : |
a newly allocated copy of chapter to be freed with
itdb_chapter_free() after use
|
Since 0.7.0
void itdb_chapter_free (Itdb_Chapter *chapter);
Frees the memory used by chapter
|
an Itdb_Chapter |
Since 0.7.0
Itdb_Chapterdata* itdb_chapterdata_new (void);
Creates a new Itdb_Chapterdata
Returns : |
a new Itdb_Chapterdata to be freed with
itdb_chapterdata_free() when no longer needed
|
Since 0.7.0
gboolean itdb_chapterdata_add_chapter (Itdb_Chapterdata *chapterdata, gint32 startpos, gchar *chaptertitle);
Appends a chapter to existing chapters in chapterdata
.
|
an Itdb_Chapterdata |
|
chapter start time in milliseconds |
|
chapter title |
Returns : |
TRUE if the chapter could be successfully added, FALSE otherwise. |
Since 0.7.0
Itdb_Chapterdata* itdb_chapterdata_duplicate (Itdb_Chapterdata *chapterdata);
Duplicates chapterdata
|
an Itdb_Chapterdata |
Returns : |
a new copy of chapterdata
|
Since 0.7.0
void itdb_chapterdata_remove_chapter (Itdb_Chapterdata *chapterdata, Itdb_Chapter *chapter);
Removes chapter
from chapterdata
. The memory used by chapter
is freed.
|
an Itdb_Chapterdata |
|
an Itdb_Chapter |
Since 0.7.0
void itdb_chapterdata_remove_chapters (Itdb_Chapterdata *chapterdata);
Removes all chapters from chapterdata
|
an Itdb_Chapterdata |
Since 0.7.0
void itdb_chapterdata_free (Itdb_Chapterdata *chapterdata);
Frees memory used by chapterdata
|
an Itdb_Chapterdata |
Since 0.7.0