diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-09-27 15:44:54 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-09-30 16:55:45 +0200 |
commit | 8ea35af7620e4f73f9e8c072e1c0fac9a04ec161 (patch) | |
tree | da2d061e034641f00bf07954247dc57a99f50b49 | |
parent | 75c1db6152c7c90c7ce28c9adb945028e5512c4f (diff) | |
download | ffmpeg-8ea35af7620e4f73f9e8c072e1c0fac9a04ec161.tar.gz |
avio: add a new flag for marking streams seekable by timestamp
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavformat/avio.h | 5 | ||||
-rw-r--r-- | libavformat/aviobuf.c | 3 | ||||
-rw-r--r-- | libavformat/version.h | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index d0ffca2e80..6fd3959a33 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-xx-xx - xxxxxxx - lavf 57.08.0 - avio.h + Add AVIO_SEEKABLE_TIME flag. + 2016-xx-xx - xxxxxxx - lavu 55.22.0 - pixfmt.h Add AV_PIX_FMT_YUV(420,422,444)P12. diff --git a/libavformat/avio.h b/libavformat/avio.h index 5d2f8c2031..49721aa131 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -40,6 +40,11 @@ #define AVIO_SEEKABLE_NORMAL (1 << 0) /** + * Seeking by timestamp with avio_seek_time() is possible. + */ +#define AVIO_SEEKABLE_TIME (1 << 1) + +/** * Callback for checking whether to abort blocking functions. * AVERROR_EXIT is returned in this case by the interrupted * function. During blocking operations, callback is called with diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 39a11e21c4..5cb733d3d8 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -846,6 +846,9 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if(h->prot) { (*s)->read_pause = io_read_pause; (*s)->read_seek = io_read_seek; + + if (h->prot->url_read_seek) + (*s)->seekable |= AVIO_SEEKABLE_TIME; } (*s)->av_class = &ff_avio_class; return 0; diff --git a/libavformat/version.h b/libavformat/version.h index 1e1105fe5c..a6643a9e25 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -30,8 +30,8 @@ #include "libavutil/version.h" #define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 7 -#define LIBAVFORMAT_VERSION_MICRO 1 +#define LIBAVFORMAT_VERSION_MINOR 8 +#define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ |