MP4v2
|
Classes | |
struct | MP4Chapter_s |
Chapter item. More... | |
Macros | |
#define | MP4V2_CHAPTER_TITLE_MAX 1023 |
The maximum length of a QuickTime chapter title (in 8-bit chars) | |
Typedefs | |
typedef struct MP4Chapter_s | MP4Chapter_t |
Chapter item. More... | |
Enumerations | |
enum | MP4ChapterType { MP4ChapterTypeNone = 0, MP4ChapterTypeAny = 1, MP4ChapterTypeQt = 2, MP4ChapterTypeNero = 4 } |
Known chapter types. More... | |
Functions | |
void | MP4AddChapter (MP4FileHandle hFile, MP4TrackId chapterTrackId, MP4Duration chapterDuration, const char *chapterTitle=0) |
Add a QuickTime chapter. More... | |
MP4TrackId | MP4AddChapterTextTrack (MP4FileHandle hFile, MP4TrackId refTrackId, uint32_t timescale=0) |
Add a QuickTime chapter track. More... | |
void | MP4AddNeroChapter (MP4FileHandle hFile, MP4Timestamp chapterStart, const char *chapterTitle=0) |
Add a Nero chapter. More... | |
MP4ChapterType | MP4ConvertChapters (MP4FileHandle hFile, MP4ChapterType toChapterType=MP4ChapterTypeQt) |
Convert chapters to another type. More... | |
MP4ChapterType | MP4DeleteChapters (MP4FileHandle hFile, MP4ChapterType chapterType=MP4ChapterTypeQt, MP4TrackId chapterTrackId=MP4_INVALID_TRACK_ID) |
Delete chapters. More... | |
MP4ChapterType | MP4GetChapters (MP4FileHandle hFile, MP4Chapter_t **chapterList, uint32_t *chapterCount, MP4ChapterType chapterType=MP4ChapterTypeQt) |
Get list of chapters. More... | |
MP4ChapterType | MP4SetChapters (MP4FileHandle hFile, MP4Chapter_t *chapterList, uint32_t chapterCount, MP4ChapterType chapterType=MP4ChapterTypeQt) |
Set list of chapters OKOK. More... | |
typedef struct MP4Chapter_s MP4Chapter_t |
Chapter item.
This item defines various attributes for a chapter.
enum MP4ChapterType |
void MP4AddChapter | ( | MP4FileHandle | hFile, |
MP4TrackId | chapterTrackId, | ||
MP4Duration | chapterDuration, | ||
const char * | chapterTitle = 0 |
||
) |
Add a QuickTime chapter.
This function adds a QuickTime chapter to file hFile.
hFile | handle of file to add chapter. |
chapterTrackId | ID of chapter track or MP4_INVALID_TRACK_ID if unknown. |
chapterDuration | duration (in the timescale of the chapter track). |
chapterTitle | title text for the chapter or NULL to use default title format ("Chapter %03d", n) where n is the chapter number. |
MP4TrackId MP4AddChapterTextTrack | ( | MP4FileHandle | hFile, |
MP4TrackId | refTrackId, | ||
uint32_t | timescale = 0 |
||
) |
Add a QuickTime chapter track.
This function adds a chapter (text) track to file hFile. The optional parameter timescale may be supplied to give the new chapter a specific timescale. Otherwise the chapter track will have the same timescale as the reference track defined in parameter refTrackId.
hFile | handle of file to add chapter track. |
refTrackId | ID of the track that will reference the chapter track. |
timescale | the timescale of the chapter track or 0 to use the timescale of track specified by refTrackId. |
void MP4AddNeroChapter | ( | MP4FileHandle | hFile, |
MP4Timestamp | chapterStart, | ||
const char * | chapterTitle = 0 |
||
) |
Add a Nero chapter.
This function adds a Nero chapter to file hFile.
hFile | handle of file to add chapter. |
chapterStart | the start time of the chapter in 100 nanosecond units |
chapterTitle | title text for the chapter or NULL to use default title format ("Chapter %03d", n) where n is the chapter number. |
MP4ChapterType MP4ConvertChapters | ( | MP4FileHandle | hFile, |
MP4ChapterType | toChapterType = MP4ChapterTypeQt |
||
) |
Convert chapters to another type.
This function converts existing chapters in file hFile from one type to another type. Conversion from Nero to QuickTime or QuickTime to Nero is supported.
hFile | handle of file to convert. |
toChapterType | the chapter type to convert to:
|
MP4ChapterType MP4DeleteChapters | ( | MP4FileHandle | hFile, |
MP4ChapterType | chapterType = MP4ChapterTypeQt , |
||
MP4TrackId | chapterTrackId = MP4_INVALID_TRACK_ID |
||
) |
Delete chapters.
This function deletes existing chapters in file hFile.
hFile | handle of file to delete chapters. |
chapterType | the type of chapters to delete:
|
chapterTrackId | ID of the chapter track if known, or MP4_INVALID_TRACK_ID. Only applies when chapterType=MP4ChapterTypeQt. |
MP4ChapterType MP4GetChapters | ( | MP4FileHandle | hFile, |
MP4Chapter_t ** | chapterList, | ||
uint32_t * | chapterCount, | ||
MP4ChapterType | chapterType = MP4ChapterTypeQt |
||
) |
Get list of chapters.
This function gets a chpter list from file hFile.
hFile | handle of file to read. |
chapterList | address receiving array of chapter items. If a non-NULL is received the caller is responsible for freeing the memory with MP4Free(). |
chapterCount | address receiving count of items in array. |
chapterType | the type of chapters to read:
|
MP4ChapterType MP4SetChapters | ( | MP4FileHandle | hFile, |
MP4Chapter_t * | chapterList, | ||
uint32_t | chapterCount, | ||
MP4ChapterType | chapterType = MP4ChapterTypeQt |
||
) |
Set list of chapters OKOK.
This functions sets the complete chapter list in file hFile. If any chapters of the same type already exist they will first be deleted.
hFile | handle of file to modify. |
chapterList | array of chapters items. |
chapterCount | count of items in array. |
chapterType | type of chapters to write:
|