00001 /***************************************************************** 00002 * gavl - a general purpose audio/video processing library 00003 * 00004 * Copyright (c) 2001 - 2012 Members of the Gmerlin project 00005 * gmerlin-general@lists.sourceforge.net 00006 * http://gmerlin.sourceforge.net 00007 * 00008 * This program is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation, either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * *****************************************************************/ 00021 00022 #ifndef GAVL_CHAPTERLIST_H_INCLUDED 00023 #define GAVL_CHAPTERLIST_H_INCLUDED 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00029 #include <gavl/gavldefs.h> 00030 00046 typedef struct 00047 { 00048 uint32_t num_chapters; 00049 uint32_t timescale; 00050 struct 00051 { 00052 int64_t time; 00053 char * name; 00054 } * chapters; 00055 } gavl_chapter_list_t; 00056 00061 GAVL_PUBLIC 00062 gavl_chapter_list_t * gavl_chapter_list_create(int num_chapters); 00063 00068 GAVL_PUBLIC 00069 gavl_chapter_list_t * gavl_chapter_list_copy(const gavl_chapter_list_t * list); 00070 00071 00076 GAVL_PUBLIC 00077 void gavl_chapter_list_destroy(gavl_chapter_list_t * list); 00085 GAVL_PUBLIC 00086 void gavl_chapter_list_insert(gavl_chapter_list_t * list, int index, 00087 int64_t time, const char * name); 00088 00094 GAVL_PUBLIC 00095 void gavl_chapter_list_delete(gavl_chapter_list_t * list, int index); 00096 00097 00107 GAVL_PUBLIC 00108 int gavl_chapter_list_get_current(gavl_chapter_list_t * list, 00109 gavl_time_t time); 00110 00121 GAVL_PUBLIC 00122 int gavl_chapter_list_changed(gavl_chapter_list_t * list, 00123 gavl_time_t time, int * current_chapter); 00124 00131 GAVL_PUBLIC 00132 void gavl_chapter_list_dump(const gavl_chapter_list_t * list); 00133 00138 #ifdef __cplusplus 00139 } 00140 #endif 00141 00142 #endif // GAVL_CHAPTERLIST_H_INCLUDED