summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-17 11:40:55 +0100
committerAnton Khirnov <anton@khirnov.net>2024-02-07 11:46:55 +0100
commitd0993ee3f0f49c948468cfac0ca5b2896bfd4b71 (patch)
tree75bb132f173016470db7833bfb747e252026b140
parentf80d91c05112fede33b230459baeb92912e33bb8 (diff)
lavf: add ts_flags
-rw-r--r--libavformat/avformat.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 5d0fe82250..b629640f27 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -833,6 +833,34 @@ const char *av_disposition_to_string(int disposition);
#define AV_PTS_WRAP_ADD_OFFSET 1 ///< add the format specific offset on wrap detection
#define AV_PTS_WRAP_SUB_OFFSET -1 ///< subtract the format specific offset on wrap detection
+enum AVFormatTSFlags {
+ /**
+ * Video only. Frame rate information is stored in the container, exported
+ * in AVStream.avg_frame_rate.
+ */
+ AVFORMAT_TS_FLAG_RATE = (1 << 0),
+
+ /**
+ * Presentation timestamps are stored in the container.
+ */
+ AVFORMAT_TS_FLAG_PTS = (1 << 1),
+
+ /**
+ * Decoding timestamps are stored in the container.
+ */
+ AVFORMAT_TS_FLAG_DTS = (1 << 2),
+
+ /**
+ * Packet durations are stored in the container.
+ */
+ AVFORMAT_TS_FLAG_DURATION = (1 << 3),
+
+ /**
+ * The timestamps (PTS, DTS, durations) may be missing for some of the packets.
+ */
+ AVFORMAT_TS_FLAG_SPARSE = (1 << 4),
+};
+
/**
* Stream structure.
* New fields can be added to the end with minor version bumps.
@@ -1016,6 +1044,14 @@ typedef struct AVStream {
*
*/
int pts_wrap_bits;
+
+ /**
+ * Flags indicating how the timestamps are stored in the file for this
+ * stream, a combination of AVFORMAT_TS_FLAG_*.
+ *
+ * Demuxing only, set by the demuxer on stream creation.
+ */
+ unsigned ts_flags;
} AVStream;
enum AVStreamGroupParamsType {