Mercurial > libavformat.hg
comparison avformat.h @ 3314:724f338005d4 libavformat
add support for chapters definition in lavf
patch by Anton Khirnov wyskas _at_ gmail _dot_ com
author | aurel |
---|---|
date | Thu, 22 May 2008 22:00:21 +0000 |
parents | bda0941921fe |
children | d3d68f5f388f |
comparison
equal
deleted
inserted
replaced
3313:8e83e0b76105 | 3314:724f338005d4 |
---|---|
20 | 20 |
21 #ifndef FFMPEG_AVFORMAT_H | 21 #ifndef FFMPEG_AVFORMAT_H |
22 #define FFMPEG_AVFORMAT_H | 22 #define FFMPEG_AVFORMAT_H |
23 | 23 |
24 #define LIBAVFORMAT_VERSION_MAJOR 52 | 24 #define LIBAVFORMAT_VERSION_MAJOR 52 |
25 #define LIBAVFORMAT_VERSION_MINOR 13 | 25 #define LIBAVFORMAT_VERSION_MINOR 14 |
26 #define LIBAVFORMAT_VERSION_MICRO 0 | 26 #define LIBAVFORMAT_VERSION_MICRO 0 |
27 | 27 |
28 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ | 28 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
29 LIBAVFORMAT_VERSION_MINOR, \ | 29 LIBAVFORMAT_VERSION_MINOR, \ |
30 LIBAVFORMAT_VERSION_MICRO) | 30 LIBAVFORMAT_VERSION_MICRO) |
387 } AVProgram; | 387 } AVProgram; |
388 | 388 |
389 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present | 389 #define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present |
390 (streams are added dynamically) */ | 390 (streams are added dynamically) */ |
391 | 391 |
392 typedef struct AVChapter { | |
393 int64_t start, end; /**< chapter start/end time in AV_TIME_BASE units */ | |
394 char *title; /**< chapter title */ | |
395 } AVChapter; | |
396 | |
392 #define MAX_STREAMS 20 | 397 #define MAX_STREAMS 20 |
393 | 398 |
394 /** | 399 /** |
395 * format I/O context. | 400 * format I/O context. |
396 * New fields can be added to the end with minor version bumps. | 401 * New fields can be added to the end with minor version bumps. |
512 /** | 517 /** |
513 * Maximum amount of memory in bytes to use for buffering frames | 518 * Maximum amount of memory in bytes to use for buffering frames |
514 * obtained from real-time capture devices. | 519 * obtained from real-time capture devices. |
515 */ | 520 */ |
516 unsigned int max_picture_buffer; | 521 unsigned int max_picture_buffer; |
522 | |
523 int num_chapters; | |
524 AVChapter **chapters; | |
517 } AVFormatContext; | 525 } AVFormatContext; |
518 | 526 |
519 typedef struct AVPacketList { | 527 typedef struct AVPacketList { |
520 AVPacket pkt; | 528 AVPacket pkt; |
521 struct AVPacketList *next; | 529 struct AVPacketList *next; |
741 * @param s media file handle | 749 * @param s media file handle |
742 * @param id file format dependent stream id | 750 * @param id file format dependent stream id |
743 */ | 751 */ |
744 AVStream *av_new_stream(AVFormatContext *s, int id); | 752 AVStream *av_new_stream(AVFormatContext *s, int id); |
745 AVProgram *av_new_program(AVFormatContext *s, int id); | 753 AVProgram *av_new_program(AVFormatContext *s, int id); |
754 | |
755 /** | |
756 * Add a new chapter. | |
757 * This function is NOT part of the public API | |
758 * and should be ONLY used by demuxers. | |
759 * | |
760 * @param s media file handle | |
761 * @param start chapter start time in AV_TIME_BASE units | |
762 * @param end chapter end time in AV_TIME_BASE units | |
763 * @param title chapter title | |
764 */ | |
765 int ff_new_chapter(AVFormatContext *s, int64_t start, int64_t end, const char *title); | |
746 | 766 |
747 /** | 767 /** |
748 * Set the pts for a given stream. | 768 * Set the pts for a given stream. |
749 * | 769 * |
750 * @param s stream | 770 * @param s stream |