summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorAnton Khirnov <wyskas@gmail.com>2008-05-22 22:00:21 +0000
committerAurelien Jacobs <aurel@gnuage.org>2008-05-22 22:00:21 +0000
commit79d7836a5e213d547629555e3f1157e7197aef68 (patch)
tree9a21cfbcdb010a9a5ab271520aaca3fe2c8102e5 /libavformat/avformat.h
parentd311f8f3e3425369bc98574c11677ab6755d2f69 (diff)
add support for chapters definition in lavf
patch by Anton Khirnov wyskas _at_ gmail _dot_ com Originally committed as revision 13240 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3c67bdb5ba..17f317e2d0 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -22,7 +22,7 @@
#define FFMPEG_AVFORMAT_H
#define LIBAVFORMAT_VERSION_MAJOR 52
-#define LIBAVFORMAT_VERSION_MINOR 13
+#define LIBAVFORMAT_VERSION_MINOR 14
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
@@ -389,6 +389,11 @@ typedef struct AVProgram {
#define AVFMTCTX_NOHEADER 0x0001 /**< signal that no header is present
(streams are added dynamically) */
+typedef struct AVChapter {
+ int64_t start, end; /**< chapter start/end time in AV_TIME_BASE units */
+ char *title; /**< chapter title */
+} AVChapter;
+
#define MAX_STREAMS 20
/**
@@ -514,6 +519,9 @@ typedef struct AVFormatContext {
* obtained from real-time capture devices.
*/
unsigned int max_picture_buffer;
+
+ int num_chapters;
+ AVChapter **chapters;
} AVFormatContext;
typedef struct AVPacketList {
@@ -745,6 +753,18 @@ AVStream *av_new_stream(AVFormatContext *s, int id);
AVProgram *av_new_program(AVFormatContext *s, int id);
/**
+ * Add a new chapter.
+ * This function is NOT part of the public API
+ * and should be ONLY used by demuxers.
+ *
+ * @param s media file handle
+ * @param start chapter start time in AV_TIME_BASE units
+ * @param end chapter end time in AV_TIME_BASE units
+ * @param title chapter title
+ */
+int ff_new_chapter(AVFormatContext *s, int64_t start, int64_t end, const char *title);
+
+/**
* Set the pts for a given stream.
*
* @param s stream