@@ -14,6 +14,9 @@ libavutil: 2021-04-27
API changes, most recent first:
+2022-06-xx - xxxxxxxxxx - lavf 59.26.100 - avformat.h
+ Add and set AVFormatContext.first_pkt_wallclock field.
+
2022-06-12 - xxxxxxxxxx - lavf 59.25.100 - avio.h
Add avio_vprintf(), similar to avio_printf() but allow to use it
from within a function taking a variable argument list as input.
@@ -1808,6 +1808,16 @@ typedef struct AVFormatContext {
*/
int max_probe_packets;
+ /**
+ * Wallclock start time of the stream in real world time, in microseconds
+ * since the Unix epoch (00:00 1st January 1970). That is, the first packet
+ * was received at this real world time.
+ * - demuxing: Set by libavformat. Users may want to use start_time_realtime
+ * if set.
+ * - muxing: unused.
+ */
+ int64_t first_pkt_wallclock;
+
/**
* A callback for closing the streams opened with AVFormatContext.io_open().
*
@@ -628,6 +628,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
force_codec_ids(s, st);
+ if (s->first_pkt_wallclock == AV_NOPTS_VALUE)
+ s->first_pkt_wallclock = av_gettime();
+
/* TODO: audio: time filter; video: frame reordering (pts != dts) */
if (s->use_wallclock_as_timestamps)
pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base);
@@ -184,6 +184,7 @@ AVFormatContext *avformat_alloc_context(void)
return NULL;
}
+ s->first_pkt_wallclock = AV_NOPTS_VALUE;
si->shortest_end = AV_NOPTS_VALUE;
return s;
@@ -31,7 +31,7 @@
#include "version_major.h"
-#define LIBAVFORMAT_VERSION_MINOR 25
+#define LIBAVFORMAT_VERSION_MINOR 26
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \