22#ifndef GAVL_CHAPTERLIST_H_INCLUDED
23#define GAVL_CHAPTERLIST_H_INCLUDED
29#include <gavl/gavldefs.h>
87 int64_t time,
const char * name);
GAVL_PUBLIC void gavl_chapter_list_destroy(gavl_chapter_list_t *list)
Destroy chapter list.
GAVL_PUBLIC void gavl_chapter_list_dump(const gavl_chapter_list_t *list)
Dump a chapter list to stderr.
GAVL_PUBLIC int gavl_chapter_list_changed(gavl_chapter_list_t *list, gavl_time_t time, int *current_chapter)
Get current chapter.
GAVL_PUBLIC gavl_chapter_list_t * gavl_chapter_list_copy(const gavl_chapter_list_t *list)
Copy chapter list.
GAVL_PUBLIC void gavl_chapter_list_insert(gavl_chapter_list_t *list, int index, int64_t time, const char *name)
Insert a chapter into a chapter list.
GAVL_PUBLIC void gavl_chapter_list_delete(gavl_chapter_list_t *list, int index)
Delete a chapter from a chapter list.
GAVL_PUBLIC int gavl_chapter_list_get_current(gavl_chapter_list_t *list, gavl_time_t time)
Get current chapter.
GAVL_PUBLIC gavl_chapter_list_t * gavl_chapter_list_create(int num_chapters)
Create chapter list.
int64_t gavl_time_t
Times in gavl are 64 bit signed integers.
Definition: gavltime.h:53
Chapter list.
Definition: chapterlist.h:47
int64_t time
Start time (seekpoint) of this chapter.
Definition: chapterlist.h:52
uint32_t timescale
Scale of the timestamps.
Definition: chapterlist.h:49
char * name
Name for this chapter (or NULL if unavailable)
Definition: chapterlist.h:53
uint32_t num_chapters
Number of chapters.
Definition: chapterlist.h:48