MP4v2

chapter.h
1#ifndef MP4V2_CHAPTER_H
2#define MP4V2_CHAPTER_H
3
4/**************************************************************************/
13#define MP4V2_CHAPTER_TITLE_MAX 1023
14
19 typedef struct MP4Chapter_s {
20 MP4Duration duration;
21 char title[MP4V2_CHAPTER_TITLE_MAX+1];
22} MP4Chapter_t;
23
27 typedef enum {
28 MP4ChapterTypeNone = 0,
29 MP4ChapterTypeAny = 1,
30 MP4ChapterTypeQt = 2,
31 MP4ChapterTypeNero = 4
32} MP4ChapterType;
33
45MP4V2_EXPORT
46 void MP4AddChapter(
47 MP4FileHandle hFile,
48 MP4TrackId chapterTrackId,
49 MP4Duration chapterDuration,
50 const char* chapterTitle DEFAULT(0));
51
66MP4V2_EXPORT
67MP4TrackId MP4AddChapterTextTrack(
68 MP4FileHandle hFile,
69 MP4TrackId refTrackId,
70 uint32_t timescale DEFAULT(0) );
71
81MP4V2_EXPORT
82 void MP4AddNeroChapter(
83 MP4FileHandle hFile,
84 MP4Timestamp chapterStart,
85 const char* chapterTitle DEFAULT(0));
86
102MP4V2_EXPORT
103 MP4ChapterType MP4ConvertChapters(
104 MP4FileHandle hFile,
105 MP4ChapterType toChapterType DEFAULT(MP4ChapterTypeQt));
106
122MP4V2_EXPORT
123 MP4ChapterType MP4DeleteChapters(
124 MP4FileHandle hFile,
125 MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt),
126 MP4TrackId chapterTrackId DEFAULT(MP4_INVALID_TRACK_ID) );
127
144MP4V2_EXPORT
145 MP4ChapterType MP4GetChapters(
146 MP4FileHandle hFile,
147 MP4Chapter_t** chapterList,
148 uint32_t* chapterCount,
149 MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt));
150
167MP4V2_EXPORT
168 MP4ChapterType MP4SetChapters(
169 MP4FileHandle hFile,
170 MP4Chapter_t* chapterList,
171 uint32_t chapterCount,
172 MP4ChapterType chapterType DEFAULT(MP4ChapterTypeQt));
173
176#endif /* MP4V2_CHAPTER_H */
MP4AddChapterTextTrack
MP4TrackId MP4AddChapterTextTrack(MP4FileHandle hFile, MP4TrackId refTrackId, uint32_t timescale=0)
Add a QuickTime chapter track.
MP4DeleteChapters
MP4ChapterType MP4DeleteChapters(MP4FileHandle hFile, MP4ChapterType chapterType=MP4ChapterTypeQt, MP4TrackId chapterTrackId=MP4_INVALID_TRACK_ID)
Delete chapters.
MP4AddChapter
void MP4AddChapter(MP4FileHandle hFile, MP4TrackId chapterTrackId, MP4Duration chapterDuration, const char *chapterTitle=0)
Add a QuickTime chapter.
MP4SetChapters
MP4ChapterType MP4SetChapters(MP4FileHandle hFile, MP4Chapter_t *chapterList, uint32_t chapterCount, MP4ChapterType chapterType=MP4ChapterTypeQt)
Set list of chapters OKOK.
MP4V2_CHAPTER_TITLE_MAX
#define MP4V2_CHAPTER_TITLE_MAX
The maximum length of a QuickTime chapter title (in 8-bit chars)
Definition: chapter.h:13
MP4GetChapters
MP4ChapterType MP4GetChapters(MP4FileHandle hFile, MP4Chapter_t **chapterList, uint32_t *chapterCount, MP4ChapterType chapterType=MP4ChapterTypeQt)
Get list of chapters.
MP4Chapter_t
struct MP4Chapter_s MP4Chapter_t
Chapter item.
MP4AddNeroChapter
void MP4AddNeroChapter(MP4FileHandle hFile, MP4Timestamp chapterStart, const char *chapterTitle=0)
Add a Nero chapter.
MP4ChapterType
MP4ChapterType
Known chapter types.
Definition: chapter.h:27
MP4ConvertChapters
MP4ChapterType MP4ConvertChapters(MP4FileHandle hFile, MP4ChapterType toChapterType=MP4ChapterTypeQt)
Convert chapters to another type.
MP4ChapterTypeNone
@ MP4ChapterTypeNone
no chapters found return value
Definition: chapter.h:28
MP4ChapterTypeNero
@ MP4ChapterTypeNero
Nero chapter type.
Definition: chapter.h:31
MP4ChapterTypeAny
@ MP4ChapterTypeAny
any or all known chapter types
Definition: chapter.h:29
MP4ChapterTypeQt
@ MP4ChapterTypeQt
QuickTime chapter type.
Definition: chapter.h:30
MP4_INVALID_TRACK_ID
#define MP4_INVALID_TRACK_ID
Constant: invalid MP4TrackId.
Definition: general.h:49
MP4Chapter_s
Chapter item.
Definition: chapter.h:19
MP4Chapter_s::title
char title[1023+1]
title of chapter
Definition: chapter.h:21
MP4Chapter_s::duration
MP4Duration duration
duration of chapter in milliseconds
Definition: chapter.h:20