diff options
-rw-r--r-- | DOCS/client-api-changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/input.rst | 5 | ||||
-rw-r--r-- | demux/demux.c | 3 | ||||
-rw-r--r-- | demux/demux.h | 1 | ||||
-rw-r--r-- | demux/packet.c | 2 | ||||
-rw-r--r-- | demux/packet.h | 1 | ||||
-rw-r--r-- | libmpv/client.h | 2 | ||||
-rw-r--r-- | player/command.c | 17 | ||||
-rw-r--r-- | player/playloop.c | 2 |
9 files changed, 2 insertions, 32 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst index f59c011582..ee370d7bc0 100644 --- a/DOCS/client-api-changes.rst +++ b/DOCS/client-api-changes.rst @@ -25,6 +25,7 @@ API changes :: + 1.2 - remove "stream-time-pos" property (no replacement) 1.1 - remap dvdnav:// to dvd:// - add "--cache-file", "--cache-file-size" - add "--colormatrix-primaries" (and property) diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index da3bd8f2a1..b2ca61a516 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -613,11 +613,6 @@ Property list ``stream-end`` Raw end position in bytes in source stream. -``stream-time-pos`` (RW) - Time position in source stream. This only works for DVD and Bluray. This - is probably never different from ``time-pos``, because ``time-pos`` is - forced to this value anyway. - ``length`` Length of the current file in seconds. If the length is unknown, the property is unavailable. Note that the file duration is not always exactly diff --git a/demux/demux.c b/demux/demux.c index 7938cbdcec..08c7e24a30 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -288,8 +288,6 @@ struct demux_packet *demux_read_packet(struct sh_stream *sh) ds->bytes -= pkt->len; ds->packs--; - if (pkt->stream_pts != MP_NOPTS_VALUE) - sh->demuxer->stream_pts = pkt->stream_pts; if (pkt && pkt->pos >= 0) sh->demuxer->filepos = pkt->pos; @@ -454,7 +452,6 @@ static struct demuxer *open_given_type(struct mpv_global *global, .desc = desc, .type = desc->type, .stream = stream, - .stream_pts = MP_NOPTS_VALUE, .seekable = stream->seekable, .accurate_seek = true, .filepos = -1, diff --git a/demux/demux.h b/demux/demux.h index c59af6a2fa..133e9ddd7a 100644 --- a/demux/demux.h +++ b/demux/demux.h @@ -173,7 +173,6 @@ typedef struct demuxer { const char *filetype; // format name when not identified by demuxer (libavformat) int64_t filepos; // input stream current pos. struct stream *stream; - double stream_pts; // current stream pts, if applicable (e.g. dvd) char *filename; // same as stream->url enum demuxer_type type; int seekable; // flag diff --git a/demux/packet.c b/demux/packet.c index 82de1a6996..77ea78f7cc 100644 --- a/demux/packet.c +++ b/demux/packet.c @@ -46,7 +46,6 @@ static struct demux_packet *create_packet(size_t len) .pts = MP_NOPTS_VALUE, .dts = MP_NOPTS_VALUE, .duration = -1, - .stream_pts = MP_NOPTS_VALUE, .pos = -1, .stream = -1, }; @@ -119,6 +118,5 @@ struct demux_packet *demux_copy_packet(struct demux_packet *dp) new->pts = dp->pts; new->dts = dp->dts; new->duration = dp->duration; - new->stream_pts = dp->stream_pts; return new; } diff --git a/demux/packet.h b/demux/packet.h index e6cfafb5ee..21c0a6dc8f 100644 --- a/demux/packet.h +++ b/demux/packet.h @@ -29,7 +29,6 @@ typedef struct demux_packet { double pts; double dts; double duration; - double stream_pts; int64_t pos; // position in source file byte stream unsigned char *buffer; bool keyframe; diff --git a/libmpv/client.h b/libmpv/client.h index 51866959ef..76736f6b53 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -163,7 +163,7 @@ extern "C" { * version 0x001001FF * becomes 16.511 (dec(0x0010) + "." + dec(0x01FF)) */ -#define MPV_CLIENT_API_VERSION 0x00010001UL +#define MPV_CLIENT_API_VERSION 0x00010002UL /** * Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with. diff --git a/player/command.c b/player/command.c index 9f8a830058..159367a028 100644 --- a/player/command.c +++ b/player/command.c @@ -335,22 +335,6 @@ static int property_time(int action, void *arg, double time) return M_PROPERTY_NOT_IMPLEMENTED; } -/// Current stream position in seconds (RO) -static int mp_property_stream_time_pos(void *ctx, struct m_property *prop, - int action, void *arg) -{ - MPContext *mpctx = ctx; - struct demuxer *demuxer = mpctx->demuxer; - if (!demuxer) - return M_PROPERTY_UNAVAILABLE; - double pts = demuxer->stream_pts; - if (pts == MP_NOPTS_VALUE) - return M_PROPERTY_UNAVAILABLE; - - return property_time(action, arg, pts); -} - - /// Media length in seconds (RO) static int mp_property_length(void *ctx, struct m_property *prop, int action, void *arg) @@ -2658,7 +2642,6 @@ static const struct m_property mp_properties[] = { {"demuxer", mp_property_demuxer}, {"stream-pos", mp_property_stream_pos}, {"stream-end", mp_property_stream_end}, - {"stream-time-pos", mp_property_stream_time_pos}, {"length", mp_property_length}, {"avsync", mp_property_avsync}, {"total-avsync-change", mp_property_total_avsync_change}, diff --git a/player/playloop.c b/player/playloop.c index e975e57413..b3b3687c22 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -417,8 +417,6 @@ double get_current_time(struct MPContext *mpctx) struct demuxer *demuxer = mpctx->demuxer; if (!demuxer) return 0; - if (demuxer->stream_pts != MP_NOPTS_VALUE) - return demuxer->stream_pts; if (mpctx->playback_pts != MP_NOPTS_VALUE) return mpctx->playback_pts; if (mpctx->last_seek_pts != MP_NOPTS_VALUE) |