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