Remove stream_pts stuff

This was used by DVD/BD, but its usage was removed with one of the
previous commits.
This commit is contained in:
wm4 2014-07-06 19:05:59 +02:00
parent a90b5cfddf
commit acd60736ef
9 changed files with 2 additions and 32 deletions

View File

@ -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)

View File

@ -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

View File

@ -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,

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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.

View File

@ -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},

View File

@ -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)