mirror of https://github.com/mpv-player/mpv
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:
parent
a90b5cfddf
commit
acd60736ef
|
@ -25,6 +25,7 @@ API changes
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
1.2 - remove "stream-time-pos" property (no replacement)
|
||||||
1.1 - remap dvdnav:// to dvd://
|
1.1 - remap dvdnav:// to dvd://
|
||||||
- add "--cache-file", "--cache-file-size"
|
- add "--cache-file", "--cache-file-size"
|
||||||
- add "--colormatrix-primaries" (and property)
|
- add "--colormatrix-primaries" (and property)
|
||||||
|
|
|
@ -613,11 +613,6 @@ Property list
|
||||||
``stream-end``
|
``stream-end``
|
||||||
Raw end position in bytes in source stream.
|
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``
|
||||||
Length of the current file in seconds. If the length is unknown, the
|
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
|
property is unavailable. Note that the file duration is not always exactly
|
||||||
|
|
|
@ -288,8 +288,6 @@ struct demux_packet *demux_read_packet(struct sh_stream *sh)
|
||||||
ds->bytes -= pkt->len;
|
ds->bytes -= pkt->len;
|
||||||
ds->packs--;
|
ds->packs--;
|
||||||
|
|
||||||
if (pkt->stream_pts != MP_NOPTS_VALUE)
|
|
||||||
sh->demuxer->stream_pts = pkt->stream_pts;
|
|
||||||
if (pkt && pkt->pos >= 0)
|
if (pkt && pkt->pos >= 0)
|
||||||
sh->demuxer->filepos = pkt->pos;
|
sh->demuxer->filepos = pkt->pos;
|
||||||
|
|
||||||
|
@ -454,7 +452,6 @@ static struct demuxer *open_given_type(struct mpv_global *global,
|
||||||
.desc = desc,
|
.desc = desc,
|
||||||
.type = desc->type,
|
.type = desc->type,
|
||||||
.stream = stream,
|
.stream = stream,
|
||||||
.stream_pts = MP_NOPTS_VALUE,
|
|
||||||
.seekable = stream->seekable,
|
.seekable = stream->seekable,
|
||||||
.accurate_seek = true,
|
.accurate_seek = true,
|
||||||
.filepos = -1,
|
.filepos = -1,
|
||||||
|
|
|
@ -173,7 +173,6 @@ typedef struct demuxer {
|
||||||
const char *filetype; // format name when not identified by demuxer (libavformat)
|
const char *filetype; // format name when not identified by demuxer (libavformat)
|
||||||
int64_t filepos; // input stream current pos.
|
int64_t filepos; // input stream current pos.
|
||||||
struct stream *stream;
|
struct stream *stream;
|
||||||
double stream_pts; // current stream pts, if applicable (e.g. dvd)
|
|
||||||
char *filename; // same as stream->url
|
char *filename; // same as stream->url
|
||||||
enum demuxer_type type;
|
enum demuxer_type type;
|
||||||
int seekable; // flag
|
int seekable; // flag
|
||||||
|
|
|
@ -46,7 +46,6 @@ static struct demux_packet *create_packet(size_t len)
|
||||||
.pts = MP_NOPTS_VALUE,
|
.pts = MP_NOPTS_VALUE,
|
||||||
.dts = MP_NOPTS_VALUE,
|
.dts = MP_NOPTS_VALUE,
|
||||||
.duration = -1,
|
.duration = -1,
|
||||||
.stream_pts = MP_NOPTS_VALUE,
|
|
||||||
.pos = -1,
|
.pos = -1,
|
||||||
.stream = -1,
|
.stream = -1,
|
||||||
};
|
};
|
||||||
|
@ -119,6 +118,5 @@ struct demux_packet *demux_copy_packet(struct demux_packet *dp)
|
||||||
new->pts = dp->pts;
|
new->pts = dp->pts;
|
||||||
new->dts = dp->dts;
|
new->dts = dp->dts;
|
||||||
new->duration = dp->duration;
|
new->duration = dp->duration;
|
||||||
new->stream_pts = dp->stream_pts;
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ typedef struct demux_packet {
|
||||||
double pts;
|
double pts;
|
||||||
double dts;
|
double dts;
|
||||||
double duration;
|
double duration;
|
||||||
double stream_pts;
|
|
||||||
int64_t pos; // position in source file byte stream
|
int64_t pos; // position in source file byte stream
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
bool keyframe;
|
bool keyframe;
|
||||||
|
|
|
@ -163,7 +163,7 @@ extern "C" {
|
||||||
* version 0x001001FF
|
* version 0x001001FF
|
||||||
* becomes 16.511 (dec(0x0010) + "." + dec(0x01FF))
|
* 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.
|
* Return the MPV_CLIENT_API_VERSION the mpv source has been compiled with.
|
||||||
|
|
|
@ -335,22 +335,6 @@ static int property_time(int action, void *arg, double time)
|
||||||
return M_PROPERTY_NOT_IMPLEMENTED;
|
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)
|
/// Media length in seconds (RO)
|
||||||
static int mp_property_length(void *ctx, struct m_property *prop,
|
static int mp_property_length(void *ctx, struct m_property *prop,
|
||||||
int action, void *arg)
|
int action, void *arg)
|
||||||
|
@ -2658,7 +2642,6 @@ static const struct m_property mp_properties[] = {
|
||||||
{"demuxer", mp_property_demuxer},
|
{"demuxer", mp_property_demuxer},
|
||||||
{"stream-pos", mp_property_stream_pos},
|
{"stream-pos", mp_property_stream_pos},
|
||||||
{"stream-end", mp_property_stream_end},
|
{"stream-end", mp_property_stream_end},
|
||||||
{"stream-time-pos", mp_property_stream_time_pos},
|
|
||||||
{"length", mp_property_length},
|
{"length", mp_property_length},
|
||||||
{"avsync", mp_property_avsync},
|
{"avsync", mp_property_avsync},
|
||||||
{"total-avsync-change", mp_property_total_avsync_change},
|
{"total-avsync-change", mp_property_total_avsync_change},
|
||||||
|
|
|
@ -417,8 +417,6 @@ double get_current_time(struct MPContext *mpctx)
|
||||||
struct demuxer *demuxer = mpctx->demuxer;
|
struct demuxer *demuxer = mpctx->demuxer;
|
||||||
if (!demuxer)
|
if (!demuxer)
|
||||||
return 0;
|
return 0;
|
||||||
if (demuxer->stream_pts != MP_NOPTS_VALUE)
|
|
||||||
return demuxer->stream_pts;
|
|
||||||
if (mpctx->playback_pts != MP_NOPTS_VALUE)
|
if (mpctx->playback_pts != MP_NOPTS_VALUE)
|
||||||
return mpctx->playback_pts;
|
return mpctx->playback_pts;
|
||||||
if (mpctx->last_seek_pts != MP_NOPTS_VALUE)
|
if (mpctx->last_seek_pts != MP_NOPTS_VALUE)
|
||||||
|
|
Loading…
Reference in New Issue